From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Re: Loops and scripting in eshell Date: Sun, 19 Oct 2003 17:06:53 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <867k31i7w2.fsf@slowfox.dyndns.org> References: <86fzhuqome.fsf@slowfox.dyndns.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066576119 27493 80.91.224.253 (19 Oct 2003 15:08:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Oct 2003 15:08:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 19 17:08:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ABFAZ-000629-00 for ; Sun, 19 Oct 2003 17:08:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ABF9u-0003DV-2X for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Oct 2003 11:07:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ABF9U-0003CZ-Qw for help-gnu-emacs@gnu.org; Sun, 19 Oct 2003 11:07:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ABF8x-0002s5-VS for help-gnu-emacs@gnu.org; Sun, 19 Oct 2003 11:07:27 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ABF8x-0002qq-Fz for help-gnu-emacs@gnu.org; Sun, 19 Oct 2003 11:06:55 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ABF8w-00068c-00 for ; Sun, 19 Oct 2003 17:06:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ABF8v-00068U-00 for ; Sun, 19 Oct 2003 17:06:53 +0200 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ABF8v-00076b-00 for ; Sun, 19 Oct 2003 17:06:53 +0200 Original-Lines: 24 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (berkeley-unix) Cancel-Lock: sha1:htRMB8UMMdh81HPWCKGl+G+KxBo= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:13344 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13344 Oliver Scholz writes: > Kai Grossjohann writes: > >> Even though I now know how to do for loops in eshell, I was wondering >> if the following idea might be fun to play with. Maybe someone has >> already done this and would like to share? > [...] > > Loops are the one feature that I am missing in eshell. for f in a b { echo $f; } # invokes shell command echo for f in a b ( find-file f ) # invokes Lisp command It's quite cool, actually, though the syntax is not very Bourne-ish. How to do two Lisp commands? Hm. Oh. Very interesting. Compare: for f in a b (progn (message f) (sit-for 1)) for f in a b { (message f); sleep 1 } It changes the behavior of `message'! -- Two cafe au lait please, but without milk.