From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16260: 24.3.50; shell-command-completion and removal of exec-directory from exec-path Date: Wed, 20 Jan 2021 17:15:34 +0200 Message-ID: <83mtx37i7d.fsf@gnu.org> References: <83txdv4ave.fsf@gnu.org> <87k0s85o8j.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29320"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 16260@debbugs.gnu.org, jarekczek@poczta.onet.pl To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 20 16:16:37 2021 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 1l2FDo-0007VU-FM for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Jan 2021 16:16:36 +0100 Original-Received: from localhost ([::1]:36626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2FDn-0007my-H9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Jan 2021 10:16:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2FDJ-0007m2-1U for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2021 10:16:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44372) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l2FDG-0006v4-KQ for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2021 10:16:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l2FDG-0007or-F8 for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2021 10:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jan 2021 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16260 X-GNU-PR-Package: emacs Original-Received: via spool by 16260-submit@debbugs.gnu.org id=B16260.161115573230005 (code B ref 16260); Wed, 20 Jan 2021 15:16:02 +0000 Original-Received: (at 16260) by debbugs.gnu.org; 20 Jan 2021 15:15:32 +0000 Original-Received: from localhost ([127.0.0.1]:55918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2FCm-0007nt-3i for submit@debbugs.gnu.org; Wed, 20 Jan 2021 10:15:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2FCj-0007nf-RT for 16260@debbugs.gnu.org; Wed, 20 Jan 2021 10:15:30 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51709) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2FCe-0006fS-9Y; Wed, 20 Jan 2021 10:15:24 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4784 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l2FCb-0006pD-Ot; Wed, 20 Jan 2021 10:15:23 -0500 In-Reply-To: <87k0s85o8j.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 20 Jan 2021 03:35:56 +0100) 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:198261 Archived-At: > From: Lars Ingebrigtsen > Cc: 16260@debbugs.gnu.org, Jarek Czekalski > Date: Wed, 20 Jan 2021 03:35:56 +0100 > > (path-dirs > ;; Ignore `exec-directory', the last entry in `exec-path'. > (append (cdr (reverse (exec-path))) > (if (and (memq system-type '(windows-nt ms-dos)) > (not (file-remote-p default-directory))) > '(".")))) > > [...] > > > However, just clipping away the last member of exec-path list only > > does TRT in the default case. It will not work if either of the > > following happens: > > > > . The user changes epaths.h to specify more than a single directory > > > > . EMACSPATH is set in the environment > > > > To get this right, we should record at startup time the value of > > exec-path before appending $PATH to it, and then filter out the > > directories recorded at that time in shell--command-completion-data. > > I haven't looked further at this (since the FIXME is gone), but it this > something that needs further work? Not if we don't care about the two scenarios I described above. > > As a minor nit, the doc string of shell-dynamic-complete-command > > should not talk about "library path", which is a non-existing term in > > Emacs, but instead mention exec-directory. > > This doc string doesn't mention "library path" any more. Right, that part was fixed in the meantime.