From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: Compile Mode and "host" Emacs Date: Tue, 29 Oct 2013 20:09:04 +0100 Message-ID: References: <874n80l0b3.fsf@nbtrap.com> <83sivkdn09.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383073907 7178 80.91.229.3 (29 Oct 2013 19:11:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2013 19:11:47 +0000 (UTC) Cc: schwab@suse.de, nbtrap@nbtrap.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 29 20:11:54 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VbEhm-0000vB-F7 for ged-emacs-devel@m.gmane.org; Tue, 29 Oct 2013 20:11:54 +0100 Original-Received: from localhost ([::1]:48955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbEhl-0004ZI-UB for ged-emacs-devel@m.gmane.org; Tue, 29 Oct 2013 15:11:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbEfI-0000zs-KX for emacs-devel@gnu.org; Tue, 29 Oct 2013 15:09:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbEfA-0006Ut-Qd for emacs-devel@gnu.org; Tue, 29 Oct 2013 15:09:20 -0400 Original-Received: from mail-qe0-x234.google.com ([2607:f8b0:400d:c02::234]:51616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbEf3-0006Pm-BE; Tue, 29 Oct 2013 15:09:05 -0400 Original-Received: by mail-qe0-f52.google.com with SMTP id w7so207931qeb.39 for ; Tue, 29 Oct 2013 12:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=iZgDaEaJC72I5VAUL6RQACZRHbCwkRQj5UE/yo0tXBA=; b=pvLjixGki495DLrK13zETxdMxTrE6ev6yoXjKNeWdCwhmmIgWL7FSg8DrvJ+xGOO7k x75RLZqv8A2uZRGlHcjyxLCJ0IrYRLwRLyahhELY3ssPsQJHrs7+uUKTorLFKZXUPq5O u2ovT+/GkV14vyCZah29Yo3I7fyAwjggX6UWtqDzD2r8DKWriOTTC88CRx1KPe6csvdj IDKzk2xrfgDdeZxZWmZA7O00Uxlm49W6k0M7qGHw9NEEWkbeiVqAY5upa8N/T998fUPG xECPTjr8xgRGnflF4Xaih2w98Xvp+T15aj+icJJB/eYly8uPgh5rN0W+3VgOZB9HLmxC U6Ng== X-Received: by 10.224.67.66 with SMTP id q2mr2926658qai.122.1383073744665; Tue, 29 Oct 2013 12:09:04 -0700 (PDT) Original-Received: by 10.224.78.11 with HTTP; Tue, 29 Oct 2013 12:09:04 -0700 (PDT) In-Reply-To: <83sivkdn09.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164651 Archived-At: 2013/10/29 Eli Zaretskii : >> Date: Tue, 29 Oct 2013 16:52:42 +0100 >> From: Sebastian Wiesner >> Cc: Nathan Trapuzzano , emacs-devel@gnu.org >> >> I would have preferred to have my question answered and my problem >> solved rather than seeing my question arrogantly dismissed as "not >> useful", and being lectured upon what my problem actually is. > > Perhaps if you explained in more details what is your problem, the > issue would become more clear, and you could get more focused replies. > As things stand, you only described in very general terms what you > want to do, and on that level, Andreas is right: the OOB tool to > communicate with Emacs is emacsclient. Providing more details might > clarify whether emacsclient fits the bill or not, and why, and if it > doesn't, what might fit the bill. "emacsclient" runs code in a running Emacs. I don't want a use the running session, but rather a fresh session, but using the same Emacs. I think, there are a number of use cases for this: An Emacs Lisp developer runs her ERT tests in a fresh Emacs session. She has a Makefile with a "test" target, and a bunch of different Emacs versions installed (e.g. Emacs 23.4, Emacs 24.2, Emacs 24.3, three different Emacs trunk builds), to test her package against all supported Emacs versions. When developing her package, she has different Emacs versions running in parallel to try how different Emacs versions behave. She wants "M-x compile RET make test" to use the Emacs version she is currently in, and she does not want to remember to explicitly specify the target version in each Emacs session with "make EMACS=3Demacs23.4 test". She also byte-compiles her libraries in a fresh Emacs session to make sure that they cause no warnings (e.g. assignment to free variables, unused lexical variables, undefined functions, whatever). For this purpose, she has a "compile" target in her Makefile, and she also wants to compile against the very she is currently in. A Emacs Lisp has written a little script to update all her installed packages from the command line. As she uses a lot of packages and updates only once in a while, updates take long, and she wants to continue working meanwhile. Thus, she calls her update script via "M-x compile", watches the compile buffer for progress, and calls "package-initialize" once the update is done, to make her Emacs use the new packages. Obviously, she wants to install packages for the Emacs she is currently using, and not the one, which is in "$PATH". She has a few systems, where these are actually different: A Fedora system at work, where she has no root privileges. She installed Emacs trunk from source, and added it to the Gnome 3 menu. Also an OS X system at home, where she installed Emacs 24.3 as App Bundle, by just dragging it into the "/Applications" folder. In both cases, the "emacs" in $PATH is different from the Emacs she uses and starts from the GUI. She does not want this Emacs to be used in her script, because it would break in both cases, because the system "emacs" is outdated. I hope these use cases make my intend a little more clear. My personal motivation for this feature is the Cask [1] project, which pretty much covers the 3rd use case "install and update packages from command line". We had a number of reports from OS X people who installed Emacs as App bundle from http://emacsformacosx.com/, and never added a "emacs" script to their path. When these people used "M-x compile" to invoke Cask, they got mysterious errors, because Cask used "emacs" from $PATH, which is a out-dated Emacs 22 included with OS X. We could argue that their setup is broken, but as a matter of fact, these people just used the standard installation procedure for OS X applications, and are sometimes even surprised that there is already an Emacs included in their OS X. Just to make things clear: I agree that in neither of these cases it is *essential* to expose the Emacs executable path to the subprocess, but it would be definitely convenient=E2=80=A6 [1]: https://github.com/cask/cask