unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mike Ballard <dont_w@nt_spam.org>
Subject: Re: kinda dumb dired/ls question
Date: Sun, 23 Nov 2003 03:20:19 GMT	[thread overview]
Message-ID: <m2u14vvkk0.fsf@west_f1.net> (raw)
In-Reply-To: m2r80insqh.fsf@west_f1.net


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"

      reply	other threads:[~2003-11-23  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-09  3:10 kinda dumb dired/ls question Mike Ballard
2003-11-23  3:20 ` Mike Ballard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2u14vvkk0.fsf@west_f1.net \
    --to=dont_w@nt_spam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).