help-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Nikolai Weibull
Subject: Re: Using emacsclient -t as $EDITOR from within Emacs
Date: Fri, 6 Sep 2013 08:02:47 +0200

On Fri, Sep 6, 2013 at 1:36 AM, Felix Dietrich
<address@hidden> wrote:
> Nikolai Weibull <address@hidden> writes:
>> Invoking emacsclient -t from shell-command gives me
>>
>> emacsclient: could not get terminal name
>>
>> It seems that ttyname (fileno (stdio)) fails, which doesn’t seem
>> unreasonable, I suppose, but I was wondering how I should get around
>> this.  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 and
>> so far I’m only either failing with errors or locking up my terminal.
>
> If you can leave off the parameter '-t' emacsclient will simply open the
> file on the emacs-server.  You can than edit the file in you current
> emacs window in you text-shell, or you could if your terminal wouldn't
> lock.  Adding an ampersand '&' to the COMMAND string passed to
> `shell-command' will run it asynchronously so that you will be able to
> continue editing while your command is running in the background, which
> it will, because it is you trying to interactively edit a file.

Precisely.  I figured this out yesterday evening.  I had figured that
the -t would allow for a new frame to be created in the daemon and
displayed “over” the current one on the same terminal, but leaving off
-t and running asynchronously seems to be the only way.

Thanks!



reply via email to

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