all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@hochschule-trier.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
Subject: AW: Re: [Emacs-diffs] master d3233b4: Make filecache use extended completion
Date: Tue, 07 Nov 2017 15:03:56 +0100	[thread overview]
Message-ID: <1uomdcbnbfdy7ri3rgxmixwk.1510063436659@email.android.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

You seem pretty sure, that it isn't. 

Ap

<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


[-- Attachment #2: Type: text/html, Size: 3556 bytes --]

             reply	other threads:[~2017-11-07 14:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 14:03 Andreas Politz [this message]
2017-11-07 17:19 ` AW: Re: [Emacs-diffs] master d3233b4: Make filecache use extended completion Stefan Monnier

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=1uomdcbnbfdy7ri3rgxmixwk.1510063436659@email.android.com \
    --to=politza@hochschule-trier.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.