[Top][All Lists]

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

Re: dired and BLOCK_SIZE

From: Eli Zaretskii
Subject: Re: dired and BLOCK_SIZE
Date: Mon, 9 Apr 2001 10:02:09 +0200

On 9 Apr 2001, Craig Lawson wrote:

>   Anyway, dired doesn't handle it well. Symptoms are: on a line where
> a file is 1K or larger, the cursor is positioned at the beginning of
> the line, not at the beginning of the file name like it's supposed
> to. Also, dired commands do not work on those files dired doesn't
> recognise.
>   Add the code below to your .emacs start-up file, and you will be
> able to use dired with BLOCK_SIZE.
> (add-hook 'dired-load-hook
>         (lambda ()
>           (if (equal ".*[0-9] "
>                      (substring dired-move-to-filename-regexp 0 8))
>               (setq dired-move-to-filename-regexp
>                     (concat ".*[0-9]\\(\\([.][0-9]+\\)?[kMGTPEZY]\\)? "
>                             (substring dired-move-to-filename-regexp 8))
>                     )) ))

A similar problem is already solved for the next release.

But what is that dot "[.]" in this regexp:

   ".*[0-9]\\(\\([.][0-9]+\\)?[kMGTPEZY]\\)? " 

for?  Are you saying that `ls' can print something like "12.34M" as a 
file's size?  If so, won't the dot be actually a locale-dependent 

Could you please describe the output format that `ls' produces under 

reply via email to

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