From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: dired: don't mark summary line Date: 01 Dec 2003 16:49:41 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87brqu5fn0.fsf@oak.pohoyda.family> <20031130104915.GA1734@fencepost> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070265405 18018 80.91.224.253 (1 Dec 2003 07:56:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2003 07:56:45 +0000 (UTC) Cc: Karl Eichwalder , Alexander Pohoyda , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Dec 01 08:56:41 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AQivB-0001Nr-00 for ; Mon, 01 Dec 2003 08:56:41 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AQivB-00024u-00 for ; Mon, 01 Dec 2003 08:56:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AQjnq-00083r-Ra for emacs-devel@quimby.gnus.org; Mon, 01 Dec 2003 03:53:10 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AQjnl-00083W-2c for emacs-devel@gnu.org; Mon, 01 Dec 2003 03:53:05 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AQjnF-0007sj-86 for emacs-devel@gnu.org; Mon, 01 Dec 2003 03:53:04 -0500 Original-Received: from [202.32.8.214] (helo=TYO201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AQjnE-0007rh-88; Mon, 01 Dec 2003 03:52:32 -0500 Original-Received: from mailgate3.nec.co.jp ([10.7.69.160]) by TYO201.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id hB17ovc18026; Mon, 1 Dec 2003 16:50:57 +0900 (JST) Original-Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id hB17ovB07447; Mon, 1 Dec 2003 16:50:57 +0900 (JST) Original-Received: from edsgm02.lsi.nec.co.jp ([10.50.208.12]) by mailsv.nec.co.jp (8.11.7/3.7W-MAILSV-NEC) with ESMTP id hB17ouF15453; Mon, 1 Dec 2003 16:50:56 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edsgm02.lsi.nec.co.jp (8.9.3p2+3.2W/3.7W_EDC_Ver.1.0) with ESMTP id QAA23303; Mon, 1 Dec 2003 16:50:55 +0900 (JST) Original-Received: from localhost (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id hB17ot7Q022964; Mon, 1 Dec 2003 16:50:55 +0900 (JST) Original-Received: by localhost (Postfix, from userid 31295) id C5E22100C9; Mon, 1 Dec 2003 16:49:41 +0900 (JST) Original-To: Stefan Monnier System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: Original-Lines: 42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18241 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18241 Stefan Monnier 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