Jelajahi Sumber

Use `special-mode' for compilation output

* lisp/org.el (org-compile-file): Switch to `special-mode' for log
  buffer.

Suggested-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112164>
Nicolas Goaziou 8 tahun lalu
induk
melakukan
5018803f60
2 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 1 0
      etc/ORG-NEWS
  2. 2 1
      lisp/org.el

+ 1 - 0
etc/ORG-NEWS

@@ -172,6 +172,7 @@ Simiralry to ~:EXPORT_FILE_NAME:~ property, this keyword allows the
 user to specify the name of the output file upon exporting the
 user to specify the name of the output file upon exporting the
 document.  This also has an effect on publishing.
 document.  This also has an effect on publishing.
 **** Horizontal rules are no longer ignored in LaTeX table math mode
 **** Horizontal rules are no longer ignored in LaTeX table math mode
+**** Use ~special-mode~ for compilation output
 
 
 *** ~org-edit-special~ can edit LaTeX environments
 *** ~org-edit-special~ can edit LaTeX environments
 
 

+ 2 - 1
lisp/org.el

@@ -22462,7 +22462,8 @@ it for output."
 			       (?o . ,(shell-quote-argument out-dir))
 			       (?o . ,(shell-quote-argument out-dir))
 			       (?O . ,(shell-quote-argument output))))))
 			       (?O . ,(shell-quote-argument output))))))
 	   (dolist (command process)
 	   (dolist (command process)
-	     (shell-command (format-spec command spec) log-buf))))
+	     (shell-command (format-spec command spec) log-buf))
+	   (when log-buf (with-current-buffer log-buf (special-mode)))))
 	(_ (error "No valid command to process %S%s" source err-msg))))
 	(_ (error "No valid command to process %S%s" source err-msg))))
     ;; Check for process failure.  Output file is expected to be
     ;; Check for process failure.  Output file is expected to be
     ;; located in the same directory as SOURCE.
     ;; located in the same directory as SOURCE.