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

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

Re: dired question


From: Stefan Monnier
Subject: Re: dired question
Date: Mon, 18 Oct 2004 14:05:29 GMT
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> I would like to run a command on files marked in a dired buffer in the
> order in which they were marked.  Is there a built in way to do this?

Dired does not keep track of the order in which things were marked.
It just keeps a bit saying "marked/not-marked".

> If not, I was thinking of advising dired-mark and
> dired-get-marked-files to do this.  Does this approach seem reasonable?

I'm not very familiar with dired's internals, so don't take my word for it,
but it does seem like a reasonable way.  E.g. just maintain in dired-mark
a side list of the last N files marked (N being e.g. the number of lines in
the current buffer) and use it in dired-get-marked-files to sort the
marked files.


        Stefan


reply via email to

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