From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 51130@debbugs.gnu.org, Carlos Pita <carlosjosepita2@gmail.com>
Subject: bug#51130: 29.0.50; shell completion fails to complete filenames
Date: Wed, 14 Sep 2022 14:28:26 +0200 [thread overview]
Message-ID: <878rmmb0np.fsf@gnus.org> (raw)
In-Reply-To: <jwvmtb35roj.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 13 Sep 2022 09:32:43 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Look at `shell-dynamic-complete-functions`:
>
> (defcustom shell-dynamic-complete-functions
> '(comint-c-a-p-replace-by-expanded-history
> shell-environment-variable-completion
> shell-command-completion
> shell-c-a-p-replace-by-expanded-directory
> pcomplete-completions-at-point
> shell-filename-completion
> comint-filename-completion)
> "List of functions called to perform completion.
> This variable is used to initialize `comint-dynamic-complete-functions' in the
> shell buffer."
> :type '(repeat function)
> :group 'shell)
>
> if `pcomplete-default-completion-function` is left at its default value,
> then `pcomplete-completions-at-point` will never return nil, so the
> functions that appear after it in the above list will just never
> be used.
Ah, the detail I missed was that pcomplete-completions-at-point is
(partially) controlled by pcomplete-default-completion-function -- from
the documentation, I assumed that pcomplete-default-completion-function
was run after all of the other completion functions had finished.
> The change I introduced tried to preserve as much of the existing
> completion as possible, by only using the non-fallback pcomplete rules
> and keeping the existing `shell-filename-completion` and
> `comint-filename-completion` thingies as the fallback.
>
> I don't know that it's the best choice. It was just the
> conservative choice.
Could just put an additional function at the end of the list there that
does what pcomplete-completions-at-point does when
pcomplete-default-completion-function isn't set to #'ignore?
next prev parent reply other threads:[~2022-09-14 12:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 3:08 bug#51130: 29.0.50; shell completion fails to complete filenames Carlos Pita
2022-09-12 11:22 ` Lars Ingebrigtsen
2022-09-12 14:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-13 11:19 ` Lars Ingebrigtsen
2022-09-13 13:32 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-14 12:28 ` Lars Ingebrigtsen [this message]
2022-09-14 14:27 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-14 15:20 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rmmb0np.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=51130@debbugs.gnu.org \
--cc=carlosjosepita2@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).