From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#56509: 29.0.50; Eshell variable aliases don't fully support indexing Date: Mon, 11 Jul 2022 19:47:02 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13730"; mail-complaints-to="usenet@ciao.gmane.io" To: 56509@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 12 04:48:36 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB5wx-0003PS-Tf for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jul 2022 04:48:35 +0200 Original-Received: from localhost ([::1]:34406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oB5ww-0004tX-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jul 2022 22:48:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oB5wR-0004rb-0M for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 22:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47454) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oB5wQ-0000dY-OK for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 22:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oB5wQ-0003Ky-Lf for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 22:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2022 02:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56509 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165759403012609 (code B ref -1); Tue, 12 Jul 2022 02:48:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jul 2022 02:47:10 +0000 Original-Received: from localhost ([127.0.0.1]:41351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oB5va-0003HJ-IE for submit@debbugs.gnu.org; Mon, 11 Jul 2022 22:47:10 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oB5vZ-0003HC-6R for submit@debbugs.gnu.org; Mon, 11 Jul 2022 22:47:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oB5vW-0003oH-VM for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 22:47:08 -0400 Original-Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:43004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oB5vU-0000Xd-RV for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2022 22:47:06 -0400 Original-Received: by mail-pg1-x529.google.com with SMTP id o18so6361110pgu.9 for ; Mon, 11 Jul 2022 19:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:subject:to:message-id:date:mime-version:content-language :content-transfer-encoding; bh=SF4I/zXet4YEDUIwHnrowS81vxxTzjLUsg4YqSzjQdQ=; b=OmCOEHP39+XVMuCYykByV+gVXqHu2D78qDHeuHK3K3EGFYFgsKEZ4wWElL9vffBqvG g4GOgxZGp4FnkV5RzuKFQbNfuiVmX2jHNFKltPstc/KKD1NjjnN939FkI3M4q7aQlwkK qKwXXucR25sZjk/+BZyxaOPT2wiqydyYC2HIEnh12TXLnAkNXE7aifHuURTq+c2NTnTf rfisBlClBdi/KL8J4TkqQGlxG6zRSzEiQrILw5HcgJ0Lu1udC5rJV9N61v2jZpVoiBWe ZEBOdRUqkc8jrFJZ0yb09X6FY8ypkeXh1k2DEUB/P16BiyqRmu7cU/Bd9GhqTq99lHN2 QJ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:subject:to:message-id:date:mime-version :content-language:content-transfer-encoding; bh=SF4I/zXet4YEDUIwHnrowS81vxxTzjLUsg4YqSzjQdQ=; b=UwQRFltYPM7gP0mcUET26b3xw3lXdnG9CU7sAiQ4po4lUzJBiqIhQ9YcTPRVhQyGm1 CSWVOXOdh99JZ+38Jp8USQnixtJScQnrObhxT83y+2X3Q2R5/Ma/FYB9k8GnO8if8bS/ sctakN9LVnt+bH5cjkmCZ9IW0p1lpSDNufZodFxv3H6/4cw9JWx3PNA2bH6y7WdOvv6z vUEQbWP+4FJ9wBFgUKjjuKs9TK5hxVQ789jKoNLJzSndfHiNe7u4IsXVCUQnuhFU81GE JaL4xdVAwUAcQi+/S4u1SxhkFyt9xCHCOdLQ9zYO+bvW1GNXMdhtElZJ9L27noH/mY0x pU5A== X-Gm-Message-State: AJIora823oG+UcJGq9mAa3fjECgAj0zrFLZ+zHBMxyIO6gedZK64hsSX mL1Rj1K7QgqcKgBf2cQDVdYORAhBhks= X-Google-Smtp-Source: AGRyM1t49roJp7O6ZRGQK6krrUNxWSFu7M7PNvRBVhpyV3rdj9WElh5i+HrvG2uEgmASK1yWCjYBsw== X-Received: by 2002:a05:6a00:1743:b0:525:5f48:394a with SMTP id j3-20020a056a00174300b005255f48394amr21059656pfc.41.1657594023294; Mon, 11 Jul 2022 19:47:03 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id q3-20020a170902dac300b0016a091e993dsm5481218plx.42.2022.07.11.19.47.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jul 2022 19:47:02 -0700 (PDT) X-Mozilla-News-Host: news://news.gmane.org:119 Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236730 Archived-At: Normally in Eshell, you can index variables to get the nth element, e.g. "echo $exec-path[0]" would print the first element in your `exec-path' variable. However, this doesn't always work for "alias" variables. From "emacs -Q -f eshell": ~ $ alias first 'echo $1[0]' ~ $ first (list 1 2) (1 2) This should return 1, since it says to print the first (well, 0th) element of the first argument. There's also a related issue with alias variables that reference other alias variables: ~ $ echo $PWD /home/jim ~ $ echo $+ /home/jim ~ $ cd .. /home $ echo $PWD /home /home $ echo $+ /home/jim The '$+' alias is mapped to '$PWD', but rather than using Eshell's definition for '$PWD', it erroneously consults the system's '$PWD' environment variable, which in this case is the directory that Emacs was started from. Patch forthcoming; just getting a bug number.