From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16260@debbugs.gnu.org, Jarek Czekalski <jarekczek@poczta.onet.pl>
Subject: bug#16260: 24.3.50; shell-command-completion and removal of exec-directory from exec-path
Date: Wed, 20 Jan 2021 03:35:56 +0100 [thread overview]
Message-ID: <87k0s85o8j.fsf@gnus.org> (raw)
In-Reply-To: <83txdv4ave.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Dec 2013 22:26:29 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
> shell--command-completion-data has this FIXME comment:
>
> (defun shell--command-completion-data ()
> "Return the completion data for the command at point."
> (let* ((filename (or (comint-match-partial-filename) ""))
> (start (if (zerop (length filename)) (point) (match-beginning 0)))
> (end (if (zerop (length filename)) (point) (match-end 0)))
> (filenondir (file-name-nondirectory filename))
> (path-dirs (cdr (reverse exec-path))) ;FIXME: Why `cdr'?
This code now looks like:
(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?
> 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.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-01-20 2:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-26 20:26 bug#16260: 24.3.50; shell-command-completion and removal of exec-directory from exec-path Eli Zaretskii
2021-01-20 2:35 ` Lars Ingebrigtsen [this message]
2021-01-20 15:15 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0s85o8j.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=16260@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jarekczek@poczta.onet.pl \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.