all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: emacs-devel@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: master da4e5f6: Simplify use of timestamps
Date: Sat, 15 Sep 2018 12:46:17 -0400	[thread overview]
Message-ID: <tco9cyvhd2.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <20180914003239.5E7A8209FC@vcs0.savannah.gnu.org> (Paul Eggert's message of "Thu, 13 Sep 2018 20:32:38 -0400 (EDT)")

Paul Eggert wrote:

> branch: master
> commit da4e5f668582e1f047b6bd5259a1a4f92b5461b6
[...]
> --- a/lisp/calendar/icalendar.el
> +++ b/lisp/calendar/icalendar.el
> @@ -1016,9 +1016,7 @@ current iCalendar object, as a string.  Increase
>        (setq icalendar--uid-count (1+ icalendar--uid-count))
>        (setq uid (replace-regexp-in-string
>                   "%t"
> -                 (format "%d%d%d" (car (current-time))
> -                         (cadr (current-time))
> -                         (car (cddr (current-time))))
> +                 (format-time-string "%s%N")
>                   uid t t))

This causes test icalendar--create-uid to fail.
(BTW, make -j8 check takes 22 seconds here, so not a big burden to run
after making a change.)

> --- a/lisp/gnus/nnmaildir.el
> +++ b/lisp/gnus/nnmaildir.el
> @@ -764,7 +764,7 @@ This variable is set by `nnmaildir-request-article'.")
>  
>  (defun nnmaildir--scan (gname scan-msgs groups _method srv-dir srv-ls)
>    (catch 'return
> -    (let ((36h-ago (- (car (current-time)) 2))
> +    (let ((36h-ago (- (float-time) 129600))
>  	  absdir nndir tdir ndir cdir nattr cattr isnew pgname read-only ls
>  	  files num dir flist group x)
>        (setq absdir (nnmaildir--srvgrp-dir srv-dir gname)
> @@ -801,7 +801,7 @@ This variable is set by `nnmaildir-request-article'.")
>  	  (throw 'return nil))
>  	(dolist (file (funcall ls tdir 'full "\\`[^.]" 'nosort))
>  	  (setq x (file-attributes file))
> -	  (if (or (> (cadr x) 1) (< (car (nth 4 x)) 36h-ago))
> +	  (if (or (> (cadr x) 1) (time-less-p (nth 4 x) 36h-ago))
>  	      (delete-file file))))
>        (or scan-msgs
>  	  isnew
> @@ -1463,9 +1463,7 @@ This variable is set by `nnmaildir-request-article'.")
>        (unless (string-equal nnmaildir--delivery-time file)
>  	(setq nnmaildir--delivery-time file
>  	      nnmaildir--delivery-count 0))
> -      (when (and (consp (cdr time))
> -		 (consp (cddr time)))
> -	(setq file (concat file "M" (number-to-string (caddr time)))))
> +      (setq file (concat file (format-time-string "M%6N" time)))
>        (setq file (concat file nnmaildir--delivery-pid)
>  	    file (concat file "Q" (number-to-string nnmaildir--delivery-count))
>  	    file (concat file "." (nnmaildir--system-name))

I haven't looked at this in any detail, so this comment could be
rubbish, but if this causes a change in the on-disk file names Gnus uses
for maildir, that could be bad, no? (Eg running a Gnus-with-new-maildir
on a pre-existing maildir store might not find the same files as
Gnus-with-old-maildir.)



       reply	other threads:[~2018-09-15 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180914003237.10512.3041@vcs0.savannah.gnu.org>
     [not found] ` <20180914003239.5E7A8209FC@vcs0.savannah.gnu.org>
2018-09-15 16:46   ` Glenn Morris [this message]
2018-09-15 22:05     ` master da4e5f6: Simplify use of timestamps Paul Eggert

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=tco9cyvhd2.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /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.