[Top][All Lists]

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

Re: Opening a "pseudo" file ?

From: Michael Albinus
Subject: Re: Opening a "pseudo" file ?
Date: Thu, 19 Nov 2009 05:55:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Xavier Maillard <address@hidden> writes:

> 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.

reply via email to

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