GNU bug report logs - #1943
23.0.60; doc string for substring: mention value is a copy, string is any vector

Previous Next

Package: emacs;

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

Date: Sat, 17 Jan 2009 23:45:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 1943 in the body.
You can then email your comments to 1943 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1943; Package emacs. (Sat, 17 Jan 2009 23:45: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 Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 17 Jan 2009 23:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: 23.0.60; doc string for substring: mention value is a copy, string is any vector
Date: Sat, 17 Jan 2009 15:35:11 -0800
The doc string for function `substring' could be made clearer.

1. Like the Elisp manual entry for `substring', mention that the
value returned does not share with the input STRING object. That is, a
copy of the substring is returned, not the substring itself.
 
2. State more clearly that STRING can be any kind of vector, not just
a vector of characters.

3. FROM and TO do not "start" at 0.  It is indexing that starts at 0.
   Better to speak of "zero-based indexing".
 
Something like this:
 
  "Return a new string whose characters are a substring of STRING.
STRING can be any kind of vector; elements need not be characters.
Indexing of STRING is zero-based.  The substring starts at index
FROM and ends before index TO.  If TO is nil, then the substring
runs to the end of STRING.  If either FROM or TO is negative,
then STRING is indexed backward, from its end."
 

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2009-01-04 on
 LENNART-69DE564 Windowing system distributor `Microsoft Corp.',
 version 5.1.2600 configured using `configure --with-gcc (3.4)
 --no-opt --cflags -Ic:/g/include -fno-crossjumping'
 





Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Mon, 19 Jan 2009 15:20:03 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Mon, 19 Jan 2009 15:20:03 GMT) Full text and rfc822 format available.

Message #10 received at 1943-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 1943-done <at> debbugs.gnu.org
Subject: Re: 23.0.60; doc string for substring: mention value is a copy, string is any vector
Date: Mon, 19 Jan 2009 10:14:34 -0500
> The doc string for function `substring' could be made clearer.

I've rewritten it.  Thanks for the report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 16 Feb 2009 15:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 129 days ago.

Previous Next


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