[Top][All Lists]

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

Re: kinda dumb dired/ls question

From: Mike Ballard
Subject: Re: kinda dumb dired/ls question
Date: Sun, 23 Nov 2003 03:20:19 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

On Fri Nov 21, Mike Ballard disturbed my nap when he said:

> I run an emacs instance as "mike" and a second separate instance sometimes
> as root.  I point root's ~/.emacs to load stuff from mike's *.elc.
> In mike's ~/.emacs there is:
> (setq dired-actual-switches (concat "-alo --time-style=+'%b %e %y %H:%M'"))
> mike also uses a tcsh alias for /bin/ls:
>     alias l  '/bin/ls -lo --color=tty --time-style=+"%b %e %y %H:%M"  \!* && 
> echo ""'
> These give me the exact ls output I want either in tcsh and dired.
> However, although the same shell alias works for root I cannot get root's
> emacs instance to use it (in dired).  What is (seemingly) ignored in
> root's emacs instance is the "--time*."  I've even pasted in the above
> setq as the last line in root's ~/.emacs but root's dired buffers are not
> using "--time*".  
> I've been through much gnashing of teeth trying to get it to work but
> can't and don't see what I'm missing.  Anyone know?  Or maybe can tell me
> how to get the root instance to append "--time*" to its dired ls?

This is/was really frosting me.  mike runs emacs and dired displays as:

  used 256 available 1004640
  -rw-r--r--    1 mike          81 Nov 21 12:47 #.newsrc-dribble#
  drwxr-xr-x   10 mike        4096 Nov 21 12:47 .
  drwxr-xr-x    6 mike        4096 Nov 21 09:15 ..
  -rw-r--r--    1 mike           0 Apr 26  2003 .active.nnml
  -rw-r--r--    1 mike        3451 Nov 20 21:44 .active.nntp
  -rw-r--r--    1 mike        3450 Oct 24 22:42 .active.nntp.back


root runs emacs (not aliased) for which root's ~/.emacs points to common
elisp that both share (only root's ~/.emacs is different).  Presumably
you'd think the behavior would be the same (i.e., picking up the same
dired settings).  This is what root emacs dired looks like:

  /bin/ls: %e: No such file or directory
  /bin/ls: %y: No such file or directory
  /bin/ls: %H:%M": No such file or directory
  total 256  free 1004632
  -rw-r--r--    1 mike           81 "Nov #.newsrc-dribble#
  drwxr-xr-x   10 mike         4096 "Nov .
  drwxr-xr-x    6 mike         4096 "Nov ..
  -rw-r--r--    1 mike            0 "Apr .active.nnml
  -rw-r--r--    1 mike         3451 "Nov .active.nntp
  -rw-r--r--    1 mike         3450 "Oct .active.nntp.back

My "ls" alias in tcsh is:

  alias l  '/bin/ls -lo --color=tty --time-style=+"%b %e %y %H:%M"  \!* && echo 

It works great and I get the same output in shell as the first block I
pasted in above.  root uses "--time" in its "ls" alias and it also works
as in the first block I pasted in above.  But whereas mike's shell ls,
emacs dired and root's shell ls all display essentially the same, root's
emacs dired spits out the error (the second block I pasted in above).

I FINALLY found the problem (those damn LANG/LC* vars).  If I change
root's LANG var from en_US to C it works same as mike's now.  I created an
alias for root's emacs making that change since I _think_ Perl wants en_US
(or some kind of crap).  I wish everybody could decide/agree on what's
what :-)  Rhetorically, I sure would be interested to know why en_US works
for tcsh ls but dired requires C in order to work?


  "Roses are red, violets are blue,
   I'm schizophrenic and so am I"

reply via email to

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