all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Juri Linkov <juri@jurta.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: rfn-eshadow
Date: Thu, 03 Jan 2008 23:12:34 +0100	[thread overview]
Message-ID: <877iiqblt9.fsf@gmx.de> (raw)
In-Reply-To: <87k5mq60y8.fsf@jurta.org> (Juri Linkov's message of "Thu, 03 Jan 2008 23:42:07 +0200")

Juri Linkov <juri@jurta.org> 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.

  reply	other threads:[~2008-01-03 22:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03  9:51 [jidanni@jidanni.org: ffap; prompt turns color misleadingly] Richard Stallman
2008-01-03 21:42 ` rfn-eshadow (Was: [jidanni@jidanni.org: ffap; prompt turns color misleadingly]) Juri Linkov
2008-01-03 22:12   ` Michael Albinus [this message]
2008-01-03 22:28     ` rfn-eshadow Juri Linkov
2008-01-04  2:51   ` rfn-eshadow Stefan Monnier
2008-01-04  9:51     ` rfn-eshadow Juri Linkov
2008-01-04 12:11       ` rfn-eshadow Michael Albinus
2008-01-04 21:52         ` rfn-eshadow Juri Linkov
2008-01-04 22:23           ` rfn-eshadow Michael Albinus
2008-01-05 10:36             ` rfn-eshadow Juri Linkov
2008-01-05 22:34               ` rfn-eshadow Stefan Monnier
2008-01-06 14:08                 ` rfn-eshadow Michael Albinus
2008-01-06 21:54                   ` rfn-eshadow Juri Linkov
2008-01-07  6:57                     ` rfn-eshadow Michael Albinus
2008-01-09  0:59                       ` rfn-eshadow Juri Linkov
2008-01-09  2:17                         ` rfn-eshadow Stefan Monnier
2008-01-09  8:13                           ` rfn-eshadow Michael Albinus
2008-01-05  5:54     ` rfn-eshadow Richard Stallman

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=877iiqblt9.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=rms@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.