GNU bug report logs - #44597
26.3; bibtex should allow reverse sorting

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> gnu.org>

Date: Thu, 12 Nov 2020 18:31:02 UTC

Severity: normal

Found in version 26.3

Done: Roland Winkler <winkler <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Roland Winkler" <winkler <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Francesco Potortì  <pot <at> gnu.org>, 44597 <at> debbugs.gnu.org
Subject: bug#44597: 26.3; bibtex should allow reverse sorting
Date: Sat, 12 Dec 2020 10:09:37 -0600
On Mon Dec 7 2020 Lars Ingebrigtsen wrote:
> I've added Roland to the Cc's; I'm guessing he'll have some
> comments.

I am not sure the proposed patch is the best way to go.  Suppose a
BibTeX file contains just several dozen entries per year of
publication.  Then sorting by date becomes meaningful only if the
date for each entry includes not only year and month, but also the
day.  I assume that's why the proposed patch also uses a `day'
field.  But such a field is not standard for BibTeX entries, and I
am not aware of any "default" mechanisms to support it.  I guess you
maintain such a field by hand in your BibTeX database.  I am not
sure it makes sense for BibTeX mode to go in such a direction with
hard-coded hand-crafted solutions, where likely the next user wants
to do things just a little different.

How about instead a new customizable sorting scheme, where the value
of bibtex-maintain-sorted-entries is a cons pair

  (INDEX-FUN . PREDICATE)

where INDEX-FUN is a user-defined function that replaces
bibtex-entry-index, and PREDICATE is a user-defined function that
replaces the default predicate bibtex-lessp.  Then users can define
custom sorting schemes to their liking, where PREDICATE sorts the
entries based on the return values of INDEX-FUN.




This bug report was last modified 2 years and 200 days ago.

Previous Next


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