all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lei Wang <f3d27b@gmail.com>
To: Daniel Pittman <daniel@rimspace.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Could someone give me a hint how to write my own function based on tramp?
Date: Sat, 4 Sep 2010 20:54:03 +0800	[thread overview]
Message-ID: <AANLkTikvRGW0H2ocac0iBJxkneyRjfvG-pzF8VWqYFJr@mail.gmail.com> (raw)
In-Reply-To: <87fwxp7qe9.fsf@rimspace.net>

On 9/4/10, Daniel Pittman <daniel@rimspace.net> wrote:
> Lei Wang <f3d27b@gmail.com> 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.

Thanks for this information.

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

Ok. Nowadays, when i want to access a crypto partition, i do the
following steps, open a shell, su to root, /sbin/cryptsetup luksOpen,
mount, create a file, edit, save, umount, /sbin/cryptsetup luksClose.
It's very annoying. So i want to make a wrapper function. Of course,
the 2 times  password inputs couldn't be bypassed.

>
> Regards,
>         Daniel
> --
> ✣ Daniel Pittman            ✉ daniel@rimspace.net            ☎ +61 401 155
> 707
>                ♽ made with 100 percent post-consumer electrons
>
>
>


--
Regards,
Lei



  reply	other threads:[~2010-09-04 12:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-04  9:16 Could someone give me a hint how to write my own function based on tramp? Lei Wang
2010-09-04 10:29 ` Daniel Pittman
2010-09-04 12:54   ` Lei Wang [this message]
2010-09-04 18:45     ` Michael Albinus
2010-09-05  1:51       ` Lei Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikvRGW0H2ocac0iBJxkneyRjfvG-pzF8VWqYFJr@mail.gmail.com \
    --to=f3d27b@gmail.com \
    --cc=daniel@rimspace.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.