[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: url-handler-file-remote-p
From: |
Stefan Monnier |
Subject: |
Re: url-handler-file-remote-p |
Date: |
Wed, 06 Feb 2008 09:44:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
>>> Just being curious: url-handlers.el misses an own implementation of
>>> `file-remote-p'; shouldn't it be there?
>>
>> Yes, it should. Patches welcome ;-)
> What about this one:
> (defun url-handler-file-remote-p (filename &optional identification connected)
> ;; Maybe we can find a suitable check for CONNECTED.
> ;; FIXME: if `filename' is a "file://" URL it shall be nil. But this
> ;; must be introduced together with other primitive functions, like
> ;; `unhandled-file-name-directory'.
> (let ((url (url-generic-parse-url filename)))
> (when (url-type url)
> (cond
> ((eq identification 'method) (url-type url))
> ((eq identification 'user) (url-user url))
> ((eq identification 'host) (url-host url))
> ((eq identification 'localname) (url-filename url))
> (t (url-recreate-url
> (url-parse-make-urlobj (url-type url) (url-user url) nil
> (url-host url) (url-port url))))))))
Looks good.
Stefan
- Re: testing for a remote file to include file on a Windows mappeddrive, Stefan Monnier, 2008/02/01
- Re: testing for a remote file to include file on a Windows mappeddrive, Michael Albinus, 2008/02/03
- Re: testing for a remote file to include file on a Windows mappeddrive, Stefan Monnier, 2008/02/04
- Re: testing for a remote file to include file on a Windows mappeddrive, Michael Albinus, 2008/02/05
- Re: testing for a remote file to include file on a Windows mappeddrive, Stefan Monnier, 2008/02/05
- Re: testing for a remote file to include file on a Windows mappeddrive, Michael Albinus, 2008/02/05
- Re: testing for a remote file to include file on a Windows mappeddrive, Stefan Monnier, 2008/02/05
- Re: testing for a remote file to include file on a Windows mappeddrive, Michael Albinus, 2008/02/05
- url-handler-file-remote-p (was: testing for a remote file to include file on a Windows mappeddrive), Michael Albinus, 2008/02/05
- Re: url-handler-file-remote-p,
Stefan Monnier <=
- Re: url-handler-file-remote-p, Michael Albinus, 2008/02/06