all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christoph Scholtes <cschol2112@googlemail.com>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: ido-show-dot-for-dired
Date: Sat, 04 Feb 2012 15:05:09 -0700	[thread overview]
Message-ID: <4F2DAB95.2030308@gmail.com> (raw)

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



             reply	other threads:[~2012-02-04 22:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-04 22:05 Christoph Scholtes [this message]
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

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=4F2DAB95.2030308@gmail.com \
    --to=cschol2112@googlemail.com \
    --cc=emacs-devel@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.