all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ido-show-dot-for-dired
@ 2012-02-04 22:05 Christoph Scholtes
  2012-02-05  8:28 ` ido-show-dot-for-dired Leo
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Scholtes @ 2012-02-04 22:05 UTC (permalink / raw
  To: Emacs-Devel devel

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)
      ido-temp-list))

@@ -4727,6 +4728,8 @@
  	 (ido-directory-too-big (and (not ido-directory-nonreadable)
  				     (ido-directory-too-big-p ido-current-directory)))
  	 (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))


WDYT?

Christoph



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-06  6:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04 22:05 ido-show-dot-for-dired Christoph Scholtes
2012-02-05  8:28 ` ido-show-dot-for-dired Leo
2012-02-05 19:38   ` ido-show-dot-for-dired Christoph Scholtes
2012-02-06  3:51     ` ido-show-dot-for-dired Leo
2012-02-06  4:13       ` ido-show-dot-for-dired Christoph Scholtes
2012-02-06  6:45         ` ido-show-dot-for-dired Leo

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.