[Top][All Lists]

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

Re: dired-move-to-filename-regexp

From: Paul Eggert
Subject: Re: dired-move-to-filename-regexp
Date: Tue, 21 Sep 2004 23:09:35 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Richard Stallman <address@hidden> writes:

> I recall we discussed this, but I don't recall if we solved the
> problem.  Did we decide on any solution?

I don't recall anyone designing anything specific, but here are some
thoughts.  Current "ls -l --dired" outputs something like this:

     drwxr-xr-x  22 root root 4096 2004-03-10 13:07 .
   //DIRED// 49 50
   //DIRED-OPTIONS// --quoting-style=literal

We could design a new ls option called "--listing=FORMAT", where
FORMAT specifies the layout of each "ls" line, much as a strftime
format specifies the layout of the output of the "date" command.
Combinations of existing -l, --time-style etc. options would be
equivalent to some particular FORMAT.  The FORMAT could specify the
exact number of columns to use for each datum.  //DIRED-OPTIONS//
would specify the --listing option that would cause "ls" to generate
lines in the same format (including the same column widths).  Existing
versions of "ls" do not put this stuff into the //DIRED-OPTIONS// line
and Emacs would therefore know not to use a --listing option when
doing incremental redisplay unless "ls" is sufficiently new.

There are some issues I haven't thought through.  What if the updated
listing needs wider columns than the old?  How can arbitrary
characters be encoded into FORMAT, and how do they get expressed in
the //DIRED-OPTIONS// line?  To some extent these are Emacs questions
more than "ls" questions.  There's also the issue of how --listing
interacts with the zoo of other "ls" options; this is mostly an "ls"

PS.  I'm CC'ing this to bug-coreutils as it's "ls"-relevant.
bug-coreutils readers: you're joining a thread that began at:

reply via email to

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