[Top][All Lists]

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

Re: Using emacsclient -t as $EDITOR from within Emacs

From: Suvayu Ali
Subject: Re: Using emacsclient -t as $EDITOR from within Emacs
Date: Fri, 6 Sep 2013 11:40:58 +0200
User-agent: Mutt/1.5.21 (2012-12-30)

Hi Nikolai,

On Fri, Sep 06, 2013 at 11:08:20AM +0200, Nikolai Weibull wrote:
> On Fri, Sep 6, 2013 at 10:57 AM, Suvayu Ali <address@hidden> wrote:
> > On Fri, Sep 06, 2013 at 02:59:21PM +0700, Yuri Khan wrote:
> >> On Fri, Sep 6, 2013 at 2:10 PM, Suvayu Ali <address@hidden> wrote:
> >> > I'm very curious, what does this offer you over simple C-x C-f.  The way
> >> > I see it, emacsclient is useful to have access to single Emacs instance
> >> > whenever you want to edit something, so you can connect to the instance
> >> > from anywhere.  But if you are already in an emacs frame, how does this
> >> > add anything?
> >> Many external programs, most notably version control systems such as
> >> Subversion and Git, like to call an external editor when they need
> >> some intermediate text that cannot be reasonably expected to be passed
> >> via the command line or via a pre-authored file.
> > Yes I'm aware of that.  That is why I myself use emacsclient most of the
> > time.  The OP however wants to call emacsclient from an emacs frame as
> > an asynchronous command.  I fail to see any usecase for that.  If I want
> > to edit something from an emacs frame, I would just open it.
> That wasn’t what I was asking for.  I led with that case, as that’s
> what it boiled down to, or so I thought, but I did explain that “I
> want to be able to execute commands that invoke $EDITOR, which I’ve
> set to a shell script that invokes emacsclient -t, from
> within Emacs (for example, from Dired) that’s running as a server”.

Almost all the cases I can think of where executing shell commands may
call $EDITOR, I can also think of very nice emacs libraries that provide
very mature integration.  A few examples:
- emails: Gnus, notmuch, vm, message-mode for simple composing, etc,
- using version control: vc-*, magit, etc,
- sudoedit/visudo: tramp

The only one I can think of without a mode like that is when I call
$EDITOR from my pager (less).  But of course running a pager from Emacs
does not make sense.  From the above examples, I can't imagine I would
call any of those from dired.  So I'm still a bit confused about the use
case.  Could you please give an example of the command you are using?

Sorry if I'm being a bit dense, I'm just very curious and would like to



Open source is the future. It sets us free.

reply via email to

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