[gnu.emacs] Dired

dyoung@mit-amt.MEDIA.MIT.EDU (David Young) (01/06/90)

When you use the -F option to ls in unix you get an additional character
attached to the end of a file's name if it's an executable (the character
is '*') or if it's a directory ('/').

Is there a way to have dired display filenames with these characters
appended to them?

Meaning, dired would display things like:

  -rw-------  1 dyoung        127 Nov 30 13:26 .rnsoft
  drwxr-xr-x  2 dyoung        512 Nov 16 11:16 News/        <- see the '/'
  -rwx------  1 dyoung       1003 Jan 12 15:21 mumble*      <- see the '*'


thanks,

david
dyoung@media-lab.media.mit.edu

steveh@abbott.mips.com (Stephen C. Hill) (01/06/90)

>When you use the -F option to ls in unix you get an additional character
>attached to the end of a file's name if it's an executable (the character
>is '*') or if it's a directory ('/').
>
>Is there a way to have dired display filenames with these characters
>appended to them?
>

Do a Meta-X edit-options <return> and then search for ";; dired-listing-switches:".  In my default, 
I have "-al", which are the ls options to be used in dired.  Add the F, on a time-by-time basis,
or make the setq change in your .emacs file.

Steve

-- 
Stephen C. Hill, CDP
{ames,prls,pyramid,decwrl}!mips!steveh  or  steveh@mips.com 
Integration Products Group
MIPS Computer Systems
930 Arques
Sunnyvale, CA 94086, (408) 720-2916

Time is Nature's method of keeping us from bumping into ourselves.

tale@cs.rpi.edu (David C Lawrence) (01/06/90)

In <34211@mips.mips.COM> steveh@abbott.mips.com (Stephen C. Hill) writes:
> Do a Meta-X edit-options <return> and then search for ";;
> dired-listing-switches:".  In my default, I have "-al", which are
> the ls options to be used in dired.  Add the F, on a time-by-time
> basis, or make the setq change in your .emacs file.

Don't do this if you still want to use the other features of dired on
anything other than a regular file.  That trailing character will
screw it up.  Dired could perhaps be fixed to accomodate this, but as
it stands now it will not give you the results you expect.  The
documentation string for dired-listing-switches, which will be readily
at hand if you do the suggested M-x edit-options, warns against using
the -F, -s or -i options to ls.  It doesn't explain why there, but
here are the main reasons with the currently distributed dired:

   -F: with -l puts a trailing / on each directory name, a * on each
       executable and an = on each socket.  For the directories
       everything should still behave normally, but for the
       executables and sockets everything screws up because dired
       thinks the filename includes that character.  The information
       provided by -F is already available when -l is enabled, which
       means two things: a) the -F is unnecessary and b) for those
       people that really want it, dired could do The Right Thing by
       checking the other information on the line.

   -s: This puts the information regarding the size of the file before
       the file type and mode information, which ends up screwing up
       the test to see if the line indicates a directory.  This could
       be fixed too.

   -i: Same as -s, execpt that it shows the inode number.

Any public follow-ups should probably go to the bug-emacs/gnu.emacs.bug
list.  My main concern was further emphasizing here why using -F might
not be such a hot idea, in spite of Steve's good intentions.

Dave
-- 
   (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))