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 13:31:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Gary <help-gnu-emacs@garydjones.name> 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? It kind of popped up because
>>>> if you do something with svn that requires editing something, I got
>>>> ,----
>>>> | $ svn pe svn:ignore .
>>>> | emacs: Terminal type "dumb" is not powerful enough to run Emacs.
>> ..
>>> Set your EDITOR to use emacsclient.
>>
>> It is, actually. Although I suspect it wasn't working correctly before
>> because of my confusion between EDITOR and my aliases. Now, however,
>> having set it explicitly to emacsclient:
>>
>> ,----
>> | /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?
>
> 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.
>
> If so, use as EDITOR:(make a script maybe)
>
> emacsclient -a "" "$@"
> or
> emacsclient -a "emacs -Q" "$@"
>
> Be sure also you have an emacs server running.

To simplify things, the whole point of the alternate-editor="" is that it 
starts the emacs
server for you.

I find it a lot easier to compartmentalise it all inside a script (edit
in the link above and simply set EDITOR to that script)

But yes, using -t would be wrong and isn't suggested in the linked
info. 

My edit command is currently set as 

,----
| #!/bin/bash
| # edit
| export GDK_NATIVE_WINDOWS=1
| exec emacsclient --alternate-editor="" "$@"
`----






reply via email to

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