From cc0d491739b6c81282dfd86330f646d3e4e92b60 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Sep 2015 09:40:35 -0700 Subject: [PATCH] Backport commit ab11a1c from Emacs master branch * lisp/ob-latex.el (convert-pdf): * lisp/org-crypt.el (org-crypt-check-auto-save): * lisp/ox-man.el (org-man-compile): * lisp/ox-odt.el (org-odt--export-wrap): * lisp/ox-texinfo.el (org-texinfo-compile): Use %s to avoid translating quotes of file names etc. in diagnostics. Use %s to format strings instead of splicing them ab11a1cf27ebe3791df45cccde3c851affd184dd Paul Eggert Sun Sep 20 09:42:05 2015 -0700 --- lisp/ob-latex.el | 2 +- lisp/org-crypt.el | 7 ++++--- lisp/ox-man.el | 4 ++-- lisp/ox-odt.el | 4 ++-- lisp/ox-texinfo.el | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el index 17e1803bf..8b3e5e8f8 100644 --- a/lisp/ob-latex.el +++ b/lisp/ob-latex.el @@ -205,7 +205,7 @@ This function is called by `org-babel-execute-src-block'." "Generate a file from a pdf file using imagemagick." (let ((cmd (concat "convert " im-in-options " " pdffile " " im-out-options " " out-file))) - (message (concat "Converting pdffile file " cmd "...")) + (message "Converting pdffile file %s..." cmd) (shell-command cmd))) (defun org-babel-latex-tex-to-pdf (file) diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el index 85b392f93..59804a50c 100644 --- a/lisp/org-crypt.el +++ b/lisp/org-crypt.el @@ -133,9 +133,10 @@ See `org-crypt-disable-auto-save'." (and (eq org-crypt-disable-auto-save 'ask) (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? "))) - (message (concat "org-decrypt: Disabling auto-save-mode for " (or (buffer-file-name) (current-buffer)))) - ; The argument to auto-save-mode has to be "-1", since - ; giving a "nil" argument toggles instead of disabling. + (message "org-decrypt: Disabling auto-save-mode for %s" + (or (buffer-file-name) (current-buffer))) + ;; The argument to auto-save-mode has to be "-1", since + ;; giving a "nil" argument toggles instead of disabling. (auto-save-mode -1)) ((eq org-crypt-disable-auto-save nil) (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) diff --git a/lisp/ox-man.el b/lisp/ox-man.el index f979fd33f..a5d0d49af 100644 --- a/lisp/ox-man.el +++ b/lisp/ox-man.el @@ -1225,8 +1225,8 @@ Return PDF file name or an error if it couldn't be produced." ;; Check for process failure. Provide collected errors if ;; possible. (if (not (file-exists-p pdffile)) - (error (concat (format "PDF file %s wasn't produced" pdffile) - (when errors (concat ": " errors)))) + (error "PDF file %s wasn't produced%s" pdffile + (if errors (concat ": " errors) "")) ;; Else remove log files, when specified, and signal end of ;; process to user, along with any error encountered. (when org-man-remove-logfiles diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 2d2db89db..75353a0f1 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -4115,8 +4115,8 @@ contextual information." nil standard-output nil (cdr cmd))))) (or (zerop exitcode) (error (concat "Unable to create OpenDocument file." - (format " Zip failed with error (%s)" - err-string))))) + " Zip failed with error (%s)") + err-string))) cmds))) ;; Move the zip file from temporary work directory to ;; user-mandated location. diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 6dfb92e1a..c8c65548d 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1611,8 +1611,8 @@ Return INFO file name or an error if it couldn't be produced." ;; Check for process failure. Provide collected errors if ;; possible. (if (not (file-exists-p infofile)) - (error (concat (format "INFO file %s wasn't produced" infofile) - (when errors (concat ": " errors)))) + (error "INFO file %s wasn't produced%s" infofile + (if errors (concat ": " errors) "")) ;; Else remove log files, when specified, and signal end of ;; process to user, along with any error encountered. (when org-texinfo-remove-logfiles