* dired: don't mark summary line
@ 2003-11-30 7:44 Karl Eichwalder
2003-11-30 10:12 ` Alexander Pohoyda
0 siblings, 1 reply; 6+ messages in thread
From: Karl Eichwalder @ 2003-11-30 7:44 UTC (permalink / raw)
Using the 'de' locale, dired wrongly marks the summary line; press 't'
(toggle) to see it:
/media/sdb1/dcim/100pentx:
* insgesamt 42384
* -rwxr-xr-x 1 ke users 704791 2003-11-23 12:10 imgp1178.jpg
* -rwxr-xr-x 1 ke users 753929 2003-11-23 12:10 imgp1179.jpg
...
Now pressing 'C' you will see an error as follows:
Debugger entered--Lisp error: (error "No file on this line")
signal(error ("No file on this line"))
error("No file on this line")
--
| ,__o
| _-\_<,
http://www.gnu.franken.de/ke/ | (*)/'(*)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dired: don't mark summary line
2003-11-30 7:44 dired: don't mark summary line Karl Eichwalder
@ 2003-11-30 10:12 ` Alexander Pohoyda
2003-11-30 10:49 ` Miles Bader
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Pohoyda @ 2003-11-30 10:12 UTC (permalink / raw)
Cc: emacs-devel
Karl Eichwalder <ke@gnu.franken.de> writes:
> Using the 'de' locale, dired wrongly marks the summary line; press 't'
> (toggle) to see it:
>
> /media/sdb1/dcim/100pentx:
> * insgesamt 42384
> * -rwxr-xr-x 1 ke users 704791 2003-11-23 12:10 imgp1178.jpg
> * -rwxr-xr-x 1 ke users 753929 2003-11-23 12:10 imgp1179.jpg
> ...
>
> Now pressing 'C' you will see an error as follows:
Would this patch help?
Index: dired.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v
retrieving revision 1.270
diff -u -r1.270 dired.el
--- dired.el 1 Nov 2003 17:48:00 -0000 1.270
+++ dired.el 30 Nov 2003 10:08:34 -0000
@@ -2383,7 +2383,7 @@
;; Point must be at beginning of line
;; Should be equivalent to (save-excursion (not (dired-move-to-filename)))
;; but is about 1.5..2.0 times as fast. (Actually that's not worth it)
- (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find")
+ (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find\\|^. insgesamt")
(and (looking-at dired-subdir-regexp)
(save-excursion (not (dired-move-to-filename))))))
--
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dired: don't mark summary line
2003-11-30 10:12 ` Alexander Pohoyda
@ 2003-11-30 10:49 ` Miles Bader
2003-11-30 20:08 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Miles Bader @ 2003-11-30 10:49 UTC (permalink / raw)
Cc: emacs-devel, Karl Eichwalder
On Sun, Nov 30, 2003 at 11:12:35AM +0100, Alexander Pohoyda wrote:
> Would this patch help?
> - (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find")
> + (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find\\|^. insgesamt")
Note that the same problem occurs for _every_ locale (e.g., I've seen it with
LANG set to ja_JP); it might be better to ignore any lines with less than
some number of spaces in them, or something like that.
-Miles
--
Quidquid latine dictum sit, altum viditur.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dired: don't mark summary line
2003-11-30 10:49 ` Miles Bader
@ 2003-11-30 20:08 ` Stefan Monnier
2003-12-01 7:49 ` Miles Bader
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2003-11-30 20:08 UTC (permalink / raw)
Cc: Karl Eichwalder, Alexander Pohoyda, emacs-devel
>> Would this patch help?
>> - (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find")
>> + (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find\\|^. insgesamt")
> Note that the same problem occurs for _every_ locale (e.g., I've seen it with
> LANG set to ja_JP); it might be better to ignore any lines with less than
> some number of spaces in them, or something like that.
Why not just check that the line has the drwxrwxrwx thingy ?
We already have a fine regexp for it,
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dired: don't mark summary line
2003-11-30 20:08 ` Stefan Monnier
@ 2003-12-01 7:49 ` Miles Bader
2003-12-06 0:00 ` Miles Bader
0 siblings, 1 reply; 6+ messages in thread
From: Miles Bader @ 2003-12-01 7:49 UTC (permalink / raw)
Cc: Karl Eichwalder, Alexander Pohoyda, emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> >> Would this patch help?
> >> - (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find")
> >> + (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find\\|^. insgesamt")
>
> > Note that the same problem occurs for _every_ locale (e.g., I've seen it with
> > LANG set to ja_JP); it might be better to ignore any lines with less than
> > some number of spaces in them, or something like that.
>
> Why not just check that the line has the drwxrwxrwx thingy ?
> We already have a fine regexp for it,
Indeed, and the comment in `dired-between-files' suggests using
(save-excursion (not (dired-move-to-filename))) which basically just
ends up using dired-permission-flags-regexp as you suggest (that regexp
can't be used directly with looking-at, because it doesn't match from
the beginning of a line).
The following patch seems to do the right thing in a non-english locale,
without any message dependencies; despite the comment it's not
perceptibly slow for me:
diff -up /usr/local/src/emacs-tiling/lisp/dired.el /tmp/dired.el
--- /usr/local/src/emacs-tiling/lisp/dired.el 2003-11-18 18:19:34.000000000 +0900
+++ /tmp/dired.el 2003-12-01 16:43:23.000000000 +0900
@@ -2383,9 +2383,5 @@ FILES is the list of marked files."
;; Point must be at beginning of line
- ;; Should be equivalent to (save-excursion (not (dired-move-to-filename)))
- ;; but is about 1.5..2.0 times as fast. (Actually that's not worth it)
- (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find")
- (and (looking-at dired-subdir-regexp)
- (save-excursion (not (dired-move-to-filename))))))
+ (save-excursion (not (dired-move-to-filename))))
(defun dired-next-marked-file (arg &optional wrap opoint)
"Move to the next marked file, wrapping around the end of the buffer."
-Miles
--
"I distrust a research person who is always obviously busy on a task."
--Robert Frosch, VP, GM Research
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dired: don't mark summary line
2003-12-01 7:49 ` Miles Bader
@ 2003-12-06 0:00 ` Miles Bader
0 siblings, 0 replies; 6+ messages in thread
From: Miles Bader @ 2003-12-06 0:00 UTC (permalink / raw)
Miles Bader <miles@lsi.nec.co.jp> writes:
> > Why not just check that the line has the drwxrwxrwx thingy ?
> > We already have a fine regexp for it,
...
> The following patch seems to do the right thing in a non-english locale,
> without any message dependencies; despite the comment it's not
> perceptibly slow for me:
So if there are no objections, I'll make this change to CVS (as soon as
CVS starts working again :-).
-Miles
--
Come now, if we were really planning to harm you, would we be waiting here,
beside the path, in the very darkest part of the forest?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-06 0:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-30 7:44 dired: don't mark summary line Karl Eichwalder
2003-11-30 10:12 ` Alexander Pohoyda
2003-11-30 10:49 ` Miles Bader
2003-11-30 20:08 ` Stefan Monnier
2003-12-01 7:49 ` Miles Bader
2003-12-06 0:00 ` Miles Bader
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).