all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: david@adboyd.com (J. David Boyd)
To: help-gnu-emacs@gnu.org
Subject: Re: bash/readline emacs mode help
Date: Thu, 27 Jun 2013 13:49:03 -0400	[thread overview]
Message-ID: <m9hihagj8mwg.fsf@W0144758.usac.mmm.com> (raw)
In-Reply-To: barmar-7EBCAA.11273527062013@news.eternal-september.org

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	other threads:[~2013-06-27 17:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  9:14 bash/readline emacs mode help C K Kashyap
2013-06-27  9:30 ` Teemu Likonen
2013-06-27 13:17   ` J. David Boyd
2013-06-27 13:24     ` J. David Boyd
     [not found]     ` <mailman.2565.1372339817.22516.help-gnu-emacs@gnu.org>
2013-06-27 15:27       ` Barry Margolin
2013-06-27 17:49         ` J. David Boyd [this message]
2013-06-28 10:30           ` Thien-Thi Nguyen
2013-06-29 16:05     ` C K Kashyap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m9hihagj8mwg.fsf@W0144758.usac.mmm.com \
    --to=david@adboyd.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.