unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Opening a "pseudo" file ?
@ 2009-11-19  0:26 Xavier Maillard
  2009-11-19  4:55 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Xavier Maillard @ 2009-11-19  0:26 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Subject is not really clear so let me explain.

Using Tramp, one can "open" files via different protocols being ftp, ssh, su ...

I want to add something else to this list, say wiki so I would do
C-x C-f /wiki::wiki-name:page wiki-name would be provided with
the help of my own package. Do you know how all this machinery
would play together ?

To sum things up, I want to both call directly my package entry
functions or Tramp mechanism to edit my wiki pages.

I hope I am clear :/

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Opening a "pseudo" file ?
  2009-11-19  0:26 Opening a "pseudo" file ? Xavier Maillard
@ 2009-11-19  4:55 ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2009-11-19  4:55 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: help-gnu-emacs

Xavier Maillard <xma@gnu.org> writes:

> Hi,

Hi,

> Using Tramp, one can "open" files via different protocols being ftp, ssh, su ...
>
> I want to add something else to this list, say wiki so I would do
> C-x C-f /wiki::wiki-name:page wiki-name would be provided with
> the help of my own package. Do you know how all this machinery
> would play together ?

It is described in (info "(elisp)Magic File Names")

In short: you add an entry to `file-name-handler-alist', let's say
("\\`/wiki:" . my-wiki-file-name-handler). `my-wiki-file-name-handler'
must be a function, which implements the primitive file name functions
listed in the manual, or calls another implementation of that function,
like the one from Tramp.

If it is of wider interest, we could also think about a more tight
integration into Tramp.

> To sum things up, I want to both call directly my package entry
> functions or Tramp mechanism to edit my wiki pages.

That's possible. Maybe you study the Tramp code. tramp-imap.el has been
added recently by Ted Zlatanov. tramp-smb.el has a similar history (it
was my first contribution to Tramp). Both provide handling for special
Tramp methods.

> I hope I am clear :/
>
> 	Xavier

Best regards, Michaell.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-19  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-19  0:26 Opening a "pseudo" file ? Xavier Maillard
2009-11-19  4:55 ` Michael Albinus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).