From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#17307: find-dired Date: Wed, 24 Feb 2016 13:44:42 +1100 Message-ID: <87mvqqomhx.fsf@gnus.org> References: <87zjje99va.fsf@medion-vg10-sid.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456281986 5219 80.91.229.3 (24 Feb 2016 02:46:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2016 02:46:26 +0000 (UTC) Cc: 17307@debbugs.gnu.org To: Jean-Pierre De Schacht Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 24 03:46:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aYPSv-0002gH-6B for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 03:46:13 +0100 Original-Received: from localhost ([::1]:32967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYPSu-0007sh-Dh for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Feb 2016 21:46:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYPSp-0007rj-CJ for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 21:46:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYPSk-0007Ov-EI for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 21:46:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYPSk-0007Oi-Aa for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 21:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aYPSk-00010R-69 for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 21:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2016 02:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17307-submit@debbugs.gnu.org id=B17307.14562819121099 (code B ref 17307); Wed, 24 Feb 2016 02:46:02 +0000 Original-Received: (at 17307) by debbugs.gnu.org; 24 Feb 2016 02:45:12 +0000 Original-Received: from localhost ([127.0.0.1]:41932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYPRw-0000HL-3t for submit@debbugs.gnu.org; Tue, 23 Feb 2016 21:45:12 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:40614) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYPRu-0000FF-6e for 17307@debbugs.gnu.org; Tue, 23 Feb 2016 21:45:10 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYPRX-0005xy-FE; Wed, 24 Feb 2016 03:44:48 +0100 In-Reply-To: (Jean-Pierre De Schacht's message of "Thu, 24 Apr 2014 16:30:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aYPRX-0005xy-FE MailScanner-NULL-Check: 1456886688.26303@psW0utZS4751bmRHT/400g X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113632 Archived-At: Jean-Pierre De Schacht writes: > - (replace-match (format "%4s" (match-string 1)) > - nil nil nil 1) > + (replace-match (format "%7s" (match-string 1)) > + nil nil nil 1) Just increasing the widths doesn't really help that much, because all the columns may be arbitrarily wide. A better fix would be to first compute the max width of all elements, and then use that when reformatting. Example: /home/larsi/: find . \( -maxdepth 1 \) -ls find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. 7077890 4 drwxr-xr-x 53 larsi larsi 4096 feb. 24 13:40 . 7078163 44 -rw------- 1 larsi larsi 43501 feb. 20 16:37 .bash_history 7131212 231220 -rw-rw-r-- 1 larsi larsi 236769280 des. 3 09:08 stream.dump 7104288 4 -rw-r--r-- 1 larsi larsi 840 aug. 2 2015 stats -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no