Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2013-05-30 20:33:24 +02:00
commit de0fcdf3b8
4 changed files with 20 additions and 16 deletions

View File

@ -1919,9 +1919,10 @@ Return PDF file name or an error if it couldn't be produced."
(let* ((base-name (file-name-sans-extension (file-name-nondirectory file))) (let* ((base-name (file-name-sans-extension (file-name-nondirectory file)))
(full-name (file-truename file)) (full-name (file-truename file))
(out-dir (file-name-directory file)) (out-dir (file-name-directory file))
;; Make sure `default-directory' is set to FILE directory, ;; Properly set working directory for compilation.
;; not to whatever value the current buffer may have. (default-directory (if (file-name-absolute-p texfile)
(default-directory (file-name-directory full-name)) (file-name-directory full-name)
default-directory))
errors) errors)
(message (format "Processing Groff file %s ..." file)) (message (format "Processing Groff file %s ..." file))
(save-window-excursion (save-window-excursion
@ -1949,7 +1950,7 @@ Return PDF file name or an error if it couldn't be produced."
;; Collect standard errors from output buffer. ;; Collect standard errors from output buffer.
(setq errors (org-groff-collect-errors outbuf)))) (setq errors (org-groff-collect-errors outbuf))))
(t (error "No valid command to process to PDF"))) (t (error "No valid command to process to PDF")))
(let ((pdffile (concat (file-name-sans-extension full-name) ".pdf"))) (let ((pdffile (concat out-dir base-name ".pdf")))
;; Check for process failure. Provide collected errors if ;; Check for process failure. Provide collected errors if
;; possible. ;; possible.
(if (not (file-exists-p pdffile)) (if (not (file-exists-p pdffile))

View File

@ -2862,9 +2862,10 @@ Return PDF file name or an error if it couldn't be produced."
(let* ((base-name (file-name-sans-extension (file-name-nondirectory texfile))) (let* ((base-name (file-name-sans-extension (file-name-nondirectory texfile)))
(full-name (file-truename texfile)) (full-name (file-truename texfile))
(out-dir (file-name-directory texfile)) (out-dir (file-name-directory texfile))
;; Make sure `default-directory' is set to TEXFILE directory, ;; Properly set working directory for compilation.
;; not to whatever value the current buffer may have. (default-directory (if (file-name-absolute-p texfile)
(default-directory (file-name-directory full-name)) (file-name-directory full-name)
default-directory))
errors) errors)
(unless snippet (message (format "Processing LaTeX file %s..." texfile))) (unless snippet (message (format "Processing LaTeX file %s..." texfile)))
(save-window-excursion (save-window-excursion
@ -2892,7 +2893,7 @@ Return PDF file name or an error if it couldn't be produced."
;; Collect standard errors from output buffer. ;; Collect standard errors from output buffer.
(setq errors (and (not snippet) (org-latex--collect-errors outbuf))))) (setq errors (and (not snippet) (org-latex--collect-errors outbuf)))))
(t (error "No valid command to process to PDF"))) (t (error "No valid command to process to PDF")))
(let ((pdffile (concat (file-name-sans-extension full-name) ".pdf"))) (let ((pdffile (concat out-dir base-name ".pdf")))
;; Check for process failure. Provide collected errors if ;; Check for process failure. Provide collected errors if
;; possible. ;; possible.
(if (not (file-exists-p pdffile)) (if (not (file-exists-p pdffile))

View File

@ -1204,9 +1204,10 @@ Return PDF file name or an error if it couldn't be produced."
(let* ((base-name (file-name-sans-extension (file-name-nondirectory file))) (let* ((base-name (file-name-sans-extension (file-name-nondirectory file)))
(full-name (file-truename file)) (full-name (file-truename file))
(out-dir (file-name-directory file)) (out-dir (file-name-directory file))
;; Make sure `default-directory' is set to FILE directory, ;; Properly set working directory for compilation.
;; not to whatever value the current buffer may have. (default-directory (if (file-name-absolute-p texfile)
(default-directory (file-name-directory full-name)) (file-name-directory full-name)
default-directory))
errors) errors)
(message (format "Processing Groff file %s..." file)) (message (format "Processing Groff file %s..." file))
(save-window-excursion (save-window-excursion
@ -1233,7 +1234,7 @@ Return PDF file name or an error if it couldn't be produced."
;; Collect standard errors from output buffer. ;; Collect standard errors from output buffer.
(setq errors (org-man-collect-errors outbuf)))) (setq errors (org-man-collect-errors outbuf))))
(t (error "No valid command to process to PDF"))) (t (error "No valid command to process to PDF")))
(let ((pdffile (concat (file-name-sans-extension full-name) ".pdf"))) (let ((pdffile (concat out-dir base-name ".pdf")))
;; Check for process failure. Provide collected errors if ;; Check for process failure. Provide collected errors if
;; possible. ;; possible.
(if (not (file-exists-p pdffile)) (if (not (file-exists-p pdffile))

View File

@ -1801,9 +1801,10 @@ Return INFO file name or an error if it couldn't be produced."
(let* ((base-name (file-name-sans-extension (file-name-nondirectory file))) (let* ((base-name (file-name-sans-extension (file-name-nondirectory file)))
(full-name (file-truename file)) (full-name (file-truename file))
(out-dir (file-name-directory file)) (out-dir (file-name-directory file))
;; Make sure `default-directory' is set to FILE directory, ;; Properly set working directory for compilation.
;; not to whatever value the current buffer may have. (default-directory (if (file-name-absolute-p texfile)
(default-directory (file-name-directory full-name)) (file-name-directory full-name)
default-directory))
errors) errors)
(message (format "Processing Texinfo file %s..." file)) (message (format "Processing Texinfo file %s..." file))
(save-window-excursion (save-window-excursion
@ -1830,7 +1831,7 @@ Return INFO file name or an error if it couldn't be produced."
;; Collect standard errors from output buffer. ;; Collect standard errors from output buffer.
(setq errors (org-texinfo-collect-errors outbuf)))) (setq errors (org-texinfo-collect-errors outbuf))))
(t (error "No valid command to process to Info"))) (t (error "No valid command to process to Info")))
(let ((infofile (concat (file-name-sans-extension full-name) ".info"))) (let ((infofile (concat out-dir base-name ".info")))
;; Check for process failure. Provide collected errors if ;; Check for process failure. Provide collected errors if
;; possible. ;; possible.
(if (not (file-exists-p infofile)) (if (not (file-exists-p infofile))