From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: insert-directory Date: Sun, 23 May 2004 19:00:38 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200405240000.i4O00ck07917@raven.dms.auburn.edu> References: <200405232218.i4NMIw307789@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1085358146 2632 80.91.224.253 (24 May 2004 00:22:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 May 2004 00:22:26 +0000 (UTC) Cc: peter_breton@yahoo.com, pete_lee@swbell.net, eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 24 02:22:12 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BS3EK-0008QK-00 for ; Mon, 24 May 2004 02:22:12 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BS3EK-00079G-00 for ; Mon, 24 May 2004 02:22:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BS38D-00005x-Ns for emacs-devel@quimby.gnus.org; Sun, 23 May 2004 20:15:53 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BS386-00005A-BT for emacs-devel@gnu.org; Sun, 23 May 2004 20:15:46 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BS37X-0008Mq-FH for emacs-devel@gnu.org; Sun, 23 May 2004 20:15:44 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BS36M-000819-L1; Sun, 23 May 2004 20:13:58 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by mx20.gnu.org with esmtp (Exim 4.34) id 1BS2uA-0003C1-A4; Sun, 23 May 2004 20:01:22 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i4O01AuE013182; Sun, 23 May 2004 19:01:10 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i4O00ck07917; Sun, 23 May 2004 19:00:38 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200405232218.i4NMIw307789@raven.dms.auburn.edu> (message from Luc Teirlinck on Sun, 23 May 2004 17:18:58 -0500 (CDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 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:23867 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23867 I have to change my proposed patch to files.el to the new patch included below. There was a bug in my prior patch. The new patch changes the way empty directories are displayed if the "-a" switch is not provided, in my opinion for the better. Prior to my new patch, without -a switch, such directories were listed as: /home/teirllm/compdir/goodCVS: After my new patch that becomes: /home/teirllm/compdir/goodCVS: total used in directory 0 available 21963572 I personally use the "-A" instead of the "-a" switch and I like the new behavior a lot better. It makes empty dired buffers stand out a lot more clearly as being empty dired buffers. A dired buffer with just: /home/teirllm/compdir/goodCVS: looks weird and confusing/ The reason for the change is: [bash2.05b.0 ~ 3 6] ls /home/teirllm/compdir/gogoCVS -Al --dired total 0 //DIRED-OPTIONS// --quoting-style=(null) [bash2.05b.0 ~ 3 7] ls /home/teirllm/compdir/gogoCVS -al --dired total 8 drwxrwxr-x 2 teirllm teirllm 4096 Apr 5 21:42 . drwxrwxr-x 5 teirllm teirllm 4096 Apr 11 21:13 .. //DIRED// 68 69 128 130 //DIRED-OPTIONS// --quoting-style=(null) [bash2.05b.0 ~ 3 8] New patch: ===File ~/files-diff-2====================================== *** files.el 22 May 2004 14:29:26 -0500 1.695 --- files.el 23 May 2004 18:11:03 -0500 *************** *** 4336,4356 **** (when (looking-at "//SUBDIRED//") (delete-region (point) (progn (forward-line 1) (point))) (forward-line -1)) ! (let ((end (line-end-position))) ! (forward-word 1) ! (forward-char 3) ! (while (< (point) end) ! (let ((start (+ beg (read (current-buffer)))) ! (end (+ beg (read (current-buffer))))) ! (if (= (char-after end) ?\n) ! (put-text-property start end 'dired-filename t) ! ;; It seems that we can't trust ls's output as to ! ;; byte positions of filenames. ! (put-text-property beg (point) 'dired-filename nil) ! (end-of-line)))) ! (goto-char end) ! (beginning-of-line) ! (delete-region (point) (progn (forward-line 2) (point))))) ;; Now decode what read if necessary. (let ((coding (or coding-system-for-read --- 4336,4361 ---- (when (looking-at "//SUBDIRED//") (delete-region (point) (progn (forward-line 1) (point))) (forward-line -1)) ! (if (looking-at "//DIRED//") ! (let ((end (line-end-position))) ! (forward-word 1) ! (forward-char 3) ! (while (< (point) end) ! (let ((start (+ beg (read (current-buffer)))) ! (end (+ beg (read (current-buffer))))) ! (if (= (char-after end) ?\n) ! (put-text-property start end 'dired-filename t) ! ;; It seems that we can't trust ls's output as to ! ;; byte positions of filenames. ! (put-text-property beg (point) 'dired-filename nil) ! (end-of-line)))) ! (goto-char end) ! (beginning-of-line) ! (delete-region (point) (progn (forward-line 2) (point)))) ! (forward-line 1) ! (if (looking-at "//DIRED-OPTIONS//") ! (delete-region (point) (progn (forward-line 1) (point))) ! (forward-line 1)))) ;; Now decode what read if necessary. (let ((coding (or coding-system-for-read ============================================================