From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs 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 Message-ID: <87o8j6ssdk.fsf@gnus.org> References: <517B9566.4080302@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5372"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 14286@debbugs.gnu.org To: =?UTF-8?Q?J=C3=A9r=C3=B4me?= M. Berger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 06 19:27:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klykd-0001HC-If for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 19:27:15 +0100 Original-Received: from localhost ([::1]:37250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klykb-0005T9-85 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 13:27:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klykQ-0005Sm-Gl for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 13:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39647) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klykQ-0001DA-8r for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 13:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1klykQ-0000tZ-3N for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 13:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Dec 2020 18:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14286 X-GNU-PR-Package: emacs Original-Received: via spool by 14286-submit@debbugs.gnu.org id=B14286.16072792043404 (code B ref 14286); Sun, 06 Dec 2020 18:27:02 +0000 Original-Received: (at 14286) by debbugs.gnu.org; 6 Dec 2020 18:26:44 +0000 Original-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 Original-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=; Original-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 X-Now-Playing: Moby's _All Visible Objects_: "Tecie" In-Reply-To: <517B9566.4080302@free.fr> ("=?UTF-8?Q?J=C3=A9r=C3=B4me?= M. Berger"'s message of "Sat, 27 Apr 2013 11:07:50 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195145 Archived-At: "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