mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
emacs: define prot-dired-count-marks command
This commit is contained in:
parent
2bbafcbe0f
commit
8e24cc6c14
|
|
@ -12754,6 +12754,16 @@ belong to the given subset of CONSEQUENCES.
|
|||
|
||||
;;;; General commands
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-dired-count-marks ()
|
||||
"Print message with the number of Dired marked files."
|
||||
(interactive nil dired-mode)
|
||||
(if-let* ((files (dired-get-marked-files))
|
||||
(length (length files))
|
||||
(_ (> length 1)))
|
||||
(message "%d files are marked" length)
|
||||
(user-error "No files found")))
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-dired-open-directory-externally ()
|
||||
"Open the current directory in an external file manager."
|
||||
|
|
|
|||
|
|
@ -39,6 +39,16 @@
|
|||
|
||||
;;;; General commands
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-dired-count-marks ()
|
||||
"Print message with the number of Dired marked files."
|
||||
(interactive nil dired-mode)
|
||||
(if-let* ((files (dired-get-marked-files))
|
||||
(length (length files))
|
||||
(_ (> length 1)))
|
||||
(message "%d files are marked" length)
|
||||
(user-error "No files found")))
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-dired-open-directory-externally ()
|
||||
"Open the current directory in an external file manager."
|
||||
|
|
|
|||
Loading…
Reference in a new issue