This is excellent, thank you very much.
- Carsten
On Jun 21, 2006, at 2:15, Michael Olson wrote:
Carsten Dominik <[EMAIL PROTECTED]> writes:
I just found file-remote-p, which may be the right solution.
XEmacs and Emacs22 both have this function, but in case you need
backwards compatibility with Emacs21, feel free to use something like
the following. This handles both Tramp and ange-ftp file specifiers.
(defun org-file-remote-p (file)
"Test whether FILE specifies a location on a remote system.
Return non-nil if the location is indeed remote.
For example, the filename \"/[EMAIL PROTECTED]:/foo\" specifies a location
on the system \"/[EMAIL PROTECTED]:\"."
(cond ((fboundp 'file-remote-p)
(file-remote-p file))
((fboundp 'tramp-handle-file-remote-p)
(tramp-handle-file-remote-p file))
((and (boundp 'ange-ftp-name-format)
(string-match ange-ftp-name-format file))
t)
(t nil)))
--
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: Emacs Lisp, text markup, protocols -- Jabber:
mwolson_at_hcoop.net
/` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG
|_] | \| |_| Project involvement: Emacs, Muse, Planner, ERC, EMMS
_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode