diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-08-16 17:14:33 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-08-17 16:21:09 +0200 |
commit | a6412b96e72c32ee981f469a564c8d2155d575aa (patch) | |
tree | a2342cddcb5a3a9e1849363f3f03c78e900a7a29 /test | |
parent | d214dd67cd5910c4c9ecefdf879886c4d01b0c27 (diff) | |
download | emacs-a6412b96e72c32ee981f469a564c8d2155d575aa.tar.gz emacs-a6412b96e72c32ee981f469a564c8d2155d575aa.tar.bz2 emacs-a6412b96e72c32ee981f469a564c8d2155d575aa.zip |
Move dired-guess commands from dired-x to dired
* lisp/dired-x.el (dired-shell-command-history)
(dired-guess-shell-alist-default, dired-guess-default)
(dired-guess-shell-command): Move from here...
* lisp/dired-aux.el (dired-shell-command-history)
(dired-guess-shell-alist-default, dired-guess-default)
(dired-guess-shell-command): ...to here. (Bug#21981)
* lisp/dired-x.el (dired-guess-shell-gnutar)
(dired-guess-shell-gzip-quiet, dired-guess-shell-znew-switches)
(dired-guess-shell-case-fold-search, dired-guess-shell-alist-user):
Move from here...
* lisp/dired.el (dired-guess-shell-gnutar)
(dired-guess-shell-gzip-quiet, dired-guess-shell-znew-switches)
(dired-guess-shell-case-fold-search, dired-guess-shell-alist-user):
...to here. Change :group to dired-guess.
(dired-guess): New defgroup.
* test/lisp/dired-x-tests.el (dired-guess-default): Move from here...
* test/lisp/dired-aux-tests.el (dired-guess-default): ...to here.
* doc/misc/dired-x.texi (Features, Technical Details, Installation):
Delete any mention of shell command guessing.
(Shell Command Guessing): Move from here...
* doc/emacs/dired.texi (Shell Command Guessing): ...to here. Adapt to
better fit the Emacs Manual conventions.
* lisp/dired-aux.el (dired-do-shell-command): Doc fix to adjust for
above changes.
* etc/NEWS: Announce the above change.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/dired-aux-tests.el | 13 | ||||
-rw-r--r-- | test/lisp/dired-x-tests.el | 13 |
2 files changed, 13 insertions, 13 deletions
diff --git a/test/lisp/dired-aux-tests.el b/test/lisp/dired-aux-tests.el index 694deaae4c2..e70898ab74e 100644 --- a/test/lisp/dired-aux-tests.el +++ b/test/lisp/dired-aux-tests.el @@ -154,5 +154,18 @@ (should (string-match (regexp-quote command) (nth 0 lines))) (dired-test--check-highlighting (nth 0 lines) '(8)))) +(ert-deftest dired-guess-default () + (let ((dired-guess-shell-alist-user nil) + (dired-guess-shell-alist-default + '(("\\.png\\'" "display") + ("\\.gif\\'" "display" "xloadimage") + ("\\.gif\\'" "feh") + ("\\.jpe?g\\'" "xloadimage")))) + (should (equal (dired-guess-default '("/tmp/foo.png")) "display")) + (should (equal (dired-guess-default '("/tmp/foo.gif")) + '("display" "xloadimage" "feh"))) + (should (equal (dired-guess-default '("/tmp/foo.png" "/tmp/foo.txt")) + nil)))) + (provide 'dired-aux-tests) ;;; dired-aux-tests.el ends here diff --git a/test/lisp/dired-x-tests.el b/test/lisp/dired-x-tests.el index cec266b0ef9..7acaa3c1319 100644 --- a/test/lisp/dired-x-tests.el +++ b/test/lisp/dired-x-tests.el @@ -47,19 +47,6 @@ (should (equal all-but-c (sort (dired-get-marked-files 'local) #'string<)))))) -(ert-deftest dired-guess-default () - (let ((dired-guess-shell-alist-user nil) - (dired-guess-shell-alist-default - '(("\\.png\\'" "display") - ("\\.gif\\'" "display" "xloadimage") - ("\\.gif\\'" "feh") - ("\\.jpe?g\\'" "xloadimage")))) - (should (equal (dired-guess-default '("/tmp/foo.png")) "display")) - (should (equal (dired-guess-default '("/tmp/foo.gif")) - '("display" "xloadimage" "feh"))) - (should (equal (dired-guess-default '("/tmp/foo.png" "/tmp/foo.txt")) - nil)))) - (ert-deftest dired-x--string-to-number () (should (= (dired-x--string-to-number "2.4K") 2457.6)) (should (= (dired-x--string-to-number "2400") 2400)) |