From: Paul Eggert <eggert@cs.ucla.edu>
To: Juri Linkov <juri@jurta.org>
Cc: Juanma Barranquero <lekktu@gmail.com>, emacs-devel@gnu.org
Subject: Re: [PATCH] fix goto-line
Date: Fri, 29 Jul 2011 09:45:13 -0700 [thread overview]
Message-ID: <4E32E399.8000402@cs.ucla.edu> (raw)
In-Reply-To: <8762mlglnt.fsf@mail.jurta.org>
On 07/29/11 08:28, Juri Linkov wrote:
> I'd like to fix this regression with the following patch.
Thanks, could you please open up a bug report for this
on debbugs.gnu.org? That'd be a better place to discuss
this anyway.
> + (if (eq op-symbol 'touch)
> + (format-time-string "%Y%m%d%H%M.%S" (current-time))))
I don't know what the overall problem is here, but I can
see two issues with this proposed patch. First, presumably it
invokes (current-time) at one point, and then, later,
uses that saved current-time to do the 'touch'. But that's
not quite right; it's the equivalent of the shell command
touch --date="$(date)" file
whereas surely what is wanted is the equivalent of
touch file
The latter command avoids some race conditions, because it
uses the time at the point of the 'touch', not at the point of
the invocation of 'date' (or of 'current-time').
The second issue is minor, and perhaps fixing the first issue
will make it irrelevant, but here it is anyway: the
"(current-time)" can be omitted in the above code, as it's the default
for that argument of format-time-string.
next prev parent reply other threads:[~2011-07-29 16:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 12:57 [PATCH] fix goto-line Jose E. Marchesi
2011-07-28 14:07 ` Juanma Barranquero
2011-07-28 17:38 ` bug#9163: " Eduard Wiebe
2011-07-28 17:38 ` Eduard Wiebe
2011-07-29 11:15 ` Juri Linkov
2011-07-29 11:22 ` Juanma Barranquero
2011-07-29 15:28 ` Juri Linkov
2011-07-29 16:45 ` Paul Eggert [this message]
2011-07-30 9:17 ` dired-do-touch (was: [PATCH] fix goto-line) Juri Linkov
2011-07-30 9:50 ` dired-do-touch Juri Linkov
2011-07-30 9:54 ` dired-do-touch (was: [PATCH] fix goto-line) Andreas Schwab
2011-07-30 11:01 ` dired-do-touch Juri Linkov
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=4E32E399.8000402@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
--cc=lekktu@gmail.com \
/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.