From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.help Subject: Re: Could someone give me a hint how to write my own function based on tramp? Date: Sat, 04 Sep 2010 20:29:50 +1000 Message-ID: <87fwxp7qe9.fsf@rimspace.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1283596534 12642 80.91.229.12 (4 Sep 2010 10:35:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Sep 2010 10:35:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 04 12:35:34 2010 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.69) (envelope-from ) id 1Orq5r-0001Xr-P0 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Sep 2010 12:35:32 +0200 Original-Received: from localhost ([127.0.0.1]:59618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Orq5r-0002Da-79 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Sep 2010 06:35:31 -0400 Original-Received: from [140.186.70.92] (port=54576 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Orq5N-0002CT-LR for help-gnu-emacs@gnu.org; Sat, 04 Sep 2010 06:35:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Orq5L-0002H2-FS for help-gnu-emacs@gnu.org; Sat, 04 Sep 2010 06:35:01 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:44503) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Orq5L-0002Gi-60 for help-gnu-emacs@gnu.org; Sat, 04 Sep 2010 06:34:59 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Orq5I-0001Lf-K6 for help-gnu-emacs@gnu.org; Sat, 04 Sep 2010 12:34:56 +0200 Original-Received: from ppp59-167-189-244.static.internode.on.net ([59.167.189.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Sep 2010 12:34:56 +0200 Original-Received: from daniel by ppp59-167-189-244.static.internode.on.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Sep 2010 12:34:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ppp59-167-189-244.static.internode.on.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:ztbgmpluTgLM0xwt5IpFYPbRq40= X-detected-operating-system: by eggs.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:74879 Archived-At: Lei Wang writes: > I want to write a function for my own use. It is going to be a wraper of an > operation sequence, such as, change to root, run some shell and create and > open a file. But i even can't find to use which tramp function, and how does > tramp start. Yeah. You probably won't find TRAMP much help in writing that, frankly, because it does a lot of things that are entirely irrelevant but quite complex compared to what you want. Anyway, it hooks in through the `file-name-handler-alist', and the methods `tramp{,completion-}-file-name-handler' which then go ahead and act on the path passed by the user. > Could anyone give some advices? If you define your problem better for us you can likely get better advice. Regards, Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons