GNU bug report logs - #14743
24.3.50; doc string of `read-regexp'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 28 Jun 2013 23:05:02 UTC

Severity: minor

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14743 in the body.
You can then email your comments to 14743 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14743; Package emacs. (Fri, 28 Jun 2013 23:05:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 28 Jun 2013 23:05:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; doc string of `read-regexp'
Date: Fri, 28 Jun 2013 14:46:09 -0700 (PDT)
The name DEFAULT is used with two different meanings in the doc string
(wholePARAMETER or first element of cons-valued arg).  It seems, from
looking at the code, that that is OK, in the sense that the same
behavior applies to both meanings.

However, the doc should say what happens wrt the return value if DEFAULT
is nil and the user enters empty input.  The answer, it seems, is that
the empty string is returned.

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-06-27 on ODIEONE
Bzr revision: 113205 dgutov <at> yandex.ru-20130627095155-f1lv1c7xf99g1sss
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 CFLAGS=-O0 -g3 LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14743; Package emacs. (Sat, 29 Jun 2013 07:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 14743 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: 14743 <at> debbugs.gnu.org
Subject: RE: bug#14743: 24.3.50; doc string of `read-regexp'
Date: Sat, 29 Jun 2013 00:02:58 -0700 (PDT)
The PROMPT description is also not quite correct.

Suggestion:

"Read and return a regular expression as a string.
If PROMPT does not end with a colon and possibly whitespace then
append \": \" to it.

Optional argument DEFAULT is a string or a list of the form
\(DEFLT . SUGGESTIONS), where DEFLT is a string or nil.

The string DEFAULT or DEFLT is added to the prompt and is returned as
the default value if the user enters empty input.  The empty string is
returned if DEFAULT or DEFLT is nil and the user enters empty input.

SUGGESTIONS is a list of strings that can be inserted into the
minibuffer using `\\<minibuffer-local-map>\\[next-history-element]'.  The values supplied in SUGGESTIONS are
prepended to the list of standard suggestions, which include the tag
at point, the last isearch regexp, the last isearch string, and the
last replacement regexp.

Optional argument HISTORY is a symbol to use for the history list.
If nil then use `regexp-history'."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14743; Package emacs. (Sat, 29 Jun 2013 22:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 14743 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 14743 <at> debbugs.gnu.org
Subject: Re: bug#14743: 24.3.50; doc string of `read-regexp'
Date: Sun, 30 Jun 2013 01:20:02 +0300
> Optional argument DEFAULT is a string or a list of the form
> \(DEFLT . SUGGESTIONS), where DEFLT is a string or nil.

The name DEFLT is too obscure.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14743; Package emacs. (Sat, 29 Jun 2013 23:07:01 GMT) Full text and rfc822 format available.

Message #14 received at 14743 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 14743 <at> debbugs.gnu.org
Subject: RE: bug#14743: 24.3.50; doc string of `read-regexp'
Date: Sat, 29 Jun 2013 16:06:44 -0700 (PDT)
> > Optional argument DEFAULT is a string or a list of the form
> > \(DEFLT . SUGGESTIONS), where DEFLT is a string or nil.
> 
> The name DEFLT is too obscure.

OK.

For years we called even some very prominent command parameters DEF.
That can be confused with "def" as in "define" or "definition", but
it would probably be OK here: (DEF . SUGGESTIONS).

The parameter name should not be the same as its car.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14743; Package emacs. (Sat, 08 Feb 2014 06:42:01 GMT) Full text and rfc822 format available.

Message #17 received at 14743 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 14743 <at> debbugs.gnu.org
Subject: Re: bug#14743: 24.3.50; doc string of `read-regexp'
Date: Fri, 07 Feb 2014 22:40:02 -0800
Drew Adams <drew.adams <at> oracle.com> writes:

> The name DEFAULT is used with two different meanings in the doc string
> (wholePARAMETER or first element of cons-valued arg).  It seems, from
> looking at the code, that that is OK, in the sense that the same
> behavior applies to both meanings.

This seems to be fixed on the trunk.  It's now DEFAULTS and DEFAULT.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug closed, send any further explanations to 14743 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 08 Feb 2014 06:42:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14743; Package emacs. (Mon, 10 Feb 2014 04:34:02 GMT) Full text and rfc822 format available.

Message #22 received at 14743 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 14743 <at> debbugs.gnu.org
Subject: RE: bug#14743: 24.3.50; doc string of `read-regexp'
Date: Sun, 9 Feb 2014 20:33:39 -0800 (PST)
> This seems to be fixed on the trunk.  It's now DEFAULTS and DEFAULT.

Yes, it was fixed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 10 Mar 2014 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 164 days ago.

Previous Next


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