From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: AW: Re: [Emacs-diffs] master d3233b4: Make filecache use extended completion
Date: Tue, 07 Nov 2017 12:19:40 -0500 [thread overview]
Message-ID: <jwv1slat3d3.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 1uomdcbnbfdy7ri3rgxmixwk.1510063436659@email.android.com
> You seem pretty sure, that it isn't.
Well, I wasn't. So, I just setup file-cache and did a few tests to confirm.
I pushed a corresponding patch to master.
Stefan
> <div>-------- Ursprüngliche Nachricht --------</div><div>Von: Stefan Monnier
> <monnier@IRO.UMontreal.CA> </div><div>Datum:05.11.2017 16:05 (GMT+01:00)
> </div><div>An: emacs-devel@gnu.org </div><div>Cc: Andreas Politz
> <politza@hochschule-trier.de> </div><div>Betreff: Re: [Emacs-diffs] master
> d3233b4: Make filecache use extended completion </div><div>
> </div>> + (let* ((completion-list (completion-all-completions
>> + newstring file-cache-alist nil newpoint))
>> + (base-size (cdr (last completion-list))))
>> + (when base-size
>> + (setcdr (last completion-list) nil))
>> + (if (> (length completion-list) 1)
>> + (progn
>> + (delete-region (- (point-max) (length string)) (point-max))
>> + (save-excursion (insert newstring))
>> + (forward-char newpoint)
>> + ;; Add our own setup function to the Completions Buffer
>> + (let ((completion-setup-hook
>> + (append completion-setup-hook
>> + (list 'file-cache-completion-setup-function))))
>> + (with-output-to-temp-buffer file-cache-completions-buffer
>> + (display-completion-list
>> + (completion-hilit-commonality completion-list newpoint)))))
> IIRC completion-all-completions already returns hilited strings (and
> done with more care than what completion-hilit-commonality can do).
> So is this completion-hilit-commonality call still beneficial?
> Stefan
prev parent reply other threads:[~2017-11-07 17:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 14:03 AW: Re: [Emacs-diffs] master d3233b4: Make filecache use extended completion Andreas Politz
2017-11-07 17:19 ` Stefan Monnier [this message]
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=jwv1slat3d3.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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.