From: Miles Bader <miles@lsi.nec.co.jp>
Cc: Karl Eichwalder <ke@gnu.franken.de>,
Alexander Pohoyda <alexander.pohoyda@gmx.net>,
emacs-devel@gnu.org
Subject: Re: dired: don't mark summary line
Date: 01 Dec 2003 16:49:41 +0900 [thread overview]
Message-ID: <buooeutf04q.fsf@localhost.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <jwvekvpmxh8.fsf-monnier+emacs/devel@vor.iro.umontreal.ca>
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
next prev parent reply other threads:[~2003-12-01 7:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2003-12-06 0:00 ` Miles Bader
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=buooeutf04q.fsf@localhost.ucom.lsi.nec.co.jp \
--to=miles@lsi.nec.co.jp \
--cc=alexander.pohoyda@gmx.net \
--cc=emacs-devel@gnu.org \
--cc=ke@gnu.franken.de \
--cc=miles@gnu.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.
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).