[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Christoph Scholtes
Subject: ido-show-dot-for-dired
Date: Sat, 04 Feb 2012 15:05:09 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120129 Thunderbird/10.0

Is there a reason why ido-show-dot-for-dired only has an effect in file name lists and not dir name lists?

I.e. (setq ido-show-dot-for-dired nil) will not show the dot in file name lists, but it will in dir name lists always, e.g. with C-x d. I think it's annoying to have the dot in the dir list and have to do C-s when I could just hit Enter to get to the only other subdirectory.

So, I am proposing to extend ido-show-dot-for-dired to include the directory lists. Setting ido-show-dot-for-dired to nil would disable the . in file and directory lists or enable it in both with non-nil.

Unless somebody comes up with a reason why you would want it in one and not the other, this patch would accomplish it:

=== modified file 'lisp/ido.el'
--- lisp/ido.el 2012-02-04 00:59:58 +0000
+++ lisp/ido.el 2012-02-04 21:20:47 +0000
@@ -3643,9 +3643,10 @@
                (delete default ido-temp-list))
          (setq ido-temp-list
                (cons default ido-temp-list))))
-    (setq ido-temp-list (delete "." ido-temp-list))
-    (unless ido-input-stack
-      (setq ido-temp-list (cons "." ido-temp-list)))
+    (when ido-show-dot-for-dired
+      (setq ido-temp-list (delete "." ido-temp-list))
+      (unless ido-input-stack
+        (setq ido-temp-list (cons "." ido-temp-list))))
     (run-hooks 'ido-make-dir-list-hook)

@@ -4727,6 +4728,8 @@
         (ido-directory-too-big (and (not ido-directory-nonreadable)
         (ido-work-directory-index -1)
+         (ido-show-dot-for-dired (and ido-show-dot-for-dired
+                                      (not default-dirname)))
         (ido-work-file-index -1))
     (setq filename
(ido-read-internal 'dir prompt 'ido-file-history default-dirname mustmatch initial))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]