From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Opening a "pseudo" file ? Date: Thu, 19 Nov 2009 05:55:38 +0100 Message-ID: <878we32jw5.fsf@gmx.de> References: <200911190026.nAJ0QAlE018742@fed.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258606581 355 80.91.229.12 (19 Nov 2009 04:56:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 04:56:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xavier Maillard Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 19 05:56:14 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAz41-0003Ob-QD for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 05:56:14 +0100 Original-Received: from localhost ([127.0.0.1]:35393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAz40-0003U0-Vi for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Nov 2009 23:56:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAz3b-0003Sf-KN for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 23:55:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAz3W-0003LV-4N for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 23:55:46 -0500 Original-Received: from [199.232.76.173] (port=39736 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAz3V-0003LI-Ud for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 23:55:41 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]:37166) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NAz3V-0004gT-5n for help-gnu-emacs@gnu.org; Wed, 18 Nov 2009 23:55:41 -0500 Original-Received: (qmail invoked by alias); 19 Nov 2009 04:55:39 -0000 Original-Received: from p57A21D57.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.29.87] by mail.gmx.net (mp045) with SMTP; 19 Nov 2009 05:55:39 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18jLOklZiYjMAww8jWRO1I2WdPJsFEoE4wrUs2SpB dZZPyRwFyMDycp In-Reply-To: <200911190026.nAJ0QAlE018742@fed.local> (Xavier Maillard's message of "Thu, 19 Nov 2009 01:26:10 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69897 Archived-At: Xavier Maillard 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.