all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: emacs-devel@gnu.org
Subject: Re: [cjm@pobox.com: Case-insensitive partial-completion bug]
Date: Fri, 02 Mar 2007 02:18:49 +0100	[thread overview]
Message-ID: <yoijslco4f46.fsf@gamma02.me.chalmers.se> (raw)
In-Reply-To: 17761.47567.438869.488325@manioc.csail.mit.edu


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
>                      mernst@alum.mit.edu
>
>
>
> (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?

  parent reply	other threads:[~2007-03-02  1:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13 20:15 [cjm@pobox.com: Case-insensitive partial-completion bug] Richard Stallman
2006-11-13 20:44 ` Markus Triska
2006-11-15  3:14   ` Richard Stallman
2006-11-20 14:21     ` Michael Ernst
2006-11-21  7:47       ` Richard Stallman
2006-11-21 14:20         ` Michael Ernst
2006-11-22 13:16           ` Richard Stallman
2007-03-02  1:18       ` Johan Bockgård [this message]
2007-03-03 22:13         ` Richard Stallman
2007-03-04 18:30           ` Chong Yidong

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=yoijslco4f46.fsf@gamma02.me.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    --cc=emacs-devel@gnu.org \
    /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.