From: Juri Linkov <juri@jurta.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] fix goto-line
Date: Fri, 29 Jul 2011 18:28:46 +0300 [thread overview]
Message-ID: <8762mlglnt.fsf@mail.jurta.org> (raw)
In-Reply-To: <CAAeL0SQNuT33+3V1pS2N7eOpyY4KqB39JyYHib+A3PWRUtKVjg@mail.gmail.com> (Juanma Barranquero's message of "Fri, 29 Jul 2011 13:22:31 +0200")
> There are improvements and not bug fixes, so please file this as a
> wishlist item for 24.2 (and do not forget to add the "patch" tag).
These are improvements, but changes in the default value of `dired-do-touch'
is a regression. I'd like to fix this regression with the following patch.
It restores the old pre-24 essential behavior, but still keeps the
requirement asked by the reporter of bug#6887 to use the current time.
More changes from http://thread.gmane.org/gmane.emacs.devel/81414/focus=82988
could be postponed to 24.2.
=== modified file 'lisp/dired-aux.el'
--- lisp/dired-aux.el 2011-07-25 08:23:29 +0000
+++ lisp/dired-aux.el 2011-07-29 15:27:45 +0000
@@ -227,20 +227,6 @@ (defun dired-files-attributes (dir)
(directory-files dir)))
\f
-(defun dired-touch-initial (files)
- "Create initial input value for `touch' command."
- ;; Nobody can explain what this version is supposed to do. (Bug#6887)
- ;; Also, the manual says it uses "the present time".
- ;;; (let (initial)
- ;;; (while files
- ;;; (let ((current (nth 5 (file-attributes (car files)))))
- ;;; (if (and initial (not (equal initial current)))
- ;;; (setq initial (current-time) files nil)
- ;;; (setq initial current))
- ;;; (setq files (cdr files))))
- ;;; (format-time-string "%Y%m%d%H%M.%S" initial)))
- (format-time-string "%Y%m%d%H%M.%S" (current-time)))
-
(defun dired-do-chxxx (attribute-name program op-symbol arg)
;; Change file attributes (mode, group, owner, timestamp) of marked files and
;; refresh their file lines.
@@ -249,11 +235,18 @@ (defun dired-do-chxxx (attribute-name pr
;; OP-SYMBOL is the type of operation (for use in dired-mark-pop-up).
;; ARG describes which files to use, as in dired-get-marked-files.
(let* ((files (dired-get-marked-files t arg))
+ (initial
+ (if (eq op-symbol 'touch)
+ (format-time-string "%Y%m%d%H%M.%S" (current-time))))
+ (default
+ (if (eq op-symbol 'touch)
+ (and (stringp (car files))
+ (format-time-string "%Y%m%d%H%M.%S"
+ (nth 5 (file-attributes (car files)))))))
(new-attribute
(dired-mark-read-string
(concat "Change " attribute-name " of %s to: ")
- (if (eq op-symbol 'touch) (dired-touch-initial files))
- op-symbol arg files))
+ initial op-symbol arg files default))
(operation (concat program " " new-attribute))
failures)
(setq failures
next prev parent reply other threads:[~2011-07-29 15:28 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 [this message]
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 ` 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=8762mlglnt.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.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.