[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gtags.el and ido.el
Re: gtags.el and ido.el
Sat, 12 Jun 2004 09:13:57 +0200 (CEST)
>>>>> "Shigio" == Shigio Yamaguchi <address@hidden> writes:
thanks for the quick response! I found a solution by customizing
`ido.el'. Sorry, should have checked more thoroughly.
Shigio> Why the 'read-file-name' of ido.el cannot read directory name though
Shigio> the original can do it?
Here's the part explaining it from the `ido.el' documentation:
;; Replacement for read-buffer and read-file-name
;; ido-read-buffer and ido-read-file-name have been written to be drop
;; in replacements for the normal buffer and file name reading
;; functions `read-buffer' and `read-file-name'.
;; To use ido for all buffer and file selections in Emacs, customize the
;; variable `ido-everywhere'.
;; Using ido-like behaviour in other lisp packages
;; If you don't want to rely on the `ido-everywhere' functionality,
;; ido-read-buffer, ido-read-file-name, and ido-read-directory-name
;; can be used by other packages to read a buffer name, a file name,
;; or a directory name in the `ido' way.
Now the `ido way' means for my case that when I want to open a directory, the
minibuffer dialogue only lists directories. If I want to open a file,
directories and files are displayed, but if I press return on a directory, all
subdirectories and files in that directory are displayed. So when `ido.el'
thinks I want to open a file, I cannot select a directory. That's what happens
when `gtags-visit-rootdir' is called. But checking `ido.el' I found that in the
version now included in CVS Emacs, there is the
`ido-read-file-name-as-directory-commands' variable which can be customized for
cases in which `ido.el' becomes confused.
Shigio> To our regret, all doesn't work when I tested the followings:
Shigio> GNU Emacs 20.4.1(FreeBSD 4.3) GNU Emacs 21.2.1(RedHat GNU/Linux
Yes, I only checked if the function was available in XEmacs and GNU Emacs from
CVS. But in GNU Emacs, `read-directory-name' is a new convenience function using
`read-file-name' defined in `files.el'. So my approach does not work for older
versions of GNU Emacs.
Shigio> Rewriting gtags.el using new procedure 'read-directory-name' makes a
Shigio> lot of users unhappy. Isn't there something good solution? Anyway,
Shigio> thank you for your report! -- Shigio Yamaguchi <address@hidden>
Shigio> - Tama Communications Corporation PGP fingerprint: D1CB 0B89 B346
Shigio> 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3
So my problem is solved by reading the documentation and adapting
`ido-read-file-name-as-directory-commands'. Sorry to bother you. Should have put
more thought into it before posting.
Contact information and PGP key at
But if you're paranoid long enough, sooner or later you're gonna be
Friedman, Kinky (1993), A case of Lone Star. New York (Wings Books),