[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rfn-eshadow
From: |
Michael Albinus |
Subject: |
Re: rfn-eshadow |
Date: |
Thu, 03 Jan 2008 23:12:34 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) |
Juri Linkov <address@hidden> writes:
> 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)))
I'm not in favour of this solution, because it introduces file name
handling at a place we won't remember in the future. The clean way would
be to add a file name handler, which offers its own implementation of
substitute-in-file-name.
Doesn't exist something like this already in the url package?
Best regards, Michael.
- address@hidden: ffap; prompt turns color misleadingly], Richard Stallman, 2008/01/03
- rfn-eshadow (Was: address@hidden: ffap; prompt turns color misleadingly]), Juri Linkov, 2008/01/03
- Re: rfn-eshadow,
Michael Albinus <=
- 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
- Re: rfn-eshadow, Juri Linkov, 2008/01/06