GNU bug report logs - #13056
24.2.50; sort-subr doc-string and manual

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Sun, 2 Dec 2012 17:48:01 UTC

Severity: minor

Found in version 24.2.50

Done: Chong Yidong <cyd <at> gnu.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 13056 in the body.
You can then email your comments to 13056 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#13056; Package emacs. (Sun, 02 Dec 2012 17:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 02 Dec 2012 17:48:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 24.2.50; sort-subr doc-string and manual
Date: Sun, 02 Dec 2012 18:45:17 +0100
The doc-string of `sort-subr' says that

  PREDICATE is the function to use to compare keys.  If keys are numbers,
  it defaults to `<', otherwise it defaults to `string<'.

and the Elisp manual says something similar.  This is slightly
misleading ever since this change

1993-02-07  Richard Stallman  (rms <at> mole.gnu.ai.mit.edu)

	* sort.el (sort-build-lists): Record the key as pair of positions;
	don't copy string from buffer.
	(sort-subr): Use compare-buffer-substrings.

If keys are not numbers, the two arguments passed to PREDICATE are
usually pairs of buffer positions and PREDICATE has to extract the keys
from these positions first.  Only if STARTKEYFUN was set to explicitly
return a string, the description above is valid and the keys passed to
PREDICATE can be used directly by `string<'.  In any case, it seems more
correct to say that PREDICATE defaults to `compare-buffer-substrings'.

martin, in GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
 of 2012-11-24 on MACHNO




Reply sent to Chong Yidong <cyd <at> gnu.org>:
You have taken responsibility. (Fri, 21 Dec 2012 03:19:02 GMT) Full text and rfc822 format available.

Notification sent to martin rudalics <rudalics <at> gmx.at>:
bug acknowledged by developer. (Fri, 21 Dec 2012 03:19:02 GMT) Full text and rfc822 format available.

Message #10 received at 13056-done <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 13056-done <at> debbugs.gnu.org
Subject: Re: bug#13056: 24.2.50; sort-subr doc-string and manual
Date: Fri, 21 Dec 2012 11:18:20 +0800
martin rudalics <rudalics <at> gmx.at> writes:

> The doc-string of `sort-subr' says that
>
>   PREDICATE is the function to use to compare keys.  If keys are numbers,
>   it defaults to `<', otherwise it defaults to `string<'.
>
> and the Elisp manual says something similar.  This is slightly
> misleading ever since this change
>
> 1993-02-07  Richard Stallman  (rms <at> mole.gnu.ai.mit.edu)
>
> 	* sort.el (sort-build-lists): Record the key as pair of positions;
> 	don't copy string from buffer.
> 	(sort-subr): Use compare-buffer-substrings.

Fixed, thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 Jan 2013 12:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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