GNU bug report logs -
#25942
26.0.50; dired-mark-extension prepend '.' to suffix if not present
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Fri, 3 Mar 2017 03:41:01 UTC
Severity: wishlist
Tags: patch
Found in version 26.0.50
Done: Tino Calancha <tino.calancha <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 25942 <at> debbugs.gnu.org (full text, mbox):
> emacs -Q /tmp
>
> (require 'dired-x)
> (require 'ert)
> ;; Evaluate following sexp:
> (let ((dirs '("Public" "Music"))
> (files '(".bashrc" "bar.c" "foo.c"))
> (dir (make-temp-file "Bug25942" 'dir)))
> (unwind-protect
> (progn
> (dolist (d dirs)
> (make-directory (expand-file-name d dir)))
> (dolist (f files)
> (write-region nil nil (expand-file-name f dir)))
> (dired dir)
> (dired-mark-extension "c")
> (should (= 2 (length (dired-get-marked-files)))))
> (delete-directory dir 'recursive)))
>
> IMO, in this example looks better if just those files ending with
> '.c' are marked i.e., to not mark 'Public' or 'Music'.
Is this a backward-compatible change? If not, then maybe better
prepend ‘.’ only to the default value for interactive uses? So users
will get the right result when using ‘M-x dired-mark-extension RET RET’.
But for the programmatic uses it's the responsibility of the caller to
supply the right suffix in ‘(dired-mark-extension ".c")’
This bug report was last modified 8 years and 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.