all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7133: Please check return value from shell-command in org-latex.el
@ 2010-09-29 15:57 Lennart Borgman
  0 siblings, 0 replies; only message in thread
From: Lennart Borgman @ 2010-09-29 15:57 UTC (permalink / raw)
  To: 7133

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

When output goes to a specified buffer (instead of current buffer) it
is possible to check the return value from shell-command. I suggest
doing that in org-latex.diff, see attached file.

I think the doc string of shell-command should be updated too since it
does not mention that you can test the return value in this case.

[-- Attachment #2: org-latex-shell-command-check.diff --]
[-- Type: application/octet-stream, Size: 596 bytes --]

=== modified file 'lisp/org/org-latex.el'
--- trunk/lisp/org/org-latex.el	2010-07-19 09:47:27 +0000
+++ patched/lisp/org/org-latex.el	2010-09-29 15:52:48 +0000
@@ -849,7 +849,9 @@
 		     (save-match-data
 		       (shell-quote-argument file))
 		     t t cmd)))
-	(shell-command cmd outbuf outbuf)))
+	(unless (= 0 (shell-command cmd outbuf outbuf))
+          (display-buffer outbuf)
+          (error "Error in subprocess, see %s; cmd=%S" outbuf cmd))))
     (message "Processing LaTeX file...done")
     (if (not (file-exists-p pdffile))
 	(error "PDF file was not produced")


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-29 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 15:57 bug#7133: Please check return value from shell-command in org-latex.el Lennart Borgman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.