GNU bug report logs - #17559
`initials' does not complete underscore delimited input

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> hochschule-trier.de>

Date: Fri, 23 May 2014 14:49:02 UTC

Severity: wishlist

Found in version 24.3.50

Full log


Message #18 received at 17559 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Politz <politza <at> hochschule-trier.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 17559 <at> debbugs.gnu.org
Subject: Re: bug#17559: 24.3.50;
 Partial completion does not complete underscore delimited input
Date: Fri, 23 May 2014 20:19:14 +0200
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> severity 17559 wishlist

Would something like the following be sufficient ?

[vc.diff (text/x-diff, inline)]
=== modified file 'lisp/minibuffer.el'
*** lisp/minibuffer.el	2013-10-04 02:12:16 +0000
--- lisp/minibuffer.el	2014-05-23 18:14:44 +0000
***************
*** 3187,3193 ****
                  (string-match completion-pcm--delim-wild-regex str
                                (car bounds)))
        (if (zerop (car bounds))
!           (mapconcat 'string str "-")
          ;; If there's a boundary, it's trickier.  The main use-case
          ;; we consider here is file-name completion.  We'd like
          ;; to expand ~/eee to ~/e/e/e and /eee to /e/e/e.
--- 3187,3200 ----
                  (string-match completion-pcm--delim-wild-regex str
                                (car bounds)))
        (if (zerop (car bounds))
!           (let ((separator
!                  (or (completion-metadata-get
!                       (completion-metadata str table pred)
!                       'completion-initials-separator)
!                      (plist-get completion-extra-properties
!                                 :completion-initials-separator)
!                      "-")))
!             (mapconcat 'string str separator))
          ;; If there's a boundary, it's trickier.  The main use-case
          ;; we consider here is file-name completion.  We'd like
          ;; to expand ~/eee to ~/e/e/e and /eee to /e/e/e.

[Message part 3 (text/plain, inline)]
This appears to work, but I have little clue about the underlying
partial completion matching algorithm.

Andreas

This bug report was last modified 8 years and 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.