emacs-devel
[Top][All Lists]
Advanced

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

Re: AW: Re: [Emacs-diffs] master d3233b4: Make filecache use extended co


From: Stefan Monnier
Subject: Re: AW: Re: [Emacs-diffs] master d3233b4: Make filecache use extended completion
Date: Tue, 07 Nov 2017 12:19:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 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
> <address@hidden> </div><div>Datum:05.11.2017  16:05  (GMT+01:00)
> </div><div>An: address@hidden </div><div>Cc: Andreas Politz
> <address@hidden> </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





reply via email to

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