From unknown Fri Aug 15 12:47:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15231 <15231@debbugs.gnu.org> To: bug#15231 <15231@debbugs.gnu.org> Subject: Status: 24.3.50; eshell: variable `name' treated different from other variables Reply-To: bug#15231 <15231@debbugs.gnu.org> Date: Fri, 15 Aug 2025 19:47:27 +0000 retitle 15231 24.3.50; eshell: variable `name' treated different from other= variables reassign 15231 emacs submitter 15231 Gregor Zattler severity 15231 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 31 19:41:03 2013 Received: (at submit) by debbugs.gnu.org; 31 Aug 2013 23:41:03 +0000 Received: from localhost ([127.0.0.1]:33791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VFums-0003Ah-9v for submit@debbugs.gnu.org; Sat, 31 Aug 2013 19:41:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44955) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VFump-0003A9-Kc for submit@debbugs.gnu.org; Sat, 31 Aug 2013 19:41:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFumb-0002dc-1p for submit@debbugs.gnu.org; Sat, 31 Aug 2013 19:40:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00,FILL_THIS_FORM, FILL_THIS_FORM_LONG,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFuma-0002dW-Tj for submit@debbugs.gnu.org; Sat, 31 Aug 2013 19:40:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFumT-0002PU-8b for bug-gnu-emacs@gnu.org; Sat, 31 Aug 2013 19:40:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFumK-0002Xm-6v for bug-gnu-emacs@gnu.org; Sat, 31 Aug 2013 19:40:36 -0400 Received: from mout.gmx.net ([212.227.17.20]:57345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFumI-0002Wb-QM for bug-gnu-emacs@gnu.org; Sat, 31 Aug 2013 19:40:27 -0400 Received: from boo.workgroup ([87.187.187.222]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LgZRV-1VmAai2h4X-00o1XM for ; Sun, 01 Sep 2013 01:40:25 +0200 Received: from grfz by boo.workgroup with local (Exim 4.80) (envelope-from ) id 1VFumB-0006bh-Sk; Sun, 01 Sep 2013 01:40:19 +0200 From: Gregor Zattler To: bug-gnu-emacs@gnu.org Subject: 24.3.50; eshell: variable `name' treated different from other variables User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.50.1 (i486-pc-linux-gnu) Date: Sun, 01 Sep 2013 01:40:19 +0200 Message-ID: <8761ule8f0.fsf@boo.workgroup> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:xmz3ZBXinSue7u9ZwOgB8GFV3CD+zR7idC8yznqN6PIFBdWU0z8 ubbzrUySRO6CQZr+ZoiJlANByQpwI9n4D5Z6y9XgFojSdtS4EkgxFBp1FsCBqajCwNs0om4 q6FT95EnfJ1CBb9N3MDkCU/FFg3kQI6yKON8GPnhKcx2eVBRSTMaCZ3PKp4YBQWkTGKzeJC yDjp0INPsxh3acfZyfPjA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Dear Emacs developers, eshell treats a variable named `name' different than a variable named `foo' (or any(?) other name): How to reproduce: emacs -Q -nw -f eshell #now type for foo in * { echo "$foo" } # this lists the directory Emacs was started in #now type for name in * { echo "$name" } # this instead lists as many times 'name' as the above # for statement listed objects in the directory. E.g.: ~/src/emacs/doc $ for foo in * { echo "$foo" } Emacs/ lispintro/ lispref/ man/ misc/ ~/src/emacs/doc $ for name in * { echo "$name" } name name name name name ~/src/emacs/doc $ This is the case with GNU Emacs 24.3.50.1 (i486-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2013-08-31 on dex, modified by Debian and with GNU Emacs 23.4.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2013-07-01 on binet, modified by Debian Is this a bug? Thanks, Gregor From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 02 21:27:46 2013 Received: (at 15231) by debbugs.gnu.org; 3 Sep 2013 01:27:46 +0000 Received: from localhost ([127.0.0.1]:38033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGfPG-00014x-9G for submit@debbugs.gnu.org; Mon, 02 Sep 2013 21:27:46 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:59464) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGfPE-00014j-BP for 15231@debbugs.gnu.org; Mon, 02 Sep 2013 21:27:44 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8KABK/CFHO+KK6/2dsb2JhbABEuzWCWAQCexdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: At8KABK/CFHO+KK6/2dsb2JhbABEuzWCWAQCexdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26275785" Received: from 206-248-162-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Sep 2013 21:24:42 -0400 Received: by pastel.home (Postfix, from userid 20848) id 0D11362D59; Mon, 2 Sep 2013 21:27:38 -0400 (EDT) From: Stefan Monnier To: Gregor Zattler Subject: Re: bug#15231: 24.3.50; eshell: variable `name' treated different from other variables Message-ID: References: <8761ule8f0.fsf@boo.workgroup> Date: Mon, 02 Sep 2013 21:27:37 -0400 In-Reply-To: <8761ule8f0.fsf@boo.workgroup> (Gregor Zattler's message of "Sun, 01 Sep 2013 01:40:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15231 Cc: 15231@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Is this a bug? Sounds like it, yes. More specifically it sounds like changing Eshell to use lexical-binding would fix this bug. Stefan "just reading his crystal ball" From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 11 23:39:41 2013 Received: (at 15231) by debbugs.gnu.org; 12 Sep 2013 03:39:42 +0000 Received: from localhost ([127.0.0.1]:57422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJxkr-0007Po-HD for submit@debbugs.gnu.org; Wed, 11 Sep 2013 23:39:41 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:62151) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJxkp-0007Pa-Sv for 15231@debbugs.gnu.org; Wed, 11 Sep 2013 23:39:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="27391320" Received: from 184-175-16-104.dsl.teksavvy.com (HELO ceviche.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Sep 2013 23:36:06 -0400 Received: by ceviche.home (Postfix, from userid 20848) id F103A660E6; Wed, 11 Sep 2013 23:39:33 -0400 (EDT) From: Stefan Monnier To: Aidan Gauland Subject: Re: bug#15231: 24.3.50; eshell: variable `name' treated different from other variables Message-ID: References: <8761ule8f0.fsf@boo.workgroup> <87k3imssvn.fsf@dimension8.tehua.net> Date: Wed, 11 Sep 2013 23:39:33 -0400 In-Reply-To: <87k3imssvn.fsf@dimension8.tehua.net> (Aidan Gauland's message of "Thu, 12 Sep 2013 13:58:36 +1200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15231 Cc: Gregor Zattler , 15231@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >>> Is this a bug? >> Sounds like it, yes. More specifically it sounds like changing Eshell >> to use lexical-binding would fix this bug. > But why is this happening with just `name'? I don't know the precise cause of the bug, but my crystal ball says that the Eshell code that interprets your command itself uses a variable named "name". There are probably a few other variables names used by Eshell that suffer from the same kind of "capture". Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 00:50:52 2013 Received: (at 15231) by debbugs.gnu.org; 12 Sep 2013 04:50:53 +0000 Received: from localhost ([127.0.0.1]:57523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJyrk-0000un-2s for submit@debbugs.gnu.org; Thu, 12 Sep 2013 00:50:52 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:56080) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJyrg-0000uO-A9 for 15231@debbugs.gnu.org; Thu, 12 Sep 2013 00:50:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="27396106" Received: from 184-175-16-104.dsl.teksavvy.com (HELO ceviche.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Sep 2013 00:47:13 -0400 Received: by ceviche.home (Postfix, from userid 20848) id AB104660E6; Thu, 12 Sep 2013 00:50:41 -0400 (EDT) From: Stefan Monnier To: Aidan Gauland Subject: Re: bug#15231: 24.3.50; eshell: variable `name' treated different from other variables Message-ID: References: <8761ule8f0.fsf@boo.workgroup> <87k3imssvn.fsf@dimension8.tehua.net> Date: Thu, 12 Sep 2013 00:50:41 -0400 In-Reply-To: (Stefan Monnier's message of "Wed, 11 Sep 2013 23:39:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15231 Cc: Gregor Zattler , 15231@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I don't know the precise cause of the bug, but my crystal ball says that > the Eshell code that interprets your command itself uses a variable > named "name". There are probably a few other variables names used by > Eshell that suffer from the same kind of "capture". I've just tried to convert Eshell to use lexical-binding and it appears that this problem would indeed be fixed by such a change (if someone has some kind of test suite for Eshell it would be very helpful, since changing it to use lexical-binding is not completely trivial and might introduce unexpected regressions). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 02:56:42 2013 Received: (at 15231) by debbugs.gnu.org; 12 Sep 2013 06:56:42 +0000 Received: from localhost ([127.0.0.1]:57711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VK0pU-0004DL-GO for submit@debbugs.gnu.org; Thu, 12 Sep 2013 02:56:41 -0400 Received: from mout.gmx.net ([212.227.17.22]:51027) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VK0pQ-0004D6-Un for 15231@debbugs.gnu.org; Thu, 12 Sep 2013 02:56:38 -0400 Received: from detlef.gmx.de ([91.41.133.211]) by mail.gmx.com (mrgmx003) with ESMTPS (Nemesis) id 0LnfuZ-1VsXp42O5P-00hvgq for <15231@debbugs.gnu.org>; Thu, 12 Sep 2013 08:56:30 +0200 From: Michael Albinus To: Stefan Monnier Subject: Re: bug#15231: 24.3.50; eshell: variable `name' treated different from other variables References: <8761ule8f0.fsf@boo.workgroup> <87k3imssvn.fsf@dimension8.tehua.net> Date: Thu, 12 Sep 2013 08:56:25 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 12 Sep 2013 00:50:41 -0400") Message-ID: <87ioy6bk9y.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:eTl7va20UnS+BGThxtCXjT5+q0zMKut6k/EOzlj1X0+X8Agc3tQ aTXc3Cr/AhnfOKtVQPCLrvzUqNUjsK5csMSs8tkVjsJ35FUG1qmCueBvOlfP4vizLV/j+YH 7PbcPIiaYMVwYtRj2w8GguRAI+NkaUbsUB4+IKGVlrnO3TWcMYM0la4+dDwQysow19BP+aJ tt7axoPCGbKqeSxdYhlYA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15231 Cc: Gregor Zattler , Aidan Gauland , 15231@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stefan Monnier writes: > I've just tried to convert Eshell to use lexical-binding and it appears > that this problem would indeed be fixed by such a change (if someone has > some kind of test suite for Eshell it would be very helpful, since > changing it to use lexical-binding is not completely trivial and might > introduce unexpected regressions). There is test/eshell.el. Btw, shouldn't it be moved to test/automated/ ? > Stefan Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 16:16:33 2013 Received: (at 15231-done) by debbugs.gnu.org; 12 Sep 2013 20:16:33 +0000 Received: from localhost ([127.0.0.1]:59689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKDJY-0003ZX-FT for submit@debbugs.gnu.org; Thu, 12 Sep 2013 16:16:32 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:8455) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKDJX-0003ZK-8t for 15231-done@debbugs.gnu.org; Thu, 12 Sep 2013 16:16:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCzQSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av8EABK/CFG4rxBo/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCzQSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="27531231" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Sep 2013 16:12:54 -0400 Received: by pastel.home (Postfix, from userid 20848) id D04D462D8E; Thu, 12 Sep 2013 16:16:24 -0400 (EDT) From: Stefan Monnier To: Michael Albinus Subject: Re: bug#15231: 24.3.50; eshell: variable `name' treated different from other variables Message-ID: References: <8761ule8f0.fsf@boo.workgroup> <87k3imssvn.fsf@dimension8.tehua.net> <87ioy6bk9y.fsf@gmx.de> Date: Thu, 12 Sep 2013 16:16:24 -0400 In-Reply-To: <87ioy6bk9y.fsf@gmx.de> (Michael Albinus's message of "Thu, 12 Sep 2013 08:56:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15231-done Cc: 15231-done@debbugs.gnu.org, Gregor Zattler , Aidan Gauland X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> I've just tried to convert Eshell to use lexical-binding and it appears >> that this problem would indeed be fixed by such a change (if someone has >> some kind of test suite for Eshell it would be very helpful, since >> changing it to use lexical-binding is not completely trivial and might >> introduce unexpected regressions). > There is test/eshell.el. Btw, shouldn't it be moved to test/automated/ ? Cool, indeed. I moved the file, added a test to catch this bug, and changed Eshell to use lexical-binding. Stefan From unknown Fri Aug 15 12:47:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 11 Oct 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator