* Dired: how to mark with other character but *
@ 2021-01-31 6:18 Jean Louis
2021-01-31 6:23 ` Jean Louis
` (3 more replies)
0 siblings, 4 replies; 26+ messages in thread
From: Jean Louis @ 2021-01-31 6:18 UTC (permalink / raw)
To: Help GNU Emacs
I would like to use this specific workflow in Dired like following:
- I am reviewing videos, so I have to use in Dired either ! or & to
review a video
- I wish to mark specific videos for later referencing
- if I mark it with `m' then the next invocation of ! or & will
operate on marked files. Right now I am memorizing which videos are
to be marked, and not use Emacs to help me
- if ! operates only on files marked as * then I could as a solution
mark files with some other character, let us say V but I wish to
know how to do it
- Later, those files marked with V character I could replace to *
character to operate on such videos, that I know how to do from the
manual
What I do not find in the manual is how to mark files with some other
character. That is what would make my above envisioned workflow
useful.
Jean
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:18 Dired: how to mark with other character but * Jean Louis
@ 2021-01-31 6:23 ` Jean Louis
2021-01-31 6:43 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 6:53 ` Marcin Borkowski
` (2 subsequent siblings)
3 siblings, 1 reply; 26+ messages in thread
From: Jean Louis @ 2021-01-31 6:23 UTC (permalink / raw)
To: help-gnu-emacs
I have solved it now by making new function based on
(dired-flag-file-deletion ARG &optional INTERACTIVE):
(defun rcd-dired-mark-view-file (arg &optional interactive)
"In Dired, mark the current line's file for viewing.
If the region is active, mark all files in the region.
Otherwise, with a prefix arg, mark files on the next ARG lines.
If on a subdir headerline, mark all its files except `.' and `..'.
If the region is active in Transient Mark mode, mark all files
in the active region."
(interactive (list current-prefix-arg t))
(let ((dired-marker-char 86))
(dired-mark arg interactive)))
(define-key dired-mode-map "\\" 'rcd-dired-mark-view-file)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:23 ` Jean Louis
@ 2021-01-31 6:43 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 7:29 ` Jean Louis
0 siblings, 1 reply; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-01-31 6:43 UTC (permalink / raw)
To: help-gnu-emacs
Jean Louis wrote:
> I have solved it now by making new function based on
> (dired-flag-file-deletion ARG &optional INTERACTIVE):
>
> (defun rcd-dired-mark-view-file (arg &optional interactive)
> "In Dired, mark the current line's file for viewing.
> If the region is active, mark all files in the region.
> Otherwise, with a prefix arg, mark files on the next ARG lines.
>
> If on a subdir headerline, mark all its files except `.' and `..'.
> If the region is active in Transient Mark mode, mark all files
> in the active region."
> (interactive (list current-prefix-arg t))
> (let ((dired-marker-char 86))
> (dired-mark arg interactive)))
Yeah, but... isn't this built-in somewhere already?
86 = ?V BTW, maybe more clear to use that in this case...
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:18 Dired: how to mark with other character but * Jean Louis
2021-01-31 6:23 ` Jean Louis
@ 2021-01-31 6:53 ` Marcin Borkowski
2021-01-31 7:23 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 7:34 ` Jean Louis
2021-01-31 14:47 ` Eli Zaretskii
2021-01-31 21:30 ` Michael Heerdegen
3 siblings, 2 replies; 26+ messages in thread
From: Marcin Borkowski @ 2021-01-31 6:53 UTC (permalink / raw)
To: Jean Louis; +Cc: Help GNU Emacs
From the manual:
‘* c OLD-MARKCHAR NEW-MARKCHAR’
Replace all marks that use the character OLD-MARKCHAR with marks
that use the character NEW-MARKCHAR (‘dired-change-marks’). This
command is the primary way to create or use marks other than ‘*’ or
‘D’. The arguments are single characters—do not use <RET> to
terminate them.
(and yes, it is not easy to find unless you know what you're looking
for).
Hth,
mb
On 2021-01-31, at 07:18, Jean Louis <bugs@gnu.support> wrote:
> I would like to use this specific workflow in Dired like following:
>
> - I am reviewing videos, so I have to use in Dired either ! or & to
> review a video
>
> - I wish to mark specific videos for later referencing
>
> - if I mark it with `m' then the next invocation of ! or & will
> operate on marked files. Right now I am memorizing which videos are
> to be marked, and not use Emacs to help me
>
> - if ! operates only on files marked as * then I could as a solution
> mark files with some other character, let us say V but I wish to
> know how to do it
>
> - Later, those files marked with V character I could replace to *
> character to operate on such videos, that I know how to do from the
> manual
>
> What I do not find in the manual is how to mark files with some other
> character. That is what would make my above envisioned workflow
> useful.
>
> Jean
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:53 ` Marcin Borkowski
@ 2021-01-31 7:23 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 7:36 ` Jean Louis
2021-02-01 16:35 ` [External] : " Drew Adams
2021-01-31 7:34 ` Jean Louis
1 sibling, 2 replies; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-01-31 7:23 UTC (permalink / raw)
To: help-gnu-emacs
Marcin Borkowski wrote:
> From the manual:
>
> ‘* c OLD-MARKCHAR NEW-MARKCHAR’ Replace all marks that use
> the character OLD-MARKCHAR with marks that use the
> character NEW-MARKCHAR (‘dired-change-marks’).
> This command is the primary way to create or use marks
> other than ‘*’ or ‘D’. The arguments are single
> characters—do not use <RET> to terminate them.
>
> (and yes, it is not easy to find unless you know what you're
> looking for).
Still, sounds complicated with all the replace and change
stuff - what's the command to just mark the file at point with
an arbitrary char?
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:43 ` moasenwood--- via Users list for the GNU Emacs text editor
@ 2021-01-31 7:29 ` Jean Louis
0 siblings, 0 replies; 26+ messages in thread
From: Jean Louis @ 2021-01-31 7:29 UTC (permalink / raw)
To: help-gnu-emacs
* moasenwood--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-01-31 09:45]:
> Yeah, but... isn't this built-in somewhere already?
I was thinkin it is built-in, I cannot find it.
> 86 = ?V BTW, maybe more clear to use that in this case...
Good idea for visibility.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:53 ` Marcin Borkowski
2021-01-31 7:23 ` moasenwood--- via Users list for the GNU Emacs text editor
@ 2021-01-31 7:34 ` Jean Louis
2021-01-31 8:20 ` Marcin Borkowski
1 sibling, 1 reply; 26+ messages in thread
From: Jean Louis @ 2021-01-31 7:34 UTC (permalink / raw)
To: Help GNU Emacs
* Marcin Borkowski <mbork@mbork.pl> [2021-01-31 09:53]:
> From the manual:
>
> ‘* c OLD-MARKCHAR NEW-MARKCHAR’
> Replace all marks that use the character OLD-MARKCHAR with marks
> that use the character NEW-MARKCHAR (‘dired-change-marks’). This
> command is the primary way to create or use marks other than ‘*’ or
> ‘D’. The arguments are single characters—do not use <RET> to
> terminate them.
>
> (and yes, it is not easy to find unless you know what you're looking
> for).
I found that, but it just replaces marks. It does not mark. This one I
use after marking.
You know when you mark with `m' then if I wish to invoke action like
viewing a video then it is invoked on all marked items. So I cannot
view the unmarked video which is what I need.
Workflow is to mark videos for later, but also be able to view new
videos. If I use * to mark then viewing videos is applied on files
marked with * so I cannot view the unmarked video which is
intended. The video is marked after review. That is why I have to mark
the file with some other character that is not considered as file
marked for action by Dired.
It sounds more complicated than it is and I maybe do not express it
perfect. But that workflow of selecting files after review appears to
me very common.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 7:23 ` moasenwood--- via Users list for the GNU Emacs text editor
@ 2021-01-31 7:36 ` Jean Louis
2021-01-31 7:46 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-02-01 16:35 ` [External] : " Drew Adams
1 sibling, 1 reply; 26+ messages in thread
From: Jean Louis @ 2021-01-31 7:36 UTC (permalink / raw)
To: help-gnu-emacs
* moasenwood--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-01-31 10:24]:
> Marcin Borkowski wrote:
>
> > From the manual:
> >
> > ‘* c OLD-MARKCHAR NEW-MARKCHAR’ Replace all marks that use
> > the character OLD-MARKCHAR with marks that use the
> > character NEW-MARKCHAR (‘dired-change-marks’).
> > This command is the primary way to create or use marks
> > other than ‘*’ or ‘D’. The arguments are single
> > characters—do not use <RET> to terminate them.
> >
> > (and yes, it is not easy to find unless you know what you're
> > looking for).
>
> Still, sounds complicated with all the replace and change
> stuff - what's the command to just mark the file at point with
> an arbitrary char?
That is exactly what I wanted to find out.
First I was thinking it will work with {C-u 1 m} to mark with `1' for
example. Then I could have at least 0-9 characters, it would be more
than enough.
But anyway, all those key bindings are too complex. It is best making
the function like I have made and binding it to one key for faster
work.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 7:36 ` Jean Louis
@ 2021-01-31 7:46 ` moasenwood--- via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-01-31 7:46 UTC (permalink / raw)
To: help-gnu-emacs
Jean Louis wrote:
> But anyway, all those key bindings are too complex. It is
> best making the function like I have made and binding it to
> one key for faster work.
Yes, if you have time, write a function that accepts a char as
an argument and an optional n for how many files.
Because then one can either write very simple defuns to call
that or one can even use only keys and lambdas, with different
keys for different chars...
Another alternative to call it directly (and interactively)
and input what mark is desired!
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 7:34 ` Jean Louis
@ 2021-01-31 8:20 ` Marcin Borkowski
2021-01-31 9:09 ` Jean Louis
0 siblings, 1 reply; 26+ messages in thread
From: Marcin Borkowski @ 2021-01-31 8:20 UTC (permalink / raw)
To: Jean Louis; +Cc: Help GNU Emacs
On 2021-01-31, at 08:34, Jean Louis <bugs@gnu.support> wrote:
> * Marcin Borkowski <mbork@mbork.pl> [2021-01-31 09:53]:
>> From the manual:
>>
>> ‘* c OLD-MARKCHAR NEW-MARKCHAR’
>> Replace all marks that use the character OLD-MARKCHAR with marks
>> that use the character NEW-MARKCHAR (‘dired-change-marks’). This
>> command is the primary way to create or use marks other than ‘*’ or
>> ‘D’. The arguments are single characters—do not use <RET> to
>> terminate them.
>>
>> (and yes, it is not easy to find unless you know what you're looking
>> for).
>
> I found that, but it just replaces marks. It does not mark. This one I
> use after marking.
>
> You know when you mark with `m' then if I wish to invoke action like
> viewing a video then it is invoked on all marked items. So I cannot
> view the unmarked video which is what I need.
>
> Workflow is to mark videos for later, but also be able to view new
> videos. If I use * to mark then viewing videos is applied on files
> marked with * so I cannot view the unmarked video which is
> intended. The video is marked after review. That is why I have to mark
> the file with some other character that is not considered as file
> marked for action by Dired.
>
> It sounds more complicated than it is and I maybe do not express it
> perfect. But that workflow of selecting files after review appears to
> me very common.
Agreed. I think `dired-mark' should ask for a character when provided
with `C-u' (without an actual number) - as of now, it just marks 4 files
- which is obvious, see this:
(dired-repeat-over-lines
(prefix-numeric-value arg)
but I don't think many people use that feature (and if anyone does, they
can say C-u 4 m or something).
I'd probably file a bug report with this request. Or even prepare
a patch myself (though I have to sort out my copyright papers since I've
changed my job and I suspect I'd have to do something about that).
Best,
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 8:20 ` Marcin Borkowski
@ 2021-01-31 9:09 ` Jean Louis
2021-01-31 9:26 ` moasenwood--- via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 26+ messages in thread
From: Jean Louis @ 2021-01-31 9:09 UTC (permalink / raw)
To: Help GNU Emacs
* Marcin Borkowski <mbork@mbork.pl> [2021-01-31 11:20]:
>
> On 2021-01-31, at 08:34, Jean Louis <bugs@gnu.support> wrote:
>
> > * Marcin Borkowski <mbork@mbork.pl> [2021-01-31 09:53]:
> >> From the manual:
> >>
> >> ‘* c OLD-MARKCHAR NEW-MARKCHAR’
> >> Replace all marks that use the character OLD-MARKCHAR with marks
> >> that use the character NEW-MARKCHAR (‘dired-change-marks’). This
> >> command is the primary way to create or use marks other than ‘*’ or
> >> ‘D’. The arguments are single characters—do not use <RET> to
> >> terminate them.
> >>
> >> (and yes, it is not easy to find unless you know what you're looking
> >> for).
> >
> > I found that, but it just replaces marks. It does not mark. This one I
> > use after marking.
> >
> > You know when you mark with `m' then if I wish to invoke action like
> > viewing a video then it is invoked on all marked items. So I cannot
> > view the unmarked video which is what I need.
> >
> > Workflow is to mark videos for later, but also be able to view new
> > videos. If I use * to mark then viewing videos is applied on files
> > marked with * so I cannot view the unmarked video which is
> > intended. The video is marked after review. That is why I have to mark
> > the file with some other character that is not considered as file
> > marked for action by Dired.
> >
> > It sounds more complicated than it is and I maybe do not express it
> > perfect. But that workflow of selecting files after review appears to
> > me very common.
>
> Agreed. I think `dired-mark' should ask for a character when provided
> with `C-u' (without an actual number) - as of now, it just marks 4 files
> - which is obvious, see this:
>
> (dired-repeat-over-lines
> (prefix-numeric-value arg)
>
> but I don't think many people use that feature (and if anyone does, they
> can say C-u 4 m or something).
>
> I'd probably file a bug report with this request. Or even prepare
> a patch myself (though I have to sort out my copyright papers since I've
> changed my job and I suspect I'd have to do something about that).
I think that my idea is not as good as it would collide with the
existing behavior.
You could maybe just introduce a function where user can define the
key for the function. The function could then accept the prefix
argument and then ask the user for the character. In the next
invocation it would remember the same character or change it when
asked by prefix argument.
Then the function could be bound to single key. Not double key like
C-something, rather something like `\'.
Then if user invokes:
C-u \ - it would ask for the character and mark the file by using that character.
\ - it would mark the file by using already set character.
By using one single key it becomes useful in Dired. Not by using
multiple keys.
Your function need not have any key defined, users could define on
which key to put it.
Jean
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 9:09 ` Jean Louis
@ 2021-01-31 9:26 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 9:34 ` moasenwood--- via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-01-31 9:26 UTC (permalink / raw)
To: help-gnu-emacs
Jean Louis wrote:
> Your function need not have any key defined, users could
> define on which key to put it.
Check out this solution/interface to another problem.
This function has a state, that can change, but uses
properties so there is no global variable.
You use it by invoking it (I have i
(defun pad-to-col (&optional set-new-col)
(interactive "p")
(let*((plist (symbol-plist #'pad-to-col))
(prop 'pad-col)
(pad-col (or (plist-get plist prop) 0))
(beg-col (or (current-column) 4)) )
(if (and set-new-col (= 4 set-new-col))
(progn
(plist-put plist prop beg-col)
(message "pad col set: %s" beg-col) )
(let ((step (- pad-col beg-col)))
(when (> step 0)
(insert (make-string step ?\s))
(forward-line 1)
(forward-char beg-col) )))))
https://dataswamp.org/~incal/emacs-init/align-new.el
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 9:26 ` moasenwood--- via Users list for the GNU Emacs text editor
@ 2021-01-31 9:34 ` moasenwood--- via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-01-31 9:34 UTC (permalink / raw)
To: help-gnu-emacs
> Your function need not have any key defined, users could
> define on which key to put it.
Check out this solution/interface to another problem.
This function has a state, that can change, but it uses
properties so there is no global variable.
You use it by invoking it (I have it `C-c j'), if you want to
set a new column to which text should be aligned, you just
move there and do `C-u C-c j', this changes the state so the
next time it is invoked that column is the reference...
Pretty cool, if I may...
Did anyone else do that or do I get to name it?
Nah, probably many people did it...
But it is still cool! :)
(defun pad-to-col (&optional set-new-col)
(interactive "p")
(let*((plist (symbol-plist #'pad-to-col))
(prop 'pad-col)
(pad-col (or (plist-get plist prop) 0))
(beg-col (or (current-column) 4)) )
(if (and set-new-col (= 4 set-new-col))
(progn
(plist-put plist prop beg-col)
(message "pad col set: %s" beg-col) )
(let ((step (- pad-col beg-col)))
(when (> step 0)
(insert (make-string step ?\s))
(forward-line 1)
(forward-char beg-col) )))))
https://dataswamp.org/~incal/emacs-init/align-new.el
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:18 Dired: how to mark with other character but * Jean Louis
2021-01-31 6:23 ` Jean Louis
2021-01-31 6:53 ` Marcin Borkowski
@ 2021-01-31 14:47 ` Eli Zaretskii
2021-02-01 2:25 ` Jean Louis
2021-01-31 21:30 ` Michael Heerdegen
3 siblings, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2021-01-31 14:47 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 31 Jan 2021 07:18:03 +0100
> From: Jean Louis <bugs@gnu.support>
>
> - if I mark it with `m' then the next invocation of ! or & will
> operate on marked files.
Not if you invoke ! with a prefix argument.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 6:18 Dired: how to mark with other character but * Jean Louis
` (2 preceding siblings ...)
2021-01-31 14:47 ` Eli Zaretskii
@ 2021-01-31 21:30 ` Michael Heerdegen
2021-01-31 21:37 ` moasenwood--- via Users list for the GNU Emacs text editor
3 siblings, 1 reply; 26+ messages in thread
From: Michael Heerdegen @ 2021-01-31 21:30 UTC (permalink / raw)
To: help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 21:30 ` Michael Heerdegen
@ 2021-01-31 21:37 ` moasenwood--- via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-01-31 21:37 UTC (permalink / raw)
To: help-gnu-emacs
Michael Heerdegen wrote:
>> 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.
Unbelievably they didn't do it not the least for their
own purposes!
It seems like such a natural and basic thing.
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Dired: how to mark with other character but *
2021-01-31 14:47 ` Eli Zaretskii
@ 2021-02-01 2:25 ` Jean Louis
0 siblings, 0 replies; 26+ messages in thread
From: Jean Louis @ 2021-02-01 2:25 UTC (permalink / raw)
To: help-gnu-emacs
* Eli Zaretskii <eliz@gnu.org> [2021-01-31 17:48]:
> > Date: Sun, 31 Jan 2021 07:18:03 +0100
> > From: Jean Louis <bugs@gnu.support>
> >
> > - if I mark it with `m' then the next invocation of ! or & will
> > operate on marked files.
>
> Not if you invoke ! with a prefix argument.
That is useful!
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [External] : Re: Dired: how to mark with other character but *
2021-01-31 7:23 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 7:36 ` Jean Louis
@ 2021-02-01 16:35 ` Drew Adams
2021-02-01 17:09 ` Drew Adams
1 sibling, 1 reply; 26+ messages in thread
From: Drew Adams @ 2021-02-01 16:35 UTC (permalink / raw)
To: Emanuel Berg; +Cc: Help-Gnu-Emacs (help-gnu-emacs@gnu.org)
> > ‘* c OLD-MARKCHAR NEW-MARKCHAR’ Replace all marks that use
> > the character OLD-MARKCHAR with marks that use the
> > character NEW-MARKCHAR (‘dired-change-marks’).
> > This command is the primary way to create or use marks
> > other than ‘*’ or ‘D’. The arguments are single
> > characters—do not use <RET> to terminate them.
> >
> > (and yes, it is not easy to find unless you know what you're
> > looking for).
>
> Still, sounds complicated with all the replace and change
> stuff - what's the command to just mark the file at point with
> an arbitrary char?
There isn't one. But you could define one.
___
Note, BTW, that `* c' will let you change ANY
"mark" char, including just a space (no mark).
IOW, you can change (all) UNmarked lines to any
mark you like using `* c SPC CHAR', where SPC
is a space char and CHAR is any char you like.
___
This too is very helpful, IMO:
,----
| M-DEL (translated from <M-backspace>) runs the command
| dired-unmark-all-files (found in dired-mode-map), which is an
| interactive compiled Lisp function in ‘dired.el’.
|
| It is bound to M-DEL, * ?.
|
| (dired-unmark-all-files MARK &optional ARG)
|
| Remove a specific mark (or any mark) from every file.
| After this command, type the mark character to remove,
| or type RET to remove all marks.
| With prefix arg, query for each marked file.
| Type C-h at that time for help.
`----
I use that all the time, but usually with just
`M-DEL RET', to remove all marks.
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [External] : Re: Dired: how to mark with other character but *
2021-02-01 16:35 ` [External] : " Drew Adams
@ 2021-02-01 17:09 ` Drew Adams
2021-02-01 17:24 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 26+ messages in thread
From: Drew Adams @ 2021-02-01 17:09 UTC (permalink / raw)
To: Drew Adams, Emanuel Berg; +Cc: Help-Gnu-Emacs (help-gnu-emacs@gnu.org)
> There isn't one. But you could define one.
(defun diredp-mark-with-char (char &optional arg)
"Mark this line with CHAR.
With numeric prefix arg N, mark the next N lines."
(interactive "cMark this line with char: \np")
(let ((dired-marker-char char)) (dired-mark arg)))
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [External] : Re: Dired: how to mark with other character but *
2021-02-01 17:09 ` Drew Adams
@ 2021-02-01 17:24 ` Drew Adams
2021-02-02 4:15 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-02-01 23:47 ` Drew Adams
2021-02-02 4:14 ` moasenwood--- via Users list for the GNU Emacs text editor
2 siblings, 1 reply; 26+ messages in thread
From: Drew Adams @ 2021-02-01 17:24 UTC (permalink / raw)
To: Emanuel Berg; +Cc: Help-Gnu-Emacs (help-gnu-emacs@gnu.org)
> > There isn't one. But you could define one.
>
> (defun diredp-mark-with-char (char &optional arg)...
Also, there are these functions to mark with a
particular char:
dired-mark-files-regexp
dired-mark-files-containing-regexp
(They're commands, but they don't ask for the
char when called interactively.)
___
And you can just set `dired-marker-char' to
whatever char you want, anytime:
`M-: (setq dired-marker-char ?Q)'
And then use that marker for all Dired commands.
`dired-marker-char' affects many Dired features,
even font-locking. They just DTRT, in general.
Look for `dired-marker-char' in files dired*.el.
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [External] : Re: Dired: how to mark with other character but *
2021-02-01 17:09 ` Drew Adams
2021-02-01 17:24 ` Drew Adams
@ 2021-02-01 23:47 ` Drew Adams
2021-02-02 4:14 ` moasenwood--- via Users list for the GNU Emacs text editor
2 siblings, 0 replies; 26+ messages in thread
From: Drew Adams @ 2021-02-01 23:47 UTC (permalink / raw)
To: Emanuel Berg; +Cc: Help-Gnu-Emacs (help-gnu-emacs@gnu.org)
> (defun diredp-mark-with-char (char &optional arg)
> "Mark this line with CHAR.
> With numeric prefix arg N, mark the next N lines."
FWIW -
I've added this, and a similar command for marking
the lines in the region, to the Dired menu-bar and
mouse3 popup menus in libraries Dired+ and Mouse3'.
___
https://www.emacswiki.org/emacs/DiredPlus
https://www.emacswiki.org/emacs/download/dired%2b.el
https://www.emacswiki.org/emacs/Mouse3
https://www.emacswiki.org/emacs/download/mouse3.el
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [External] : Re: Dired: how to mark with other character but *
2021-02-01 17:09 ` Drew Adams
2021-02-01 17:24 ` Drew Adams
2021-02-01 23:47 ` Drew Adams
@ 2021-02-02 4:14 ` moasenwood--- via Users list for the GNU Emacs text editor
2 siblings, 0 replies; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-02-02 4:14 UTC (permalink / raw)
To: help-gnu-emacs
Drew Adams wrote:
>> There isn't one. But you could define one.
>
> (defun diredp-mark-with-char (char &optional arg)
> "Mark this line with CHAR.
> With numeric prefix arg N, mark the next N lines."
> (interactive "cMark this line with char: \np")
> (let ((dired-marker-char char)) (dired-mark arg)))
\o/
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [External] : Re: Dired: how to mark with other character but *
2021-02-01 17:24 ` Drew Adams
@ 2021-02-02 4:15 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-02-05 20:59 ` Drew Adams
0 siblings, 1 reply; 26+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-02-02 4:15 UTC (permalink / raw)
To: help-gnu-emacs
Drew Adams wrote:
>>> There isn't one. But you could define one.
>>
>> (defun diredp-mark-with-char (char &optional arg)...
>
> Also, there are these functions to mark with a particular
> char:
>
> dired-mark-files-regexp
> dired-mark-files-containing-regexp
>
> (They're commands, but they don't ask for the char when
> called interactively.) ___
>
> And you can just set `dired-marker-char' to whatever char
> you want, anytime:
>
> `M-: (setq dired-marker-char ?Q)'
>
> And then use that marker for all Dired commands.
>
> `dired-marker-char' affects many Dired features, even
> font-locking. They just DTRT, in general. Look for
> `dired-marker-char' in files dired*.el.
What about utilities?
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [External] : Re: Dired: how to mark with other character but *
2021-02-02 4:15 ` moasenwood--- via Users list for the GNU Emacs text editor
@ 2021-02-05 20:59 ` Drew Adams
2021-02-05 21:02 ` Stefan Monnier
0 siblings, 1 reply; 26+ messages in thread
From: Drew Adams @ 2021-02-05 20:59 UTC (permalink / raw)
To: Emanuel Berg; +Cc: Help-Gnu-Emacs (help-gnu-emacs@gnu.org)
> What about utilities?
I don't understand the question, sorry.
(I've paid my utilities bills this month, I think.)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [External] : Re: Dired: how to mark with other character but *
2021-02-05 20:59 ` Drew Adams
@ 2021-02-05 21:02 ` Stefan Monnier
2021-02-05 21:10 ` Drew Adams
0 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2021-02-05 21:02 UTC (permalink / raw)
To: help-gnu-emacs
>> What about utilities?
> I don't understand the question, sorry.
> (I've paid my utilities bills this month, I think.)
But did your utilities use Emacs?
Stefan
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [External] : Re: Dired: how to mark with other character but *
2021-02-05 21:02 ` Stefan Monnier
@ 2021-02-05 21:10 ` Drew Adams
0 siblings, 0 replies; 26+ messages in thread
From: Drew Adams @ 2021-02-05 21:10 UTC (permalink / raw)
To: Stefan Monnier, help-gnu-emacs@gnu.org
> >> What about utilities?
> > I don't understand the question, sorry.
> > (I've paid my utilities bills this month, I think.)
>
> But did your utilities use Emacs?
They probably do. But they may not know that they do.
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2021-02-05 21:10 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-31 6:18 Dired: how to mark with other character but * Jean Louis
2021-01-31 6:23 ` Jean Louis
2021-01-31 6:43 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 7:29 ` Jean Louis
2021-01-31 6:53 ` Marcin Borkowski
2021-01-31 7:23 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 7:36 ` Jean Louis
2021-01-31 7:46 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-02-01 16:35 ` [External] : " Drew Adams
2021-02-01 17:09 ` Drew Adams
2021-02-01 17:24 ` Drew Adams
2021-02-02 4:15 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-02-05 20:59 ` Drew Adams
2021-02-05 21:02 ` Stefan Monnier
2021-02-05 21:10 ` Drew Adams
2021-02-01 23:47 ` Drew Adams
2021-02-02 4:14 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 7:34 ` Jean Louis
2021-01-31 8:20 ` Marcin Borkowski
2021-01-31 9:09 ` Jean Louis
2021-01-31 9:26 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 9:34 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-31 14:47 ` Eli Zaretskii
2021-02-01 2:25 ` Jean Louis
2021-01-31 21:30 ` Michael Heerdegen
2021-01-31 21:37 ` moasenwood--- via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).