[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-orgmode] Re: Attention XEmacs users

From: Carsten Dominik
Subject: Re: [Emacs-orgmode] Re: Attention XEmacs users
Date: Wed, 21 Jun 2006 06:55:27 +0200

This is excellent, thank you very much.

- Carsten

On Jun 21, 2006, at 2:15, Michael Olson wrote:

Carsten Dominik <address@hidden> 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 \"/address@hidden:/foo\" specifies a location
on the system \"/address@hidden:\"."
  (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 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

Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

reply via email to

[Prev in Thread] Current Thread [Next in Thread]