bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-AUCTeX] Test for mgs leaves puzzling error in *Messages*


From: Reuben Thomas
Subject: [Bug-AUCTeX] Test for mgs leaves puzzling error in *Messages*
Date: Sat, 21 Jun 2014 23:05:36 +0100

preview-gs-command contains the following code:

  (or ;; The GS wrapper coming with TeX Live
      (executable-find "rungs")
      ;; The MikTeX builtin GS
      (let ((gs (executable-find "mgs")))
        ;; Check if mgs is functional for external non-MikTeX apps.
        ;; See http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
        (when (= 0 (shell-command (concat gs " -q -dNODISPLAY -c quit")))
          gs))

Even if the mgs executable is not found, the test is run, which results in a hard-to-diagnose "bash: -q: no such command" error, or similar.

Wrapping the test in (when gs ...) fixes this problem, i.e.:

  (or ;; The GS wrapper coming with TeX Live
      (executable-find "rungs")
      ;; The MikTeX builtin GS
      (let ((gs (executable-find "mgs")))
        (when gs
          ;; Check if mgs is functional for external non-MikTeX apps.
          ;; See http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
          (when (= 0 (shell-command (concat gs " -q -dNODISPLAY -c quit")))
            gs)))

Checked against current git.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]