From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Juri Linkov <juri@linkov.net>
Cc: 48456@debbugs.gnu.org, Tino Calancha <tino.calancha@gmail.com>
Subject: bug#48456: Revert Dired after copy/rename
Date: Mon, 24 May 2021 12:04:14 +0100 [thread overview]
Message-ID: <87fsycmlzl.fsf@tcd.ie> (raw)
In-Reply-To: <87v97amq2s.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 23 May 2021 00:06:23 +0300")
Juri Linkov <juri@linkov.net> writes:
>> Test dired-test-bug30624 condition:
>> (ert-test-failed
>> ((should
>> (dired-do-create-files 'copy 'dired-copy-file "Copy" nil))
>> :form
>> (dired-do-create-files copy dired-copy-file "Copy" nil)
>> :value nil))
>>
>> Should the 'should' be removed? AFAICT the return value of
>> dired-do-create-files is unspecified (and unused).
>
> It's hard to guess how important the return value was.
> It seems the return value of dired-do-create-files
> via dired-create-files and via dired-move-to-filename
> was the position of the beginning of the filename,
> or nil if none found.
>
> If it should be preserved, then dired-do-create-files
> could be changed to something like this:
>
> (prog1 (dired-create-files
> ...
> (when (or (eq dired-do-revert-buffer t)
> ...
>
> Otherwise, the 'should' should be replaced with
>
> diff --git a/test/lisp/dired-aux-tests.el b/test/lisp/dired-aux-tests.el
> index 7f1743f88d..1fd14e72aa 100644
> --- a/test/lisp/dired-aux-tests.el
> +++ b/test/lisp/dired-aux-tests.el
> @@ -109,7 +109,8 @@ dired-test-bug30624
> (progn
> (dired-revert)
> (dired-mark-files-regexp "bug30624_file")
> - (should (dired-do-create-files 'copy 'dired-copy-file "Copy" nil)))
> + (dired-do-create-files 'copy 'dired-copy-file "Copy" nil)
> + (should (dired-move-to-filename)))
> (delete-directory target-dir 'recursive)
> (mapc #'delete-file `(,file1 ,file2))
> (kill-buffer buf)))))
Either (as well as ignoring the unspecified return value) sounds fine to
me. CCing Tino for comment.
Thanks,
--
Basil
prev parent reply other threads:[~2021-05-24 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 21:45 bug#48456: Revert Dired after copy/rename Juri Linkov
2021-05-19 16:18 ` Juri Linkov
2021-05-21 18:32 ` Juri Linkov
2021-05-21 20:08 ` Basil L. Contovounesios
2021-05-22 21:06 ` Juri Linkov
2021-05-24 11:04 ` Basil L. Contovounesios [this message]
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=87fsycmlzl.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=48456@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=tino.calancha@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.