From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: david@adboyd.com (J. David Boyd) Newsgroups: gmane.emacs.help Subject: Re: bash/readline emacs mode help Date: Thu, 27 Jun 2013 13:49:03 -0400 Message-ID: References: <87hagjgatk.fsf@mithlond.arda> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372356037 17430 80.91.229.3 (27 Jun 2013 18:00:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Jun 2013 18:00:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 20:00:36 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UsGUe-0004JU-CK for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 20:00:28 +0200 Original-Received: from localhost ([::1]:43653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsGUd-0000Qq-TR for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 14:00:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsGUL-0000NO-Cs for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 14:00:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsGJo-0003dI-Ek for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 13:49:40 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsGJo-0003cw-6D for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 13:49:16 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UsGJm-0001d3-PB for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 19:49:15 +0200 Original-Received: from 169.15.137.27 ([169.15.137.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 19:49:14 +0200 Original-Received: from david by 169.15.137.27 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 19:49:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 169.15.137.27 User-Agent: Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.3 (cygwin) Cancel-Lock: sha1:dhOF9sB+vmHKrNVWqv8rp5N7TwQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91792 Archived-At: Barry Margolin writes: > In article , > david@adboyd.com (J. David Boyd) wrote: > >> david@adboyd.com (J. David Boyd) writes: >> >> > Teemu Likonen 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