emacs-devel
[Top][All Lists]
Advanced

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

Re: Completions and history


From: Ergus
Subject: Re: Completions and history
Date: Tue, 12 Apr 2022 18:59:58 +0200

On Tue, Apr 12, 2022 at 07:20:02PM +0300, Juri Linkov wrote:
I suppose that this has been discussed before... so is there a reason
why this has not been implemented? Should I open a feature request or is
someone already opened?

Indeed, this has been discussed recently in
https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00802.html
but no feature request was opened, since C-TAB is already taken by
file-cache-minibuffer-complete.

At least could we have documented how to enable this and then let the
user set it? Ivy users will find it comfortable in C-r to substitute the
Current isearch-backward, other may prefer something else. The default
binding may be agreed latter.

One problem is that completions are sorted alphabetically that
makes no sense for history items which are sorted chronologically.
So the first thing to do would be to add sorting keys in Completions
that will allow switching the order between alphabetical and unsorted
(history items are in chronological order, so unsorted should keep it)
that will change the value of 'completions-sort'.

A comment about this... completion-at-point-functions accept a list with
a format (START END COLLECTION . PROPS)

The PROPS can be any :completion-extra-properties plus predicate and
exclusive.. maybe the way to do this is to add a property :sort or
similar... Then on the other side we use that property to select the
sorting method... Does it makes sense?

Another question: should duplicate history items be retained
in the Completions window when history-delete-duplicates is nil?



reply via email to

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