[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash/readline emacs mode help
From: |
Barry Margolin |
Subject: |
Re: bash/readline emacs mode help |
Date: |
Thu, 27 Jun 2013 11:27:35 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
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 &.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***