From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 27 05:47:30 2013 Received: (at submit) by debbugs.gnu.org; 27 Apr 2013 09:47:30 +0000 Received: from localhost ([127.0.0.1]:46068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UW1j7-0005XV-Tz for submit@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 ) id 1UW1j5-0005XO-Sw for submit@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 ) id 1UW1iz-0000xi-6b for submit@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 ) id 1UW1iz-0000xe-3n for submit@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 ) id 1UW1ix-000769-LX for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 05:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW1iv-0000wH-SQ for bug-gnu-emacs@gnu.org; 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 ) id 1UW1iv-0000vw-KF for bug-gnu-emacs@gnu.org; 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 ; Sat, 27 Apr 2013 11:07:50 +0200 (CEST) Message-ID: <517B9566.4080302@free.fr> Date: Sat, 27 Apr 2013 11:07:50 +0200 From: =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= 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@gnu.org 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@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@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@free.fr http://jeberger.free.fr Jabber: jeberger@jabber.fr --------------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-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 06 13:26:44 2020 Received: (at 14286) by debbugs.gnu.org; 6 Dec 2020 18:26:44 +0000 Received: from localhost ([127.0.0.1]:51190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klyk7-0000sp-Ta for submit@debbugs.gnu.org; Sun, 06 Dec 2020 13:26:44 -0500 Received: from quimby.gnus.org ([95.216.78.240]:56010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klyk6-0000sY-2b for 14286@debbugs.gnu.org; Sun, 06 Dec 2020 13:26:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SflC6SREt5umIiR37wALppE6YaKq9uqEreX6cQ+0Z3k=; b=oyz2FJhljW3RV1mPOWiKfYqCt3 8XD/fbwAL00yYOqEcnK9oN3f0sqzs0m37ZQ8c7rMipG52kyJMqF1f7IOXl5zXl5GGbg1ITZm1jBCm t5ZtzRyrhp1YERZMBNJM6GscWVYlPZ0yaX2gD+5xglZUQnbiUF8j9moWt407Ta3z3bmw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klyjx-0006o9-4o; Sun, 06 Dec 2020 19:26:35 +0100 From: Lars Ingebrigtsen To: =?utf-8?Q?J=C3=A9r=C3=B4me_M=2E_Berger?= Subject: Re: bug#14286: Tex-mode always picks the first command in tex-compile-commands on Windows References: <517B9566.4080302@free.fr> X-Now-Playing: Moby's _All Visible Objects_: "Tecie" Date: Sun, 06 Dec 2020 19:26:31 +0100 In-Reply-To: <517B9566.4080302@free.fr> (=?utf-8?B?IkrDqXLDtG1l?= M. Berger"'s message of "Sat, 27 Apr 2013 11:07:50 +0200") Message-ID: <87o8j6ssdk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "Jérôme M. Berger" 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 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14286 Cc: 14286@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "J=C3=A9r=C3=B4me M. Berger" 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. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 06 13:26:50 2020 Received: (at control) by debbugs.gnu.org; 6 Dec 2020 18:26:50 +0000 Received: from localhost ([127.0.0.1]:51193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klykE-0000t9-4M for submit@debbugs.gnu.org; Sun, 06 Dec 2020 13:26:50 -0500 Received: from quimby.gnus.org ([95.216.78.240]:56024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klykC-0000so-Ej for control@debbugs.gnu.org; Sun, 06 Dec 2020 13:26:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+zBL3YoNvXFfM+mVHCYwNtXpSZsEOw2nGZljehRFUvY=; b=LjOfrRVV7m5f7K2kIutmPTi6+j DkupHiCDXVrRKxP3qqpdeWX84mcmT9Gt9fDQNB7YMyFMf1Shws17KkMln8WwouP+V4q70u2MbEIX9 143QirlCgunckp1fmH38xlcF+gJjKKXClYWxEUy04M+M5Ypq3DsXN4bpXKxoXx2g9OHk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klyk4-0006oG-Qp for control@debbugs.gnu.org; Sun, 06 Dec 2020 19:26:42 +0100 Date: Sun, 06 Dec 2020 19:26:39 +0100 Message-Id: <87mtyqssdc.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #14286 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 14286 fixed close 14286 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 14286 fixed close 14286 28.1 quit From unknown Fri Jun 20 18:18:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 04 Jan 2021 12:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator