emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : [emacs bookmark.el] Sorting by last set


From: Manuel Giraud
Subject: Re: [External] : [emacs bookmark.el] Sorting by last set
Date: Wed, 01 Jun 2022 10:04:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)

Juri Linkov <juri@linkov.net> writes:

>> Thanks; pushed to Emacs 29 (with some whitespace and naming changes to
>> make it fit our conventions).
>
> I tried it out, but noticed that it writes unintelligible numbers
> in the bookmarks file, such as (last-modified 25239 1033 644055 97000).
> Wouldn't it be more user-friendly to write timestamps in a more
> recognizable format?  E.g. with ISO date: (last-modified "20220601").

Yes, I have used (current-time) output directly so it can be used with
`time-less-p'. If the bookmark file, needs to stay more or less human
readable I could add a format-time-string/parse-time-string dance.

But I have one question, it seems that `time-less-p' works with
`parse-time-string' outputs:

--8<---------------cut here---------------start------------->8---
(let ((past (current-time)))
  (sit-for 5)
  (time-less-p (parse-time-string (format-time-string "%FT%T%z" past))
               (parse-time-string (format-time-string "%FT%T%z" 
(current-time)))))
--8<---------------cut here---------------end--------------->8---

Is that true or is it pure luck?
-- 
Manuel Giraud



reply via email to

[Prev in Thread] Current Thread [Next in Thread]