emacs-devel
[Top][All Lists]
Advanced

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

Re: dired-do-toggle


From: Stefan Monnier
Subject: Re: dired-do-toggle
Date: Sun, 04 Nov 2001 18:27:54 -0500

> > From: "Stefan Monnier" <monnier+gnu.emacs.bug/news/@RUM.cs.yale.edu>
> > Date: 04 Nov 2001 17:41:47 -0500
> > 
> > How about something like the patch below ?
> > It's not a real solution, but at least with it, most things still
> > work even when the Emacs gets confused by a strange `ls' date format.
> 
> I'd rather not head down that path, as it will do the wrong thing
> e.g. if there is a file 'foo' and a file 'bar foo' in the same directory.
> That sort of thing is too common for comfort.

Agreed.  My patch has the problem that it will try `foo' before
`bar foo'.  But it's pretty easy to change it so it tries the longer
filenames first, in which case the only risk is when you have files
`foo' and `2001 foo' or `20:41 foo'.  This is much less common.

> Here is an idea for a better heuristic.  If
> dired-move-to-filename-regexp fails, then invoke 'ls -ld /////' (with
> all the other options that one normally gives 'ls') and then count
> print columns till you find the '/////'.  Then strip the same number
> of print columns from the questionable ls output.

The bug-report I replied to mentioned a Chinese output where the
column-number supposedly isn't constant ;-(


        Stefan





reply via email to

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