help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: UK date format in Dired


From: Graham Smith
Subject: Re: UK date format in Dired
Date: Fri, 26 Jan 2007 22:38:30 +0000

Pete,

I can't say I follow all of this, but I don't think I have GNU installed and as I understand it, I need this for this line of code to work.

Thanks for your help, maybe I will just live with it.

Graham

On 26/01/07, Peter Dyballa <Peter_Dyballa@web.de> wrote:

Am 26.01.2007 um 21:41 schrieb Graham Smith:

> Thanks, be fine and I have added this line to my .emacs , but it
> has made no difference.
>
> Is the "locale" in the code the actual text or am I meant to
> replace with a regional name eg "european"

I remember a time on MS DOS or MS Windows where a shell interpreter
was available, command.com, in its own window (or terminal). Maybe
you have a similiar thing by hand. It should work to invoke 'ls --
help' to see what the ls command understands. The GNU ls command I
use in my Emacsen on Mac OS X tells me (usually in German, because I
have the environment variable LANG set to some German value) that it
accepts:

   -a, --all                  do not ignore entries starting with .
   -A, --almost-all           do not list implied . and ..
   -B, --ignore-backups       do not list implied entries ending with ~
   -D, --dired                generate output designed for Emacs'
dired mode
   -h, --human-readable       with -l, print sizes in human readable
format
                                (e.g., 1K 234M 2G)
       --si                   likewise, but use powers of 1000 not 1024
   -l                         use a long listing format
       --time-style=STYLE     with -l, show times using style STYLE:
                              full-iso, long-iso, iso, locale, +FORMAT.
                              FORMAT is interpreted like `date'; if
FORMAT is
                              FORMAT1<newline>FORMAT2, FORMAT1
applies to
                              non-recent files and FORMAT2 to recent
files;
                              if STYLE is prefixed with `posix-', STYLE
                              takes effect only outside the POSIX locale

And I tried exactly

          '(dired-listing-switches "-alD --time-style=locale")

in an UK based environment and it worked. 'ls --version' returns for
me as first line

        ls (GNU coreutils) 5.96


If you do not have GNU ls available, then GNU Emacs uses some ls
emulation. This one cannot be switched to display the date in some
'local' format.


I have one (actually two) more thing(s) set:

        (setq insert-directory-program "gls" dired-use-ls-dired t)

This tells GNU Emacs to use GNU ls instead of a built-in or system ls
command:

        insert-directory-program is a variable defined in `files.el'.

        Documentation:
        Absolute or relative name of the `ls' program used by `insert-
directory'.


        dired-use-ls-dired is a variable defined in `dired.el'.

        Documentation:
        Non-nil means Dired should use `ls --dired'.

Could be they are accessible via customisation ...

--
Greetings

   Pete

Encryption:  A powerful algorithmic encoding technique employed in
the creation
                      of computer manuals.




reply via email to

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