* bug#10262: 24.0.91; find-dired ignores cdr of find-ls-option
@ 2011-12-10 16:27 Philipp Haselwarter
2012-01-12 8:43 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Philipp Haselwarter @ 2011-12-10 16:27 UTC (permalink / raw)
To: 10262
Setting the cdr of `find-ls-option' does change the output of
`find-dired'. The problem seems to be with `dired-mode'
(cf. find-emacs.gz line 176).
To reproduce:
(progn
(setq find-ls-option '("-ls" . "-dlbh"))
(find-file "/tmp")
(call-interactively 'find-dired))
confirm twice:
"RET" "RET"
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.0.91/etc/DEBUG.
In GNU Emacs 24.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.8)
of 2011-11-19 on nzebook.haselwarter.org
configured using `configure '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib' '--mandir=/usr/share/man' '--without-sound' '--with-x-toolkit=gtk' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
shell-dirtrack-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
ESC [ > 8 3 ; 4 0 1 0 0 ; 0 c ( p r o g n RET ( s e
t q SPC f i n d - l s - o p t i o n SPC ' ( " - l s
" SPC . SPC " - d l b h " ) ) RET ( f i n d - f i l
e SPC " / t m p " ) ) RET C-p C-e C-b RET ( c a l l
- i n t e r a c t i v e l y SPC DEL TAB ESC TAB SPC
' DEL ' f i d DEL n d - d i r e d C-e ) C-x C-e C-j
- i n a m e SPC ' * * ' C-b C-b f o o RET C-x b * s
c TAB RET C-n ESC x e m a c s - b u TAB g C-a TAB TAB
RET
Recent messages:
("emacs" "--no-desktop")
For information about GNU Emacs and the GNU system, type C-h C-a.
"--no-desktop" ignored because the Desktop package is not loaded
Sole completion
(":%s")
find-dired *Find* finished.
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr message idna format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug help-mode easymenu view shell pcomplete comint ring find-dired
dired regexp-opt time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)
--
Philipp Haselwarter
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10262: 24.0.91; find-dired ignores cdr of find-ls-option
2011-12-10 16:27 bug#10262: 24.0.91; find-dired ignores cdr of find-ls-option Philipp Haselwarter
@ 2012-01-12 8:43 ` Glenn Morris
2012-01-12 10:44 ` Philipp Haselwarter
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2012-01-12 8:43 UTC (permalink / raw)
To: Philipp Haselwarter; +Cc: 10262
Philipp Haselwarter wrote:
> Setting the cdr of `find-ls-option' does change the output of
> `find-dired'. The problem seems to be with `dired-mode'
> (cf. find-emacs.gz line 176).
>
> To reproduce:
>
> (progn
> (setq find-ls-option '("-ls" . "-dlbh"))
> (find-file "/tmp")
> (call-interactively 'find-dired))
>
> confirm twice:
>
> "RET" "RET"
I think this is a misunderstanding. You can't just change the cdr of
find-ls-option, you have to change the car as well. find will produce
the file listing using the option specified in the car, then Emacs
switches to dired-mode, with the cdr telling it how to parse the output
of find.
So you probably want to use:
(setq find-ls-option '("-exec ls -dlbh {} +" . "-dlbh"))
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10262: 24.0.91; find-dired ignores cdr of find-ls-option
2012-01-12 8:43 ` Glenn Morris
@ 2012-01-12 10:44 ` Philipp Haselwarter
2012-01-13 2:34 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Philipp Haselwarter @ 2012-01-12 10:44 UTC (permalink / raw)
To: Glenn Morris; +Cc: 10262
Glenn Morris <rgm@gnu.org> writes:
> Philipp Haselwarter wrote:
>
>> Setting the cdr of `find-ls-option' does change the output of
>> `find-dired'. The problem seems to be with `dired-mode'
>> (cf. find-emacs.gz line 176).
>>
>> To reproduce:
>>
>> (progn
>> (setq find-ls-option '("-ls" . "-dlbh"))
>> (find-file "/tmp")
>> (call-interactively 'find-dired))
>>
>> confirm twice:
>>
>> "RET" "RET"
>
>
> I think this is a misunderstanding. You can't just change the cdr of
> find-ls-option, you have to change the car as well. find will produce
> the file listing using the option specified in the car, then Emacs
> switches to dired-mode, with the cdr telling it how to parse the output
> of find.
>
> So you probably want to use:
>
> (setq find-ls-option '("-exec ls -dlbh {} +" . "-dlbh"))
Thanks, I had a misconception about how much of the parsing was done by
dired, your solution works perfectly! Adding it as an example to the
docstring of `find-ls-option' would certainly clarify things.
--
Philipp Haselwarter
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10262: 24.0.91; find-dired ignores cdr of find-ls-option
2012-01-12 10:44 ` Philipp Haselwarter
@ 2012-01-13 2:34 ` Glenn Morris
0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2012-01-13 2:34 UTC (permalink / raw)
To: 10262-done
Version: 24.0.93
I changed it to say:
"A pair of options to produce and parse an `ls -l'-type list from `find'.
This is a cons of two strings (FIND-OPTION . LS-SWITCHES).
FIND-OPTION is the option (or options) passed to `find' to produce
a file listing in the desired format. LS-SWITCHES is a set of
`ls' switches that tell dired how to parse the output of `find'.
The two options must be set to compatible values.
For example, to use human-readable file sizes with GNU ls:
\(\"-exec ls -ldh {} +\" . \"-ldh\")
To use GNU find's inbuilt \"-ls\" option to list files:
\(\"-ls\" . \"-dilsb\")
since GNU find's output has the same format as using GNU ls with
the options \"-dilsb\"."
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-13 2:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-10 16:27 bug#10262: 24.0.91; find-dired ignores cdr of find-ls-option Philipp Haselwarter
2012-01-12 8:43 ` Glenn Morris
2012-01-12 10:44 ` Philipp Haselwarter
2012-01-13 2:34 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).