From: Lars Ingebrigtsen <larsi@gnus.org>
To: Jean-Pierre De Schacht <xaos52@gmail.com>
Cc: 17307@debbugs.gnu.org
Subject: bug#17307: find-dired
Date: Wed, 24 Feb 2016 13:44:42 +1100 [thread overview]
Message-ID: <87mvqqomhx.fsf@gnus.org> (raw)
In-Reply-To: <CALyLa+MvK26YSdve2m0Ys-EsMvmr5TOqudBaCXXp2i8sJJE-NQ@mail.gmail.com> (Jean-Pierre De Schacht's message of "Thu, 24 Apr 2014 16:30:46 +0200")
Jean-Pierre De Schacht <xaos52@gmail.com> 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
prev parent reply other threads:[~2016-02-24 2:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 11:53 bug#17307: 24.3.90; find-dired xaos52
2014-04-24 14:23 ` bug#17307: find-dired Jean-Pierre De Schacht
2014-04-24 14:30 ` Jean-Pierre De Schacht
2016-02-24 2:44 ` Lars Ingebrigtsen [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvqqomhx.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=17307@debbugs.gnu.org \
--cc=xaos52@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.