From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#9907: 24.0.90; eshell:for command destructivly modifies list variables Date: Sun, 30 Oct 2011 01:09:06 +0200 Message-ID: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319929571 9368 80.91.229.12 (29 Oct 2011 23:06:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2011 23:06:11 +0000 (UTC) To: 9907@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 30 01:06:07 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RKHyY-0004mK-Od for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Oct 2011 01:06:06 +0200 Original-Received: from localhost ([::1]:52201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHyX-0000t1-Px for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2011 19:06:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHyU-0000sg-3X for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:06:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKHyS-0001bU-UA for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:06:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHyS-0001bQ-M4 for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:06:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RKI0Q-0004r1-Er for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Oct 2011 23:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9907 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.131992966718636 (code B ref -1); Sat, 29 Oct 2011 23:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2011 23:07:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKI0B-0004qX-5z for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:07:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKI06-0004qN-CG for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:07:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKHy6-0001Za-K8 for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:05:39 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:56036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHy6-0001ZW-If for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:05:38 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHy5-0000qk-Mm for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:05:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKHy4-0001ZM-Ef for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:05:37 -0400 Original-Received: from gateway-b.fh-trier.de ([143.93.54.182]:42864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHy4-0001ZB-3N for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:05:36 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum FH-Trier (r/ft)] Original-Received: from luca (dslb-084-059-109-215.pools.arcor-ip.net [84.59.109.215]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id BB7FF17B4AB for ; Sun, 30 Oct 2011 01:05:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fh-trier.de; s=default; t=1319929518; bh=nHUOEt5GWv2bxvhggt3m+C/Yg7A=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UFs+JP3hqRqNH2Yi+y9HZq2Xd6LN4IRv6pjvx620hCY0UIH2yvxb2PhzMoMEooYMp tXT0k94yYwKQ+8u2FD1dU8DUsS8HCLMqONq+HoIh7SX+WKi/2IQtKSrIXDivU4m77r LcYgfenn2hwekh2uG85d/MEHTCxCxYBtYkEHJZKU= Original-Received: from [127.0.0.1] (helo=luca) by luca with esmtp (Exim 4.72) (envelope-from ) id 1RKI1S-0004oo-Mp for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 01:09:06 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 29 Oct 2011 19:08:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53312 Archived-At: M-x eshell $ for l in $load-path {echo $l} Do this two times. After the first time the value of `load-path' is gone, because the lisp code implementing the loop destructively modifies this list. Idea of the following solution: Copy it. diff -c -L /usr/share/emacs/24.0.90/lisp/eshell/esh-cmd.el.gz -L \#\ /tmp/jka-com2122MHr /tmp/buffer-content-2122LbA *** /usr/share/emacs/24.0.90/lisp/eshell/esh-cmd.el.gz --- # *************** *** 494,500 **** (if (listp elem) elem (list 'list elem)))) ! (cdr (cddr terms))))) (list 'eshell-command-body (list 'quote (list nil))) (list 'eshell-test-body --- 494,501 ---- (if (listp elem) elem (list 'list elem)))) ! (cdr (cddr terms))) ! (list nil))) (list 'eshell-command-body (list 'quote (list nil))) (list 'eshell-test-body