[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rfn-eshadow (Was: address@hidden: ffap; prompt turns color misleadingly]
From: |
Juri Linkov |
Subject: |
rfn-eshadow (Was: address@hidden: ffap; prompt turns color misleadingly]) |
Date: |
Thu, 03 Jan 2008 23:42:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
> I doubt that Michelangelo Grigni is still involved in ffap.el.
> Someone else interested in ffap.el might want to work on this.
ffap.el mentions FSF as a maintainer, but actually this bug has nothing
to do with ffap.
The problem is that even if ffap is disabled, when typing an URL in the
minibuffer, rfn-eshadow.el threats it as a file name, and puts a shadow
over the `http:' part because it contains double slashes //.
I think the right way to fix this problem is the following patch that
prevents handling of URLs by file-name-shadow-mode:
Index: lisp/rfn-eshadow.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/rfn-eshadow.el,v
retrieving revision 1.26
diff -u -w -b -r1.26 rfn-eshadow.el
--- lisp/rfn-eshadow.el 21 Sep 2007 05:24:05 -0000 1.26
+++ lisp/rfn-eshadow.el 3 Jan 2008 21:36:44 -0000
@@ -177,7 +177,10 @@
`file-name-shadow-mode'; the minibuffer should have already
been set up by `rfn-eshadow-setup-minibuffer'."
(condition-case nil
- (let ((goal (substitute-in-file-name (minibuffer-contents)))
+ (let* ((mc (minibuffer-contents))
+ (goal (if (string-match-p "\\`\\(https?\\|ftp\\|file\\)://" mc)
+ mc
+ (substitute-in-file-name mc)))
(mid (overlay-end rfn-eshadow-overlay))
(start (minibuffer-prompt-end))
(end (point-max)))
> From: address@hidden
> Subject: ffap; prompt turns color misleadingly
> To: Michelangelo Grigni <address@hidden>
> Cc: address@hidden
> Date: Mon, 31 Dec 2007 07:45:50 +0800
>
> $ emacs -Q file_with_url_in_it
> Put the cursor on the URL, do M-x ffap.
> Now add some slashes at the end of the URL. The preceding part of the URL
> changes color, making us think that we are now just referring to the local
> file system as the usual shortcut: /wrong//right, but in fact it is all
> appended to the URL anyway!
>
> Also please use a third color for the "http:/" and "ftp:/", or use the
> same color as the rest of the URL. Currently you use the "discarded
> text" color, which is not exactly right, as it is indeed part of the URL.
--
Juri Linkov
http://www.jurta.org/emacs/
- address@hidden: ffap; prompt turns color misleadingly], Richard Stallman, 2008/01/03
- rfn-eshadow (Was: address@hidden: ffap; prompt turns color misleadingly]),
Juri Linkov <=
- Re: rfn-eshadow, Michael Albinus, 2008/01/03
- Re: rfn-eshadow, Stefan Monnier, 2008/01/03
- Re: rfn-eshadow, Juri Linkov, 2008/01/04
- Re: rfn-eshadow, Michael Albinus, 2008/01/04
- Re: rfn-eshadow, Juri Linkov, 2008/01/04
- Re: rfn-eshadow, Michael Albinus, 2008/01/04
- Re: rfn-eshadow, Juri Linkov, 2008/01/05
- Re: rfn-eshadow, Stefan Monnier, 2008/01/05
- Re: rfn-eshadow, Michael Albinus, 2008/01/06