From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Jérôme M. Berger" <jeberger@free.fr>
Cc: 14286@debbugs.gnu.org
Subject: bug#14286: Tex-mode always picks the first command in tex-compile-commands on Windows
Date: Sun, 06 Dec 2020 19:26:31 +0100 [thread overview]
Message-ID: <87o8j6ssdk.fsf@gnus.org> (raw)
In-Reply-To: <517B9566.4080302@free.fr> ("Jérôme M. Berger"'s message of "Sat, 27 Apr 2013 11:07:50 +0200")
"Jérôme M. Berger" <jeberger@free.fr> writes:
> Tex-mode is supposed to pick the most appropriate command in
> tex-compile-commands depending on the situation. However, on Windows
> it always picks the first command (and probably on Linux if TeX is
> installed in some non-standard locations).
>
> This is due to the fact that the executables are shell-quoted which
> prevents the detection logic in tex-command-active-p from working.
> It works on Linux because most of the time shell-quoting leaves the
> string intact, whereas on Windows shell-quoting always adds double
> quotes around the string.
[...]
> (defun tex-command-active-p (cmd fspec)
> "Return non-nil if the CMD spec might need to be run."
> (let ((in (nth 1 cmd))
> (out (nth 2 cmd)))
> (if (stringp in)
> (let ((file (jb-tex-unquote (format-spec in fspec))))
> (when (file-exists-p file)
> (or (not out)
> (file-newer-than-file-p
> file (jb-tex-unquote
> (format-spec out fspec))))))
> (when (and (eq in t) (stringp out))
> (not (tex-uptodate-p (jb-tex-unquote
> (format-spec out fspec))))))))
(This bug report unfortunately got no response at the time.)
Thanks -- I think it would be better to just avoid quoting the file
names altogether -- until we need to when actually issuing commands on
the files. I've done this in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2020-12-06 18:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-27 9:07 bug#14286: Tex-mode always picks the first command in tex-compile-commands on Windows Jérôme M. Berger
2020-12-06 18:26 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8j6ssdk.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=14286@debbugs.gnu.org \
--cc=jeberger@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).