bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#17559: 24.3.50; Partial completion does not complete underscore deli


From: Andreas Politz
Subject: bug#17559: 24.3.50; Partial completion does not complete underscore delimited input
Date: Fri, 23 May 2014 20:19:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> severity 17559 wishlist

Would something like the following be sufficient ?

=== 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.

This appears to work, but I have little clue about the underlying
partial completion matching algorithm.

Andreas

reply via email to

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