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

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

Re: eshell - editing files


From: Richard Riley
Subject: Re: eshell - editing files
Date: Tue, 22 Jun 2010 17:54:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Gary <help-gnu-emacs@garydjones.name> writes:

> Thierry Volpiatto writes:
>> Gary writes:
>>> Richard Riley writes:
>>>> Gary writes:
>>>>> This may sound like a weird question. Is there any way to configure
>>>>> eshell so that when I want to edit a file, e.g. by typing "emacs foo", I
>>>>> instead get a new buffer with the file in?
> ...
>>> ,----
>>> | /home/jg/work/drivers/lib/Src $ env | grep "EDITOR"
>>> | EDITOR=emacsclient -t --alternate-editor=""
>>> |
>>> | /home/jg/work/drivers/lib/Src $ svn pe svn:ignore .
>>> | *ERROR*: Terminal type "dumb" is not powerful enough to run Emacs
>>> | No changes to property 'svn:ignore' on '.'
>>> `----
>>
>> Are you running these commands from inside emacs? eshell? where?
>
> Yes, inside eshell, which is inside an emacsclient/server pair.
>
>> If yes, because your EDITOR is bind to emacsclient -t, it try to open an
>> emacsclient inside the emacs terminal (eshell or something else) and it
>> fail because terminal is not powerful enough to run emacs.
>
> Aha! Yes. Adding
>
> (eshell/export "EDITOR=emacsclient")
>
> to ~/.eshell/login makes everything work :) Yippee!
>
> Thanks, all.
>

If you follow the advice elsewhere in the thread and bind it to an edit
script and use the --alternate-editor="" in the script you wont have to
worry about starting the daemon yourself - emacsclient will do it for
you. 

The benefit is then that other apps can use EDITOR too without knowing
anything about emacs.







reply via email to

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