GNU bug report logs -
#48456
Revert Dired after copy/rename
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sat, 15 May 2021 21:49:02 UTC
Severity: normal
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> 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)))))
This bug report was last modified 3 years and 358 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.