unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Markus Rost <rost@ias.edu>
Cc: emacs-pretest-bug@gnu.org, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: completing-read case problem
Date: Mon, 15 Nov 2004 14:43:34 -0500	[thread overview]
Message-ID: <200411151943.iAFJhYL6009036@haifa.math.ias.edu> (raw)
In-Reply-To: <jwvu0rrgm27.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Mon, 15 Nov 2004 10:38:54 -0500)

[I suggest to keep this thread on emacs-devel.]

> > (let ((completion-ignore-case t))
> >   (completing-read "Give me ABC: "
> > 		   (list "abc")
> > 		   (lambda (string)
> > 		     (string= string "abc"))
> > 		   t
> > 		   ))
> 
> > With input "ABC" it returns "ABC", which I think is incorrect -- at
> > least it may lead to surprises in programs which assume that the
> > output of completing-read is always an exact member of TABLE,
> > restricted by PREDICATE.
> 
> Yes, we pretty much agreed to that in an earlier discussion this year.
> Nobody has stepped forward with a patch for it, tho.
> 

I guess you mean the discussion started with
<URL:http://lists.gnu.org/archive/html/emacs-devel/2003-12/msg00459.html>.

I think it would be definitely better to fix completing-read than to
make changes elsewhere in code using completing-read, but I can't do
that (I am not a C programmer).

The mentioned problem with "M-x customize-group Mouse" is rather
minor, and one could just leave it as it is.

One possibility for a change would be the patch below, but I don't
like it, and it would have to be applied also to
customize-group-other-window and perhaps also at other places in
cus-edit.el.

===Buffer *vc-diff*=========================================
*** cus-edit.el	02 Nov 2004 09:17:44 -0500	1.196
--- cus-edit.el	15 Nov 2004 14:32:55 -0500	
***************
*** 866,871 ****
--- 866,875 ----
  					  (or (get symbol 'custom-loads)
  					      (get symbol 'custom-group)))
  					t))))
+   ;; If we got the wrong case, give it another try.
+   (unless (or (get (intern group) 'custom-loads)
+ 	      (get (intern group) 'custom-group))
+     (setq group (downcase group)))
    (when (stringp group)
      (if (string-equal "" group)
  	(setq group 'emacs)
============================================================

  parent reply	other threads:[~2004-11-15 19:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200411101929.iAAJThfq007309@haifa.math.ias.edu>
     [not found] ` <E1CTDRk-00077r-Fr@fencepost.gnu.org>
     [not found]   ` <200411140703.iAE73Gd1019094@haifa.math.ias.edu>
2004-11-15 14:00     ` completing-read case problem Richard Stallman
2004-11-15 15:35       ` Lennart Borgman
2004-11-15 18:49         ` Kevin Rodgers
2004-11-15 20:19           ` Simon Josefsson
2004-11-15 22:06           ` Stefan Monnier
     [not found]     ` <jwvu0rrgm27.fsf-monnier+emacs@gnu.org>
2004-11-15 19:43       ` Markus Rost [this message]
2004-11-15 23:07         ` Luc Teirlinck
2004-11-16  2:52           ` Markus Rost
2004-11-21  1:10             ` Richard Stallman
2004-11-21  5:18               ` Markus Rost
2004-11-21 19:02                 ` Luc Teirlinck
2004-11-22 14:07                 ` Richard Stallman
2004-11-16  4:00 Markus Rost

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411151943.iAFJhYL6009036@haifa.math.ias.edu \
    --to=rost@ias.edu \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=rms@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).