From: Tu Do <tuhdo1710@gmail.com>
To: 17218@debbugs.gnu.org
Subject: bug#17218: 24.3; Dired does not insert subdirs when used with switch "--group-directories-first"
Date: Mon, 7 Apr 2014 21:12:59 +0700 [thread overview]
Message-ID: <CAOEd9jnW5Vki5HLwjk6EyUOgTDT1i2kkVpjAKhsy=DQCea57YQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5118 bytes --]
If I remove the switch "--group-directories-first", then Bookmark Jump
works as expected. However, as long as the switch is put in,
sub-directories won't be inserted again.
I found out the problem in the function "dired-insert-old-subdirs" at line
1367 in dired.el. In this function, it has an or:
(defun dired-insert-old-subdirs (old-subdir-alist)
"Try to insert all subdirs that were displayed before.
Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(or (string-match "R" dired-actual-switches)
(let (elt dir)
(while old-subdir-alist
(setq elt (car old-subdir-alist)
old-subdir-alist (cdr old-subdir-alist)
dir (car elt))
(condition-case ()
(progn
(dired-uncache dir)
(dired-insert-subdir dir))
(error nil))))))
The functional call to string-match:
(string-match "R" dired-actual-switches)
is the root cause. If dired-actual-switches is "-lha", then string-match
returns nil, and the code for inserting subdirs is going to be executed.
However, with dired-actual-switches is "--group-directories-first -lha",
then string-match returns 3, making the or call returns true immediately
and subdirs are never inserted.
"ls -R" recursively list directories. But matching it this way is
incorrect, since we have listing switches that contain character "R" in
it (i.e. --group-directories-first).
Hope that help.
Regards,
Tu.
In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
of 2014-04-01 on oldfriend
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
System Description: Ubuntu 13.04
Configured using:
`configure '--with-x-toolkit=gtk''
Important settings:
value of $LC_MONETARY: en_US.UTF-8
value of $LC_NUMERIC: en_US.UTF-8
value of $LC_TIME: en_US.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Bookmark Menu
Minor modes in effect:
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
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-v M-v M-v C-x k <return> e C-c C-c C-x o C-n C-n
C-n C-p k x C-x 1 C-x C-g C-h v d i r e d - l i s <tab>
<return> C-s c u s C-g C-x o C-s c u s C-f <return>
C-n C-n C-n C-n C-n C-n C-n C-n C-e SPC - - g r o u
p - d i r e c t o r i e s - f i r s t C-n C-a C-f C-f
C-f C-f <return> 0 q q C-x o C-x d . e m <tab> . d
<tab> <return> C-n C-n C-p i k C-n C-n C-n C-v M-v
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n M-v
M-v M-v M-v C-v C-v C-v C-v C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n
C-n C-n C-n C-n C-n C-x 1 C-x r l C-x b <return> C-x
r m <return> C-x C-g C-x b <return> <return> C-v C-v
C-x k <return> <return> C-v C-v C-v M-v M-v M-v C-x
k <return> M-x e m <tab> a <tab> b u <tab> <backspace>
<backspace> r <tab> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> b u
g <tab> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
r e <tab> <tab> <backspace> <backspace> e m a <tab>
<tab> <tab> <backspace> <backspace> <backspace> <backspace>
<backspace> M-x M-x r e p o <tab> t <tab> <backspace>
r <tab> e <backspace> <return>
Recent messages:
Resetting customization items...done
Creating customization setup...done
Mark set
Killed 0 lines.
scroll-up-command: End of buffer [2 times]
scroll-down-command: Beginning of buffer [2 times]
Making completion list... [3 times]
completing-read-default: Command attempted to use minibuffer while in
minibuffer
Quit
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils cus-edit cus-start cus-load wid-edit misearch
multi-isearch bookmark pp dired-aux help-mode easymenu help-fns dired
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
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 macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)
[-- Attachment #2: Type: text/html, Size: 6505 bytes --]
next reply other threads:[~2014-04-07 14:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 14:12 Tu Do [this message]
2014-04-07 16:00 ` bug#17218: 24.3; Dired does not insert subdirs when used with switch "--group-directories-first" Drew Adams
2014-04-08 8:45 ` Juri Linkov
2014-04-27 8:30 ` Juri Linkov
2014-05-03 9:23 ` Juri Linkov
2014-05-07 19:50 ` Glenn Morris
2014-05-07 20:14 ` Juri Linkov
2014-05-08 18:15 ` Glenn Morris
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='CAOEd9jnW5Vki5HLwjk6EyUOgTDT1i2kkVpjAKhsy=DQCea57YQ@mail.gmail.com' \
--to=tuhdo1710@gmail.com \
--cc=17218@debbugs.gnu.org \
/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.