emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Case-insensitive partial-completion bug]


From: Johan Bockgård
Subject: Re: address@hidden: Case-insensitive partial-completion bug]
Date: Fri, 02 Mar 2007 02:18:49 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

I hope the bug below will get fixed. I run into it quite frequently
when reading Info:

  emacs -Q -f partial-completion-mode -f info-emacs-manual

  `g mark RET' doesn't select and exit minibuffer.


On Mon, Nov 20 2006, Michael Ernst wrote:

>> The complaint was:
>> 
>>     I expected it to change "foo" to "Foo", because all possible
>>     completions begin with "Foo".  That's what it does if you don't enable
>>     partial-completion-mode.  But with partial-completion-mode enabled, it
>>     stays "foo" and Emacs displays the list of possible completions.
>> 
>> Michael Ernst wrote the patch which implemented this behavior.
>> 
>> Michael, why is it desirable for partial-completion mode to handle
>> this case differently from ordinary completion?
>
> Thanks for forwarding the bug report.  I'm aware of this problem, and I
> agree it should be fixed, but I haven't yet found time to correct it
> (though it remains on my to-do list).  I have noticed it once in the 6
> months I have been using the new code, and the new code corrects problems
> that I noticed much more frequently.
>
> My notes state that the problem is near the "same char (modulo case); no
> action" comment, and near
>
>                 ;; Retain capitalization of user input even if
>                 ;; completion-ignore-case is set.
>
> If the list `poss' has many possibilities with different capitalization,
> then we want to retain the capitalization as input by the user.  However,
> if they are all the same, we want to adjust the capitalization.
>
> Below my signature is a test case that illustrates the problem in a
> reproducible way.
>
>                     -Michael Ernst
>                      address@hidden
>
>
>
> (defun completion-test-4 (initial-input &optional ignore-case)
>   (let ((completion-ignore-case ignore-case))
>     (completing-read "Input: "
>                      '(("getMillis" . 1)
>                        ("getMillisToDecideToPopup" . 2)
>                        ("getMillisToPopup" . 3)
>                        ("getMillisecond" . 4))
>                      nil                ; no predicate, all answers acceptable
>                      t                  ; require match
>                      initial-input
>                      )))
>
> (partial-completion-mode 1)
> (setq PC-meta-flag t)
>
> (completion-test-4 "getmilli" t)
> ;; user types:  M-TAB    [normal completion]
> ;; result:  getMillis    [chooses the element that matches modulo case]
> ;; user types:  RET      [partial completion]
> ;; result:  getmillis    [problem:  all lower-case, second RET doesn't select]
>
> ;; Actually, it seems like a problem that normal completion chooses the
> ;; matching element immediately rather than giving a list of all
> ;; possibilities.  Is this a bug in normal completion?





reply via email to

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