[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Turning on file-name-shadow-mode by default
From: |
Stefan Monnier |
Subject: |
Re: Turning on file-name-shadow-mode by default |
Date: |
Tue, 15 Nov 2005 17:57:24 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> Has anyone else tried this patch yet?
>> I did. It seems to work very well.
> Does it handle the "http://"; prefix correctly?
If the file syntax handles http:// specially (i.e. if you turn on
url-handler-mode), then yes, it works correctly. It directly uses
substitute-in-file-name, so (modulo bugs) it should work 100% correctly in
the sense that the full text will always be interpreted identically to the
non-shadowed text.
Regarding FFAP, file-name-shadow-mode handles it incorrectly because
file-name-shadow-mode assumes that when minibuffer-completing-file-name is
non-nil, the minibuffer's content will eventually be passed to
substitute-in-file-name, which is not the case for FFAP. The fact that FFAP
sets minibuffer-completing-file-name to non-nil even though it allows
entering a string which is not a proper file name (i.e. not understood by
file operations) could be considered a bug. E.g. the patch below to
complete.el (which should be installed) would also cause problems with FFAP.
Stefan
--- complete.el 20 aoĆ» 2005 19:26:01 -0400 1.45
+++ complete.el 15 nov 2005 17:47:05 -0500
@@ -339,10 +339,7 @@
(defvar PC-delims-list nil)
(defvar PC-completion-as-file-name-predicate
- (function
- (lambda ()
- (memq minibuffer-completion-table
- '(read-file-name-internal read-directory-name-internal))))
+ (lambda () minibuffer-completing-file-name)
"A function testing whether a minibuffer completion now will work
filename-style.
The function takes no arguments, and typically looks at the value
of `minibuffer-completion-table' and the minibuffer contents.")
- Re: Turning on file-name-shadow-mode by default, (continued)
- Re: Turning on file-name-shadow-mode by default, Juri Linkov, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Luc Teirlinck, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Juri Linkov, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Luc Teirlinck, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Miles Bader, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Juri Linkov, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Luc Teirlinck, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Juri Linkov, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Luc Teirlinck, 2005/11/14
- Re: Turning on file-name-shadow-mode by default, Luc Teirlinck, 2005/11/14
- Re: Turning on file-name-shadow-mode by default,
Stefan Monnier <=
- Re: Turning on file-name-shadow-mode by default, Richard M. Stallman, 2005/11/15
- Re: Turning on file-name-shadow-mode by default, Stefan Monnier, 2005/11/15
- Re: Turning on file-name-shadow-mode by default (was: opening /tmp//foo doesn't work.), Richard M. Stallman, 2005/11/13
- Re: opening /tmp//foo doesn't work., Richard M. Stallman, 2005/11/12
- Re: opening /tmp//foo doesn't work., Stefan Monnier, 2005/11/13