From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: eshell and jobs Date: Wed, 29 Jan 2003 16:52:01 +0100 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <841y2w6jj2.fsf@lucy.is.informatik.uni-duisburg.de> References: <2iy95589rj.fsf@kite.ssc.wisc.edu> <84wukobex3.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1043855777 7436 80.91.224.249 (29 Jan 2003 15:56:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 29 Jan 2003 15:56:17 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18duYg-0001r5-00 for ; Wed, 29 Jan 2003 16:55:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18duYX-0008BO-03 for gnu-help-gnu-emacs@m.gmane.org; Wed, 29 Jan 2003 10:55:17 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!lucy.is.informatik.uni-duisburg.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-NNTP-Posting-Host: lucy.is.informatik.uni-duisburg.de (134.91.35.216) Original-X-Trace: fu-berlin.de 1043855597 34455811 134.91.35.216 (16 [73968]) User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:sPIRpUFOZQDQweItG8qdAJ/Uv44= Original-Xref: shelby.stanford.edu gnu.emacs.help:109528 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6046 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6046 kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes: A code explanation was requested. I basically copied from eshell/make, so I don't fully grok it. Here comes what I know: > (defun eshell/ec (&rest args) If you type "foo" at an eshell prompt, eshell will look for the Lisp function eshell/foo first thing and run that if it exists. > "Use `compile' to do background makes." > (if (eshell-interactive-output-p) It seems the `then' branch here is what is normally invoked. I have no idea what the `else' branch does. John, are you listening? > (let ((compilation-process-setup-function > (list 'lambda nil > (list 'setq 'process-environment > (list 'quote (eshell-copy-environment)))))) This copies the current environment so that `compile' will pick it up. > (compile (eshell-flatten-and-stringify args)) To see what compile does, type M-x compile RET and enter some shell command. The eshell-flatten-and-stringify just takes the rest of the command line args and munges them until they are what `compile' expects. (I think `compile' expects just a single string, so I guess that eshell-flatten-and-stringify concats all args, separated with spaces.) > (pop-to-buffer compilation-last-buffer)) Make sure to display the *compilation* buffer. > (throw 'eshell-replace-command > (let ((l (eshell-stringify-list (eshell-flatten-list args)))) > (eshell-parse-command (car l) (cdr l)))))) Can anyone explain what this might mean? > (put 'eshell/ec 'eshell-no-numeric-conversions t) It seems that eshell can recognize numbers and do something with them. But what? -- Ambibibentists unite!