Sfoglia il codice sorgente

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
Paul Eggert 9 anni fa
parent
commit
cc0d491739
5 ha cambiato i file con 11 aggiunte e 10 eliminazioni
  1. 1 1
      lisp/ob-latex.el
  2. 4 3
      lisp/org-crypt.el
  3. 2 2
      lisp/ox-man.el
  4. 2 2
      lisp/ox-odt.el
  5. 2 2
      lisp/ox-texinfo.el

+ 1 - 1
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)

+ 4 - 3
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."))

+ 2 - 2
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

+ 2 - 2
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.

+ 2 - 2
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