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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: "Drew Adams" <drew.adams <at> oracle.com>
Subject: bug#1943 closed by Chong Yidong <cyd <at> stupidchicken.com> (Re: 
 23.0.60; doc string for substring: mention value is a copy, string is any 
 vector)
Date: Mon, 19 Jan 2009 15:20:03 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1943: 23.0.60; doc string for substring: mention value is a copy, string is any vector

It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.


-- 
1943: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1943
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.

[Message part 3 (message/rfc822, inline)]
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'
 




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.