From: Karl Fogel <kfogel@red-bean.com>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: Drew Adams <drew.adams@oracle.com>,
Lars Ingebrigtsen <larsi@gnus.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: [External] : [emacs bookmark.el] Sorting by last set
Date: Thu, 18 Aug 2022 13:19:50 -0500 [thread overview]
Message-ID: <87y1vl4do9.fsf@red-bean.com> (raw)
In-Reply-To: <878rpznts7.fsf@elite.giraud> (Manuel Giraud's message of "Tue, 14 Jun 2022 17:34:16 +0200")
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
On 14 Jun 2022, Manuel Giraud wrote:
>I hope it is not to late for this but I'd like to have this
>modification
>pushed. This changes the field name from 'last-modified to
>'modified
>(the symbol for `bookmark-sort-flag' is kept to 'last-modified).
>
>I think it make more sense since the "last" in 'last-modified
>refers to
>the order (ie. the most recently modified will be first).
>Afterward,
>I'd like to introduce a 'created field too.
Manuel, it looks like this change hasn't been pushed yet. I was
about to review it, but I noticed there was some commentary in the
thread following up to your post. Did you have a revised version
of the patch in response to any of the commentary, or should I
just review the original patch as you posted it on 14 June 2022?
I'll attach the patch below for convenience.
Best regards,
-Karl
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Change-last-modified-field-name-to-modified.patch --]
[-- Type: text/x-diff, Size: 3726 bytes --]
>From 7fe15765e2777d5e001558d6648c7d5f250d34bc Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Tue, 14 Jun 2022 17:22:04 +0200
Subject: [PATCH] Change 'last-modified field name to 'modified
* lisp/bookmark.el: change 'last-modified field name to 'modified
---
lisp/bookmark.el | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b0b54e52d8..64b8ee7f5e 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -469,14 +469,14 @@ bookmark-get-handler
(bookmark-prop-get bookmark-name-or-record 'handler))
-(defun bookmark-get-last-modified (bookmark-name-or-record)
- "Return the last-modified for BOOKMARK-NAME-OR-RECORD, or nil if none."
- (bookmark-prop-get bookmark-name-or-record 'last-modified))
+(defun bookmark-get-modified (bookmark-name-or-record)
+ "Return the modified for BOOKMARK-NAME-OR-RECORD, or nil if none."
+ (bookmark-prop-get bookmark-name-or-record 'modified))
-(defun bookmark-update-last-modified (bookmark-name-or-record)
- "Update the last-modified date of BOOKMARK-NAME-OR-RECORD to the current time."
- (bookmark-prop-set bookmark-name-or-record 'last-modified (current-time)))
+(defun bookmark-update-modified (bookmark-name-or-record)
+ "Update the modified date of BOOKMARK-NAME-OR-RECORD to the current time."
+ (bookmark-prop-set bookmark-name-or-record 'modified (current-time)))
(defvar bookmark-history nil
@@ -527,8 +527,8 @@ 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)
- (let ((tx (bookmark-get-last-modified x))
- (ty (bookmark-get-last-modified y)))
+ (let ((tx (bookmark-get-modified x))
+ (ty (bookmark-get-modified y)))
(cond ((null tx) nil)
((null ty) t)
(t (time-less-p ty tx)))))))
@@ -666,7 +666,7 @@ bookmark-make-record-default
(- (point) bookmark-search-size))
nil))))
(position . ,(or posn (point)))
- (last-modified . ,(current-time))))
+ (modified . ,(current-time))))
\f
;;; File format stuff
@@ -1076,7 +1076,7 @@ bookmark-send-edited-annotation
(from-bookmark-list bookmark--annotation-from-bookmark-list)
(old-buffer (current-buffer)))
(bookmark-set-annotation bookmark-name annotation)
- (bookmark-update-last-modified bookmark-name)
+ (bookmark-update-modified bookmark-name)
(setq bookmark-alist-modification-count
(1+ bookmark-alist-modification-count))
(message "Annotation updated for \"%s\"" bookmark-name)
@@ -1363,7 +1363,7 @@ bookmark-relocate
(format "Relocate %s to: " bookmark-name)
(file-name-directory bmrk-filename))))))
(bookmark-set-filename bookmark-name newloc)
- (bookmark-update-last-modified bookmark-name)
+ (bookmark-update-modified bookmark-name)
(setq bookmark-alist-modification-count
(1+ bookmark-alist-modification-count))
(if (bookmark-time-to-save-p)
@@ -1426,7 +1426,7 @@ bookmark-rename
nil
'bookmark-history))))
(bookmark-set-name old-name final-new-name)
- (bookmark-update-last-modified final-new-name)
+ (bookmark-update-modified final-new-name)
(setq bookmark-current-bookmark final-new-name)
(bookmark-bmenu-surreptitiously-rebuild-list)
(setq bookmark-alist-modification-count
--
2.36.1
next prev parent reply other threads:[~2022-08-18 18:19 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-04 6:07 [External] : [emacs bookmark.el] Sorting by last set 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 [this message]
2022-08-31 11:39 ` Manuel Giraud
2022-09-01 1:45 ` Karl Fogel
2022-09-01 2:08 ` Emanuel Berg
-- strict thread matches above, loose matches on Subject: below --
2022-05-24 11:34 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
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1vl4do9.fsf@red-bean.com \
--to=kfogel@red-bean.com \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=manuel@ledu-giraud.fr \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).