GNU bug report logs - #13687
24.3.50; `read-regexp' should provide regex for symbol at point as defaults

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Mon, 11 Feb 2013 06:30:02 UTC

Severity: wishlist

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 13687 <at> debbugs.gnu.org
Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el (read-regexp): Let-bind `default' to the first
Date: Wed, 06 Mar 2013 23:33:08 +0530
Juri Linkov <juri <at> jurta.org> writes:

>> The question was one of how `read-regexp' should behave?
>>
>> If (car DEFAULTS) is nil should it offer (car SUGGESTIONS) as a default
>> or offer an empty string for default.
>
> As bug#13805 indicates, `read-regexp' should return an empty string
> when the caller specifies that (car DEFAULTS) is nil.

I think I overlooked the bug number in your commit.  Otherwise, I
wouldn't have triggered this discussion in first place.  Sorry.

>
> This is like what `read-from-minibuffer' does.  But note that
> `read-from-minibuffer' is even more strict, and doesn't return
> the default value even if it's specified, i.e. typing RET
> after evaluating
>
> (read-from-minibuffer "Prompt: " nil nil nil nil "default")
>
> returns an empty string instead of the default value.
> This is because its arg DEFAULT-VALUE acts more like
> a suggestion available for M-n whose values should not be
> returned for empty input.




This bug report was last modified 12 years and 68 days ago.

Previous Next


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