From: Andreas Schwab <schwab@linux-m68k.org>
To: Juri Linkov <juri@jurta.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
Subject: Re: dired-do-touch (was: [PATCH] fix goto-line)
Date: Sat, 30 Jul 2011 11:54:01 +0200 [thread overview]
Message-ID: <m2hb64m6va.fsf@linux-m68k.org> (raw)
In-Reply-To: <87aabw16ls.fsf_-_@mail.jurta.org> (Juri Linkov's message of "Sat, 30 Jul 2011 12:17:17 +0300")
Juri Linkov <juri@jurta.org> writes:
>>> + (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
>
> In theory you are right. But in practice a 1-2 sec delay
> is not a problem.
Note that changing the timestamp to a specific value requires owner
rights, whereas setting it to the current time only requires write
access.
>> whereas surely what is wanted is the equivalent of
>>
>> touch file
>
> When `touch file' is really wanted then it's easy to type `! touch'.
> `dired-do-touch' was created for the convenience of changing
> the file's timestamp providing useful default values for editing.
An empty timestamp should mean running touch without time argument.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2011-07-30 9:54 UTC|newest]
Thread overview: 11+ 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 ` 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
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 ` Andreas Schwab [this message]
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
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=m2hb64m6va.fsf@linux-m68k.org \
--to=schwab@linux-m68k.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.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 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).