From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Manuel Giraud <manuel@ledu-giraud.fr>,
Stefan Monnier <monnier@iro.umontreal.ca>,
Karl Fogel <kfogel@red-bean.com>,
Drew Adams <drew.adams@oracle.com>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: [External] : [emacs bookmark.el] Sorting by last set
Date: Wed, 01 Jun 2022 15:45:54 +0200 [thread overview]
Message-ID: <87v8tkbip9.fsf@elite.giraud> (raw)
In-Reply-To: <878rqh5z2v.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 31 May 2022 20:36:24 +0200")
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Thanks; pushed to Emacs 29 (with some whitespace and naming changes to
> make it fit our conventions).
Sorry, here is two issues I found. The first is a typo in a
docstring. The second sorts bookmark entries without a last-modified
field at the end when `bookmark-sort-flag' is 'last-modified: I think it
would help transitioning.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-typo-in-bookmark.el.patch --]
[-- Type: text/x-patch, Size: 752 bytes --]
From e6fabc074c85d403e4644388af231c5db4fcc8dd Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Wed, 1 Jun 2022 14:43:58 +0200
Subject: [PATCH 1/2] typo in bookmark.el
---
lisp/bookmark.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 8e251e9de8..6f7dcc7f0e 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -120,7 +120,7 @@ bookmark-sort-flag
recently created ones come first, oldest ones come last).
`last-modified' means that bookmarks will be displayed sorted
-from most recently set to last recently set.
+from most recently set to least recently set.
Other values means that bookmarks will be displayed sorted by
bookmark name."
--
2.36.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-place-bookmarks-without-last-modified-at-the-end.patch --]
[-- Type: text/x-patch, Size: 1176 bytes --]
From d2601de9c8a3c7c9eeaa6547bdc6d1387fbbe78e Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Wed, 1 Jun 2022 15:30:19 +0200
Subject: [PATCH 2/2] place bookmarks without last-modified at the end
---
lisp/bookmark.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 6f7dcc7f0e..849303fac7 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -520,8 +520,11 @@ bookmark-maybe-sort-alist
(sort copy (lambda (x y) (string-lessp (car x) (car y)))))
((eq bookmark-sort-flag 'last-modified)
(sort copy (lambda (x y)
- (time-less-p (bookmark-get-last-modified y)
- (bookmark-get-last-modified x)))))
+ (let ((tx (bookmark-get-last-modified x))
+ (ty (bookmark-get-last-modified y)))
+ (cond ((null tx) nil)
+ ((null ty) t)
+ (t (time-less-p ty tx)))))))
(t copy))))
(defun bookmark-completing-read (prompt &optional default)
--
2.36.0
[-- Attachment #4: Type: text/plain, Size: 18 bytes --]
--
Manuel Giraud
next prev parent reply other threads:[~2022-06-01 13:45 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 11:34 [emacs bookmark.el] Sorting by last set Manuel Giraud
2022-05-24 14:41 ` [External] : " Drew Adams
2022-05-24 15:32 ` Manuel Giraud
2022-05-24 15:46 ` Lars Ingebrigtsen
2022-05-25 2:25 ` Karl Fogel
2022-05-25 5:05 ` Drew Adams
2022-05-25 8:04 ` Manuel Giraud
2022-05-25 14:01 ` Drew Adams
2022-05-25 13:18 ` Manuel Giraud
2022-05-25 14:01 ` Drew Adams
2022-05-25 15:25 ` Manuel Giraud
2022-05-25 20:17 ` Drew Adams
2022-05-26 19:41 ` Manuel Giraud
2022-05-26 4:09 ` Karl Fogel
2022-05-26 10:58 ` Lars Ingebrigtsen
2022-05-26 16:42 ` Manuel Giraud
2022-05-26 16:59 ` Stefan Monnier
2022-05-26 20:09 ` Manuel Giraud
2022-05-27 10:34 ` Lars Ingebrigtsen
2022-05-27 13:11 ` Manuel Giraud
2022-05-27 13:20 ` Lars Ingebrigtsen
2022-05-27 13:39 ` Manuel Giraud
2022-05-28 10:34 ` Lars Ingebrigtsen
2022-05-30 14:59 ` Manuel Giraud
2022-05-31 18:36 ` Lars Ingebrigtsen
2022-06-01 6:16 ` Juri Linkov
2022-06-01 8:04 ` Manuel Giraud
2022-06-01 12:18 ` Lars Ingebrigtsen
2022-06-01 12:38 ` Manuel Giraud
2022-06-01 12:08 ` Stefan Monnier
2022-06-01 14:24 ` Drew Adams
2022-06-01 13:45 ` Manuel Giraud [this message]
2022-06-01 15:32 ` Lars Ingebrigtsen
2022-06-01 15:56 ` Manuel Giraud
2022-06-01 15:58 ` Lars Ingebrigtsen
2022-06-04 5:33 ` Karl Fogel
2022-05-24 16:03 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2022-06-04 6:07 Karl Fogel
2022-06-04 14:36 ` Stefan Monnier
2022-06-04 16:25 ` Drew Adams
2022-06-05 16:16 ` Manuel Giraud
2022-06-05 17:33 ` Drew Adams
2022-06-05 20:53 ` Manuel Giraud
2022-06-05 21:12 ` Stefan Monnier
2022-06-06 0:39 ` Drew Adams
2022-06-07 15:55 ` Manuel Giraud
2022-06-08 11:51 ` Lars Ingebrigtsen
2022-06-06 0:39 ` Drew Adams
2022-06-05 17:53 ` Stefan Monnier
2022-06-07 19:49 ` Karl Fogel
2022-06-08 1:14 ` Drew Adams
2022-06-08 7:57 ` Manuel Giraud
2022-06-08 14:23 ` Drew Adams
2022-06-14 15:34 ` Manuel Giraud
2022-06-14 16:36 ` Drew Adams
2022-06-15 12:08 ` Lars Ingebrigtsen
2022-06-15 12:32 ` Manuel Giraud
2022-08-18 18:19 ` Karl Fogel
2022-08-31 11:39 ` Manuel Giraud
2022-09-01 1:45 ` Karl Fogel
2022-09-01 2:08 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8tkbip9.fsf@elite.giraud \
--to=manuel@ledu-giraud.fr \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=kfogel@red-bean.com \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.