[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix goto-line
From: |
Paul Eggert |
Subject: |
Re: [PATCH] fix goto-line |
Date: |
Fri, 29 Jul 2011 09:45:13 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
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.
- [PATCH] fix goto-line, Jose E. Marchesi, 2011/07/28
- Re: [PATCH] fix goto-line, Juanma Barranquero, 2011/07/28
- Re: [PATCH] fix goto-line, Eduard Wiebe, 2011/07/28
- Re: [PATCH] fix goto-line, Juri Linkov, 2011/07/29
- Re: [PATCH] fix goto-line, Juanma Barranquero, 2011/07/29
- Re: [PATCH] fix goto-line, Juri Linkov, 2011/07/29
- Re: [PATCH] fix goto-line,
Paul Eggert <=
- Re: dired-do-touch (was: [PATCH] fix goto-line), Juri Linkov, 2011/07/30
- Re: dired-do-touch, Juri Linkov, 2011/07/30
- Re: dired-do-touch (was: [PATCH] fix goto-line), Andreas Schwab, 2011/07/30
- Re: dired-do-touch, Juri Linkov, 2011/07/30