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

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

Re: bash/readline emacs mode help


From: J. David Boyd
Subject: Re: bash/readline emacs mode help
Date: Thu, 27 Jun 2013 13:49:03 -0400
User-agent: Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.3 (cygwin)

Barry Margolin <barmar@alum.mit.edu> writes:

> In article <mailman.2565.1372339817.22516.help-gnu-emacs@gnu.org>,
>  david@adboyd.com (J. David Boyd) wrote:
>
>> david@adboyd.com (J. David Boyd) writes:
>> 
>> > Teemu Likonen <tlikonen@iki.fi> writes:
>> >
>> >> C. K. Kashyap [2013-06-27 14:44:21 +05:30] wrote:
>> >>
>> >>> One of the things I get with this mode is the ability to open up vi to
>> >>> edit a command line (using Escape v) [...]
>> >>>
>> >>> I was wondering if there is an equivalent in emacs mode?
>> >>
>> >> In Emacs editing mode the key "C-x C-e" (edit-and-execute-command) opens
>> >> the text editor defined in $VISUAL or $EDITOR variables (or "emacs").
>> >
>> > Doesn't seem all that useful though.  I have my $EDITOR set to be
>> > "emacsclient -n", which doesn't work at all in this circumstance.
>> >
>> > If I get rid of the '-n' it works fine, but I'm not doing that....
>> 
>> 
>> Hmm, should have clarified.   Yes, emacsclient works perfectly, opening up 
>> the
>> command line in a new emacs buffer.   But the '-n' breaks the connection to
>> the command line, so even though I can edit it to my heart's content, there 
>> is
>> no way to have it fed back to the waiting command line.
>> 
>> Dave
>
> Why would you put -n in $EDITOR? This is mostly used by programs that 
> want to invoke an editor on a temp file and then do something when 
> you're done editing it, such as "crontab -e", "vipw", or readline's C-x 
> C-e.  So it should always be set to a command that waits.
>
> Maybe you're trying to deal with Emacs deadlocking if you use one of 
> these commands from M-! inside Emacs? The solution in this case is to 
> background the command with &.

Because I always have emacs running.  And I didn't want to have to C-x # to
get a command shell prompt back.

Guess I'll have to change my process.   I can leave $EDITOR=emacsclient, and
have an alias for 'emacsclient -n' when I want to call it directly.

Yeah, that will work.

Thanks for this thread, I think my workflow just got better.

Dave




reply via email to

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