From unknown Sat Jun 21 03:00:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#16937 <16937@debbugs.gnu.org> To: bug#16937 <16937@debbugs.gnu.org> Subject: Status: Proposed feature (with patch): sort on multipart keys with sort-regexp-fields Reply-To: bug#16937 <16937@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:00:33 +0000 retitle 16937 Proposed feature (with patch): sort on multipart keys with so= rt-regexp-fields reassign 16937 emacs submitter 16937 Eric Roode severity 16937 wishlist tag 16937 patch wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 04 12:02:25 2014 Received: (at submit) by debbugs.gnu.org; 4 Mar 2014 17:02:25 +0000 Received: from localhost ([127.0.0.1]:50540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKsjY-0007wJ-02 for submit@debbugs.gnu.org; Tue, 04 Mar 2014 12:02:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56969) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKsZx-0007du-7i for submit@debbugs.gnu.org; Tue, 04 Mar 2014 11:52:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKsZu-0005Vl-Si for submit@debbugs.gnu.org; Tue, 04 Mar 2014 11:52:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKsZu-0005Vh-Q3 for submit@debbugs.gnu.org; Tue, 04 Mar 2014 11:52:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKsZt-00011a-6D for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 11:52:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKsZr-0005VE-Hb for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 11:52:25 -0500 Received: from mail-qa0-x233.google.com ([2607:f8b0:400d:c00::233]:64169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKsZr-0005V6-Ah for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 11:52:23 -0500 Received: by mail-qa0-f51.google.com with SMTP id cm18so2837547qab.38 for ; Tue, 04 Mar 2014 08:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=+GbX1bydRhKcryTtKY54joXmJ/ralr29aIeHKsKlng0=; b=ghxkL59mzcclUE1TZ48C8fLsxtiaJvAwpW9hmdjKQxKZl+NFR3OhpmZSbl0y4ExbEC ATsk6M5/pzseHl7Hu5p2a4UX3712BzCuVUcZlKhBOIl5709F6PBDTl/bhWsIQbq/gbXo kBOF7lB926831CAw45k9nPcerSde+Mrg+uCL1WlbLzSGw/TxskQHs9Nu8Tly0261X02z lrDraouY0MGKKzDYEswTVGhJHxWLN8tr2Tewz/0zYzSUk6b37na3gBa5y4BE/sotcZal aROF3Yl7pGMRpvzDeZvYkyeBuMUbjDVhlyJwZEM3de4Ph4LQp+10IV2kqS4LEYgGd3Qt nDVg== MIME-Version: 1.0 X-Received: by 10.224.167.80 with SMTP id p16mr889968qay.62.1393951941232; Tue, 04 Mar 2014 08:52:21 -0800 (PST) Received: by 10.140.93.136 with HTTP; Tue, 4 Mar 2014 08:52:21 -0800 (PST) Date: Tue, 4 Mar 2014 11:52:21 -0500 X-Google-Sender-Auth: sAmMw8zWIBB91zsADCkMj4X-5nI Message-ID: Subject: Proposed feature (with patch): sort on multipart keys with sort-regexp-fields From: Eric Roode To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e0149cf8a4a8d8704f3caba16 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 04 Mar 2014 12:02:22 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e0149cf8a4a8d8704f3caba16 Content-Type: text/plain; charset=UTF-8 ***Abstract: To `sort-regexp-fields', add the ability to sort records by multi-part (non-contiguous) keys. ***Description: `sort-regexp-fields' can sort entire records, or a subset of each record specified by a secondary regexp or by a single backreference to the record as matched by the record-defining regexp. This fairly minor patch gives the user (or caller) the additional ability to sort by multiple backreferences; e.g., \3\1\4 It does this by storing a list of backreference numbers in the `key-regexp' parameter to `sort-regexp-fields'. Then in the `startkeyfun' function passed to `sort-subr', those backreference strings are concatenated (separated by a NUL character) to form the sort key. ***ChangeLog: 2014-03-04 Eric Roode * lisp/sort.el (sort-regexp-fields): add multi-key sorting * doc/lispref/text.texi (sort-regexp-fields): document multi-key sorting ***Patch 1 of 2 (lisp/sort.el): *** /c/usr/emacs-24.3/lisp/sort.el 2013-08-07 12:18:53.540292800 -0400 --- /ejr/dev/emacs/sort.el 2014-03-04 10:59:02.280611700 -0500 *************** KEY-REGEXP specifies the part of each re *** 417,422 **** --- 417,424 ---- RECORD-REGEXP) to be used for sorting. If it is \"\\\\digit\", use the digit'th \"\\\\(...\\\\)\" match field specified by RECORD-REGEXP. + If it is a sequence of such match fields: \"\\\\digit\\\\digit...\", + use a concatenation of those backreferences, in that order. If it is \"\\\\&\", use the whole record. Otherwise, KEY-REGEXP should be a regular expression with which to search within the record. If a match for KEY-REGEXP is not *************** sRegexp specifying key within record: \n *** 438,444 **** (cond ((or (equal key-regexp "") (equal key-regexp "\\&")) (setq key-regexp 0)) ((string-match "\\`\\\\[1-9]\\'" key-regexp) ! (setq key-regexp (- (aref key-regexp 1) ?0)))) (save-excursion (save-restriction (narrow-to-region beg end) --- 440,452 ---- (cond ((or (equal key-regexp "") (equal key-regexp "\\&")) (setq key-regexp 0)) ((string-match "\\`\\\\[1-9]\\'" key-regexp) ! (setq key-regexp (- (aref key-regexp 1) ?0))) ! ((string-match "\\`\\(\\\\[1-9]\\)+\\'" key-regexp) ! (let ((st 1) (en (length key-regexp)) mlist) ! (while (< st en) ! (push (- (aref key-regexp st) ?0) mlist) ! (setq st (+ 2 st))) ! (setq key-regexp (nreverse mlist))))) (save-excursion (save-restriction (narrow-to-region beg end) *************** sRegexp specifying key within record: \n *** 453,470 **** (function (lambda () (goto-char sort-regexp-record-end))) (function (lambda () ! (let ((n 0)) ! (cond ((numberp key-regexp) ! (setq n key-regexp)) ! ((re-search-forward ! key-regexp sort-regexp-record-end t) ! (setq n 0)) ! (t (throw 'key nil))) ! (condition-case () ! (cons (match-beginning n) ! (match-end n)) ! ;; if there was no such register ! (error (throw 'key nil))))))))))) (defvar sort-columns-subprocess t) --- 461,482 ---- (function (lambda () (goto-char sort-regexp-record-end))) (function (lambda () ! (if (listp key-regexp) ! (mapconcat ! (function (lambda (ix) (match-string ix))) ! key-regexp "\0") ! (let ((n 0)) ! (cond ((numberp key-regexp) ! (setq n key-regexp)) ! ((re-search-forward ! key-regexp sort-regexp-record-end t) ! (setq n 0)) ! (t (throw 'key nil))) ! (condition-case () ! (cons (match-beginning n) ! (match-end n)) ! ;; if there was no such register ! (error (throw 'key nil)))))))))))) (defvar sort-columns-subprocess t) ***Patch 2 of 2 (doc/lispref/text.texi): *** text.texi~ 2013-02-18 20:17:07.000000000 -0500 --- text.texi 2014-03-04 11:38:48.136225100 -0500 *************** on its own. *** 1988,1999 **** If @var{key-regexp} is: @table @asis @item @samp{\@var{digit}} then the text matched by the @var{digit}th @samp{\(...\)} parenthesis grouping in @var{record-regexp} is the sort key. ! @item @samp{\&} ! then the whole record is the sort key. @item a regular expression then @code{sort-regexp-fields} searches for a match for the regular --- 1988,2003 ---- If @var{key-regexp} is: @table @asis + @item @samp{\&} + then the whole record is the sort key. + @item @samp{\@var{digit}} then the text matched by the @var{digit}th @samp{\(...\)} parenthesis grouping in @var{record-regexp} is the sort key. ! @item a series of such backreferences: @samp{\@var{digit}\@var{digit}...} ! then the multiple subexpressions specified by the respective parenthesis ! groupings in @var{record-regexp} are combined to be the sort key. @item a regular expression then @code{sort-regexp-fields} searches for a match for the regular --089e0149cf8a4a8d8704f3caba16 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
***Abstract:

