unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* kinda dumb dired/ls question
@ 2003-11-09  3:10 Mike Ballard
  2003-11-23  3:20 ` Mike Ballard
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Ballard @ 2003-11-09  3:10 UTC (permalink / raw)



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?

Mike
-- 


mike.ballard--at--earthlink.net

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kinda dumb dired/ls question
  2003-11-09  3:10 kinda dumb dired/ls question Mike Ballard
@ 2003-11-23  3:20 ` Mike Ballard
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Ballard @ 2003-11-23  3:20 UTC (permalink / raw)



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:

 /home/mike/.elisp/Gnus:
  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

Perfect!

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:

  /home/mike/.elisp/Gnus:
  /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
  /home/mike/.elisp/Gnus:
  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?

Mike
-- 

mike.ballard--at--earthlink.net

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-23  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-09  3:10 kinda dumb dired/ls question Mike Ballard
2003-11-23  3:20 ` Mike Ballard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).