help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dired: how to mark with other character but *


From: Jean Louis
Subject: Re: Dired: how to mark with other character but *
Date: Sun, 31 Jan 2021 12:09:03 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]