=C2=A0 =C2=A0 To `sort-regexp-fields&#= 39;, add the ability to sort records by
multi-part (non-contiguous) keys= .

***Description:

=C2=A0 =C2=A0 `sort-regexp-fields' can = sort entire records, or a subset of each
record specified by a secondary regexp or by a single backreference to
t= he record as matched by the record-defining regexp.

=C2=A0 =C2=A0 Th= is fairly minor patch gives the user (or caller) the additional
ability = to sort by multiple backreferences; e.g., \3\1\4

=C2=A0 =C2=A0 It does this by storing a list of backreference numbers i= n the
`key-regexp' parameter to `sort-regexp-fields'. Then in th= e
`startkeyfun' function passed to `sort-subr', those backrefere= nce
strings are concatenated (separated by a NUL character) to form the
sort= key.

***ChangeLog:

2014-03-04 =C2=A0Eric Roode =C2=A0<sdn.gnuem@mailnull.com>
* lisp/sort.el (sort-regexp-fields): add multi-key sorting
* doc/lispref/text.texi (sort-regexp-fields): document multi-key sorting
***Patch 1 of 2 (lisp/sort.el):

*** /c/usr/emacs-24.3/lisp/sort= .el 2013-08-07 12:18:53.540292800 -0400
--- /ejr/dev/emacs/sort.el 2014-= 03-04 10:59:02.280611700 -0500
*************** KEY-REGEXP specifies the part of each re
*** 417,422 ***= *
--- 417,424 ----
=C2=A0 =C2=A0 RECORD-REGEXP) to be used for sortin= g.
=C2=A0 =C2=A0 If it is \"\\\\digit\", use the digit'th = \"\\\\(...\\\\)\"
=C2=A0 =C2=A0 match field specified by RECORD-REGEXP.
+ =C2=A0 If it is = a sequence of such match fields: \"\\\\digit\\\\digit...\",
+ = =C2=A0 use a concatenation of those backreferences, in that order.
=C2= =A0 =C2=A0 If it is \"\\\\&\", use the whole record.
=C2=A0 =C2=A0 Otherwise, KEY-REGEXP should be a regular expression with whi= ch
=C2=A0 =C2=A0 to search within the record. =C2=A0If a match for KEY-R= EGEXP is not
*************** sRegexp specifying key within record: \n*** 438,444 ****
=C2=A0 =C2=A0 (cond ((or (equal key-regexp "") (equal key-regexp = "\\&"))
=C2=A0 (setq key-regexp 0))
=C2=A0 ((string-mat= ch "\\`\\\\[1-9]\\'" key-regexp)
! (setq key-regexp (- (ar= ef key-regexp 1) ?0))))
=C2=A0 =C2=A0 (save-excursion
=C2=A0 =C2=A0 =C2=A0 (save-restriction
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 (narrow-to-region beg end)
--- 440,452 ----<= br>=C2=A0 =C2=A0 (cond ((or (equal key-regexp "") (equal key-rege= xp "\\&"))
=C2=A0 (setq key-regexp 0))
=C2=A0 ((string-match "\\`\\\\[1-9]\\'" key-regexp)
! (set= q key-regexp (- (aref key-regexp 1) ?0)))
! ((string-match "\\`\\(\= \\\[1-9]\\)+\\'" key-regexp)
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(let ((st 1) (en (length key-regexp)) mlist)
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(while (< st en)
! =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(push (- (aref key-regexp st) ?0) = mlist)
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq st (+ 2 s= t)))
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq key-regexp (nrever= se mlist)))))
=C2=A0 =C2=A0 (save-excursion
=C2=A0 =C2=A0 =C2=A0 (sav= e-restriction
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (narrow-to-region beg end)
*************** s= Regexp specifying key within record: \n
*** 453,470 ****
=C2=A0 =C2= =A0 (function (lambda ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (goto-char sort-reg= exp-record-end)))
=C2=A0 =C2=A0 (function (lambda ()
! =C2=A0 =C2=A0 =C2=A0 (let ((n 0))
! (cond ((numberp key-regexp)
! (= setq n key-regexp))
! =C2=A0 =C2=A0 =C2=A0 ((re-search-forward
! =C2= =A0key-regexp sort-regexp-record-end t)
! (setq n 0))
! =C2=A0 =C2=A0= =C2=A0 (t (throw 'key nil)))
! (condition-case ()
! =C2=A0 =C2=A0 (cons (match-beginning n)
! =C2=A0 (match-end n))
! = =C2=A0 ;; if there was no such register
! =C2=A0 (error (throw 'key = nil)))))))))))
=C2=A0
=C2=A0
=C2=A0 (defvar sort-columns-subproce= ss t)
--- 461,482 ----
=C2=A0 =C2=A0 (function (lambda ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (goto-char sort-regexp-record-end)))
=C2=A0 = =C2=A0 (function (lambda ()
! =C2=A0 =C2=A0 =C2=A0 (if (listp key-regexp= )
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(mapconcat
! = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (function (lambda (ix)= (match-string ix)))
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 key-regexp "\0&qu= ot;)
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((n 0))
! = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cond ((numberp key-reg= exp)
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (setq n key-regexp))
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((= re-search-forward
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0key-regexp sort-regexp-record-end t)
! =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq n = 0))
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(t (throw 'key nil)))
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(condition-case ()
!= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cons (ma= tch-beginning n)
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(match-end n))
! =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; if there was no such register
! =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(error (throw &#= 39;key nil))))))))))))
=C2=A0
=C2=A0
=C2=A0 (defvar sort-columns-= subprocess t)

***Patch 2 of 2 (doc/lispref/text.texi):

*** te= xt.texi~ =C2=A02013-02-18 20:17:07.000000000 -0500
--- text.texi =C2=A0 2014-03-04 11:38:48.136225100 -0500
***************= on its own.
*** 1988,1999 ****
If @var{key-regexp} is:

@table= @asis
@item @samp{\@var{digit}}
then the text matched by the @var{di= git}th @samp{\(...\)} parenthesis
grouping in @var{record-regexp} is the sort key.

! @item @samp{\&= ;}
! then the whole record is the sort key.

@item a regular expre= ssion
then @code{sort-regexp-fields} searches for a match for the regula= r
--- 1988,2003 ----
If @var{key-regexp} is:

@table @asis
+ @ite= m @samp{\&}
+ then the whole record is the sort key.
+
@item @= samp{\@var{digit}}
then the text matched by the @var{digit}th @samp{\(..= .\)} parenthesis
grouping in @var{record-regexp} is the sort key.

! @item a series of= such backreferences: @samp{\@var{digit}\@var{digit}...}
! then the mult= iple subexpressions specified by the respective parenthesis
! groupings = in @var{record-regexp} are combined to be the sort key.

@item a regular expression
then @code{sort-regexp-fields} searches f= or a match for the regular
--089e0149cf8a4a8d8704f3caba16-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 10:44:08 2019 Received: (at 16937) by debbugs.gnu.org; 26 Jun 2019 14:44:08 +0000 Received: from localhost ([127.0.0.1]:36704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg99b-0007R8-VO for submit@debbugs.gnu.org; Wed, 26 Jun 2019 10:44:08 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg99Z-0007Qz-VC for 16937@debbugs.gnu.org; Wed, 26 Jun 2019 10:44:06 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hg99W-0000qO-3B; Wed, 26 Jun 2019 16:44:04 +0200 From: Lars Ingebrigtsen To: Eric Roode Subject: Re: bug#16937: Proposed feature (with patch): sort on multipart keys with sort-regexp-fields References: Date: Wed, 26 Jun 2019 16:44:01 +0200 In-Reply-To: (Eric Roode's message of "Tue, 4 Mar 2014 11:52:21 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eric Roode writes: > It does this by storing a list of backreference numbers in the > `key-regexp' parameter to `sort-regexp-fields'. Then in the > `startkeyfun' function passed to `sort-subr', those backreference > str [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16937 Cc: 16937@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Roode writes: > It does this by storing a list of backreference numbers in the > `key-regexp' parameter to `sort-regexp-fields'. Then in the > `startkeyfun' function passed to `sort-subr', those backreference > strings are concatenated (separated by a NUL character) to form the > sort key. Sorry for taking so long to get back to you on this, but I don't think this is an ideal design for such a thing, and since it's unfortunately been five years since this was proposed, I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 10:44:13 2019 Received: (at control) by debbugs.gnu.org; 26 Jun 2019 14:44:13 +0000 Received: from localhost ([127.0.0.1]:36707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg99h-0007RS-9Z for submit@debbugs.gnu.org; Wed, 26 Jun 2019 10:44:13 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg99f-0007RH-26 for control@debbugs.gnu.org; Wed, 26 Jun 2019 10:44:11 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hg99c-0000qU-Fl for control@debbugs.gnu.org; Wed, 26 Jun 2019 16:44:10 +0200 Date: Wed, 26 Jun 2019 16:44:08 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #16937 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 16937 wontfix close 16937 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 16937 wontfix close 16937 quit From unknown Sat Jun 21 03:00:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Jul 2019 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator