From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Spittel Newsgroups: gmane.emacs.help Subject: Re: eshell and jobs. THANK YOU KAI Date: 29 Jan 2003 07:16:25 -0600 Organization: University of Wisconsin, Madison Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <2ihebsgkpi.fsf_-_@kite.ssc.wisc.edu> 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 1043847108 30269 80.91.224.249 (29 Jan 2003 13:31:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 29 Jan 2003 13:31:48 +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 18dsJe-0007rs-00 for ; Wed, 29 Jan 2003 14:31:46 +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 18dsJ4-0006ec-06 for gnu-help-gnu-emacs@m.gmane.org; Wed, 29 Jan 2003 08:31:10 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!uwm.edu!news.doit.wisc.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 57 Original-NNTP-Posting-Host: kite.ssc.wisc.edu Original-X-Trace: news.doit.wisc.edu 1043846185 20618 144.92.190.204 (29 Jan 2003 13:16:25 GMT) Original-X-Complaints-To: abuse@doit.wisc.edu Original-NNTP-Posting-Date: Wed, 29 Jan 2003 13:16:25 +0000 (UTC) User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Original-Xref: shelby.stanford.edu gnu.emacs.help:109523 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:6043 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6043 Kai, Thank you for your reply. Your code worked brilliantly!!! Thank you very very much. cheers, mike ps, Not knowing lisp, can you briefly explain what the code does? kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes: > Michael Spittel writes: > > > (nudge nudge Kai) :-) > > I'm listening, but I'm afraid I can't help. I don't know how to > redirect the output of a command to a buffer. > > Hm. But I have this: > > (defun eshell/ec (&rest args) > "Use `compile' to do background makes." > (if (eshell-interactive-output-p) > (let ((compilation-process-setup-function > (list 'lambda nil > (list 'setq 'process-environment > (list 'quote (eshell-copy-environment)))))) > (compile (eshell-flatten-and-stringify args)) > (pop-to-buffer compilation-last-buffer)) > (throw 'eshell-replace-command > (let ((l (eshell-stringify-list (eshell-flatten-list args)))) > (eshell-parse-command (car l) (cdr l)))))) > (put 'eshell/ec 'eshell-no-numeric-conversions t) > > This this code, you can do > > ec ls -l > > and the output of ls -l will go to a separate buffer. It's not the > same as redirection, but maybe it's good enough? > -- > Ambibibentists unite! -- -Mike Spittel -------------------------------------------------------------------- Michael Ludwig Spittel O (=> Center for Demography and Ecology Tel: (608) 256-7742 )/\_,_[__] University of Wisconsin-Madison Fax: (608) 262-8400 T>_ | | 1180 Observatory DR. Email: mspittel@ssc.wisc.edu + + Madison, WI 53706 --------------------------------------------------------------------