GNU bug report logs - #14286
Tex-mode always picks the first command in tex-compile-commands on Windows

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Jérôme M. Berger" <jeberger@HIDDEN>; dated Sat, 27 Apr 2013 09:48:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Apr 2013 09:47:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 05:47:30 2013
Received: from localhost ([127.0.0.1]:46068 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UW1j7-0005XV-Tz
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2013 05:47:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54866)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jeberger@HIDDEN>) id 1UW1j5-0005XO-Sw
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2013 05:47:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jeberger@HIDDEN>) id 1UW1iz-0000xi-6b
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2013 05:47:22 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-95.7 required=5.0 tests=BAYES_20,FREEMAIL_FROM,
	RCVD_IN_PBL, RDNS_DYNAMIC,
	USER_IN_WHITELIST autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:41462)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jeberger@HIDDEN>) id 1UW1iz-0000xe-3n
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2013 05:47:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37986)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jeberger@HIDDEN>) id 1UW1ix-000769-LX
	for bug-gnu-emacs@HIDDEN; Sat, 27 Apr 2013 05:47:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jeberger@HIDDEN>) id 1UW1iv-0000wH-SQ
	for bug-gnu-emacs@HIDDEN; Sat, 27 Apr 2013 05:47:19 -0400
Received: from def92-4-82-224-197-72.fbx.proxad.net ([82.224.197.72]:50911
	helo=wraith.localdomain) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jeberger@HIDDEN>) id 1UW1iv-0000vw-KF
	for bug-gnu-emacs@HIDDEN; Sat, 27 Apr 2013 05:47:17 -0400
Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1])
	by wraith.localdomain (Postfix) with ESMTP id 3D4A1EE4E
	for <bug-gnu-emacs@HIDDEN>; Sat, 27 Apr 2013 11:07:50 +0200 (CEST)
Message-ID: <517B9566.4080302@HIDDEN>
Date: Sat, 27 Apr 2013 11:07:50 +0200
From: =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.8.1.24) Gecko/20120206 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: Tex-mode always picks the first command in tex-compile-commands on
	Windows
X-Enigmail-Version: 0.96.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="------------enig9F8CF63C703C24381E7EB995"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig9F8CF63C703C24381E7EB995
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

	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.

	I have been able to work around the issue by adding the following
to my configuration:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D8<-----------=
---------
(defun jb-tex-unquote (str)
  (mapconcat
   (lambda (str) str)
   (split-string-and-unquote str)
   ""))

(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))))))))
-------------------->8=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D

		Jerome
--=20
mailto:jeberger@HIDDEN
http://jeberger.free.fr
Jabber: jeberger@HIDDEN


--------------enig9F8CF63C703C24381E7EB995
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlF7lWYACgkQd0kWM4JG3k+CRgCeJjscenHSRrnQEhjTt9QSPs+w
QakAmgMH2ajqEdoEy+GkKOoCLBE29MGn
=FARW
-----END PGP SIGNATURE-----

--------------enig9F8CF63C703C24381E7EB995--




Acknowledgement sent to "Jérôme M. Berger" <jeberger@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#14286; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.