From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Feature request: Expose system `exec` as a built-in elisp function Date: Thu, 14 Aug 2014 00:08:37 -0600 Message-ID: References: <87mwb8tej5.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407996559 2546 80.91.229.3 (14 Aug 2014 06:09:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2014 06:09:19 +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 Aug 14 08:09:13 2014 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 1XHoDp-0007a8-Cl for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2014 08:09:13 +0200 Original-Received: from localhost ([::1]:52051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHoDo-0000Mi-Qd for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2014 02:09:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHoDZ-0000MB-RB for help-gnu-emacs@gnu.org; Thu, 14 Aug 2014 02:09:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHoDT-00058W-Pd for help-gnu-emacs@gnu.org; Thu, 14 Aug 2014 02:08:57 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHoDT-000582-JD for help-gnu-emacs@gnu.org; Thu, 14 Aug 2014 02:08:51 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XHoDQ-0007Rk-S8 for help-gnu-emacs@gnu.org; Thu, 14 Aug 2014 08:08:48 +0200 Original-Received: from 97-122-173-50.hlrn.qwest.net ([97.122.173.50]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Aug 2014 08:08:48 +0200 Original-Received: from kevin.d.rodgers by 97-122-173-50.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Aug 2014 08:08:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 97-122-173-50.hlrn.qwest.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: 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:99208 Archived-At: On 8/13/14 3:42 PM, Andrew Pennebaker wrote: > Eh, what if you don't want the second emacs call to use the same emacs > configuration, etc. etc. as the parent emacs process? Pass -Q on the command line. Here's what I use to fork a new instance via `M-x run-emacs RET': (defun run-emacs (command) "Run the Emacs COMMAND in the background via `shell-command'." (interactive (let ((program (expand-file-name invocation-name invocation-directory))) (list (read-string "Emacs command: " (cons (concat program " " (if (cdr command-line-args) (mapconcat 'shell-quote-argument (cdr command-line-args) " ") "-Q") " &") (1+ (length program))))))) (shell-command command)) > Feel free to ask the cask project for more details: > > https://github.com/cask/cask > > > > On Wed, Aug 13, 2014 at 3:36 PM, Barry Margolin wrote: > >> In article , >> Andrew Pennebaker wrote: >> >>> One example of the worthiness of exec is cask, an Emacs package manager >>> that sometimes wants to fork out to an emacs instance, for editing text >>> files. >> >> I'm not familiar with cask, but usually if you run something within >> Emacs, and it wants you to edit something, you set EDITOR=emacsclient so >> that it goes back to the original Emacs instance. You don't need to >> start a new Emacs instance. >> >> And that still doesn't explain why you would want to kill the original >> Emacs instance when running cask. >> >> -- >> Barry Margolin, barmar@alum.mit.edu >> Arlington, MA >> *** PLEASE post questions in newsgroups, not directly to me *** -- Kevin Rodgers Denver, Colorado, USA