emacs-devel
[Top][All Lists]
Advanced

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

Re: minibuffer-completion-contents obsolete


From: Thierry Volpiatto
Subject: Re: minibuffer-completion-contents obsolete
Date: Sun, 21 Apr 2013 07:14:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Stefan,

Stefan Monnier <address@hidden> writes:

>> So my question was just: why did you made it obsolete ?
>
> Here's what I think happened:
> - before Emacs-22, completion was done on the whole minibuffer content,
>   regardless of the position of point.  So `minibuffer-content' returned
>   "what completion commands operate on".
> - Emacs-22 changed the completion behavior to ignore (and leave
>   untouched) any text after point.  So `minibuffer-completion-contents'
>   was introduced to return "what completion commands operate on".
> - Emacs-23 changed this again such that text after point can be taken
>   into account or can be ignored, depending on completion-styles (and
>   depending on choices made on a case-by-case basis by those styles).
>
> So, ever since Emacs-23, `minibuffer-completion-contents' returns
> something which is not really "what completion commands operate on",
> despite what its docstring says.

Thanks for explanations.

>> Anyway if you decide to make it obsolete, the warning that say to use
>> `minibuffer-contents' instead is wrong, they do (as described in doc)
>> two different things.
>
> AFAIK the only uses of `minibuffer-completion-contents' that are not
> somewhat broken are necessarily unrelated to minibuffer completion.
> IOW, the only uses I can think of that are not somewhat broken would
> have to basically use it as a way to get "the text before point".
> As for why they'd use this function rather than the usual primitives
> non-specific to the minibuffer...
>
> This said, I could only find a single use of this function in Emacs
> (both 23 and 24), so I doubt it's used very heavily in third
> party packages.
>
> Maybe I should remove the message to use `minibuffer-contents'
> instead, indeed.

Yes because at first we think something have also changed in
minibuffer-contents to fit minibuffer-completion-contents.

>>> What do you use minibuffer-completion-contents for?
>> I use it in helm and eldoc-eval.
>
> That says where you use it, but not what you use it for.

In helm it is used only in two places, one same as in eldoc-eval and one
to delete the pattern from point with C-u C-k (C-k delete
`minibuffer-contents', and C-u C-k `minibuffer-completion-contents')
but well, I can live without `minibuffer-completion-contents' :-)


Thanks.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



reply via email to

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