emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fix for bug#34330 breaks makefile target complete in `compile' promp


From: Stefan Monnier
Subject: Re: fix for bug#34330 breaks makefile target complete in `compile' prompt
Date: Sun, 15 Sep 2019 17:05:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> No.  The idea rather is to decide on the completion-table to use only
>> based on *where* we are.  You can't easily know whether there are
>> any completions (because it depends on completion-styles).
> Hmm. Why don't we know the style? Won't completion-try-completion, using
> the candidate completion table, return the right result?

You could try and do that, but it might make things too slow
(completion-at-point-functions is also called at times with no
intention to actually perform the completion, but rather just to know
if we're still in the same completion-spot as before, e.g. to know when
to pop-down the *Completions* buffer).

> comint-complete (although I think that means adding pcomplete/ls etc, so
> it knows it's looking for a file).

I don't think pcomplete/ls would help in any way.  The issue is with
*all* commands: we want to complete file-names by default (i.e. the
absence of any other information).

Also I think it makes sense to allow file-name completion for make
arguments, since even if not listed explicitly in the Makefile, it's
likely that "make <file>" can be a valid&useful command.

> Setting pcomplete-default-completion-function to 'ignore might work (ie,
> "don't guess if you are not sure"). That could be done in
> pcomplete-completions-at-point, so it doesn't affect the normal
> operation of pcomplete.

Oh, wait.  When you said `pcomplete` before were you sometimes talking
about the specific `pcomplete` command rather than about the
pcomplete.el functionality in general?
Nowadays the `pcomplete` command should basically not be used any more
(the pcomplete functionality should be used from completion-at-point via
pcomplete-completions-at-point instead).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]