From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#4792: 23.1; dired-insert-directory: doesn't indent header lines if no files Date: Fri, 23 Oct 2009 11:19:49 -0700 Message-ID: Reply-To: Drew Adams , 4792@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1256322461 29368 80.91.229.12 (23 Oct 2009 18:27:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2009 18:27:41 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 23 20:27:34 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N1OrM-0002eW-Uv for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Oct 2009 20:27:33 +0200 Original-Received: from localhost ([127.0.0.1]:40496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1OrM-0007Dk-9D for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Oct 2009 14:27:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1OrE-0007Bm-NO for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:27:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1Or7-00077Z-B7 for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:27:21 -0400 Original-Received: from [199.232.76.173] (port=45378 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1Or6-000778-NT for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:27:16 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44546) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N1Or5-0003ej-JZ for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:27:15 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9NIRDmV007510; Fri, 23 Oct 2009 11:27:13 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n9NIP6f7007006; Fri, 23 Oct 2009 11:25:06 -0700 Resent-Date: Fri, 23 Oct 2009 11:25:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 23 Oct 2009 18:25:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4792 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12563220066338 (code B ref -1); Fri, 23 Oct 2009 18:25:06 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 23 Oct 2009 18:20:06 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9NIK4NH006260 for ; Fri, 23 Oct 2009 11:20:05 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1Ok7-0004LM-UW for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:20:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1Ok3-0004H1-8I for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:20:03 -0400 Original-Received: from [199.232.76.173] (port=38034 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1Ok3-0004Gt-5I for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:19:59 -0400 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:50732 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N1Ok2-0002nN-Qq for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2009 14:19:59 -0400 Original-Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9NILM8o021419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Oct 2009 18:21:23 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9NGug8V015283 for ; Fri, 23 Oct 2009 18:20:32 GMT Original-Received: from abhmt004.oracle.com by acsmt358.oracle.com with ESMTP id 20594296681256321987; Fri, 23 Oct 2009 13:19:47 -0500 Original-Received: from dradamslap1 (/141.144.80.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Oct 2009 11:19:47 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcpUDWhpWsD/vxF8RHmm/1sazLzZbg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4AE1F3CA.00AF:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 23 Oct 2009 14:27:21 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32194 Archived-At: emacs -q C-x d some-directory-that-does-not-exist The listing looks like this: c:/Emacs-23.1/lisp: wildcard some-directory-that-does-not-exist (No match) total used in directory 0 available 26402560 The last two lines should be indented, but they are not. They need to be indented, in particular, so that any (custom) font-lock highlighting that might be done can act appropriately. They should also be indented for consistency with the display of a non-empty listing. This regression was introduced in Emacs 22 - the lines are indented correctly in Emacs 20 and 21. The cause is this change in `dired-insert-directory': (indent-rigidly opoint (point) 2) Originally, that was (indent-rigidly (point-min) (point-max) 2), though the indentation was done elsewhere at that time. The problem is that when there are no files in the listing, point does not get moved, so opoint is 1, and so is (point) - so nothing is indented. Either `point-min' and `point-max' should be used, as before (unless that causes some other problem), or the code should check whether any file lines were actually inserted and DTRT. Or perhaps the `save-excursion' could be removed around the code that inserts this header info, so that (point) would be at (point-max). (opoint = 1 is not the problem.) Note: I'm on Windows, so the code uses ls-lisp.el. E.g. it uses the version of `insert-directory' provided by ls-lisp.el. Dunno if that makes a difference. In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-29 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)'