[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dired: how to mark with other character but *
From: |
Michael Heerdegen |
Subject: |
Re: Dired: how to mark with other character but * |
Date: |
Sun, 31 Jan 2021 22:30:03 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Jean Louis <bugs@gnu.support> writes:
> I would like to use this specific workflow in Dired like following:
> [...]
As far as I know there is nothing built-in that matches exactly what you
are looking for.
Using different marker chars can be very useful, but it's not that
convenient. Personally, I have implemented a "secondary" mark. What I
sometimes miss is the ability to use multiple marks per file.
Anyway, maybe you would like something like this:
#+begin_src emacs-lisp
(defun my-dired-with-marker-prefix-command (char)
"Prefix command temporarily changing marker char."
(interactive "cMarker char for next command: ")
(let ((old-dired-marker-char dired-marker-char)
(used-once nil))
(setq dired-marker-char char)
(letrec ((f (lambda ()
(if (not used-once)
(setq used-once t)
(setq dired-marker-char old-dired-marker-char)
(remove-hook 'post-command-hook f 'local)))))
(add-hook 'post-command-hook f nil 'local))))
#+end_src
A different approach is use stored sets of marked files. Again, there
is no built-in solution for this (apart from the neglected "virtual
dired" maybe). AFAIR, dired+ supports this, maybe also other packages.
It's also relatively simple to setup registers for that purpose.
Regards,
Michael.
Re: Dired: how to mark with other character but *, Eli Zaretskii, 2021/01/31
Re: Dired: how to mark with other character but *,
Michael Heerdegen <=