From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#59956: 29.0.60: Failure when completing arguments in Eshell after variable interpolation Date: Mon, 19 Dec 2022 11:31:15 +0100 Message-ID: <87v8m7heh8.fsf@gmail.com> References: <83iliiv0yv.fsf@gnu.org> <765547c0-b2a5-b054-a29d-b27002b7442c@gmail.com> <07bcf6a532d0428b9f53@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5021"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Jim Porter , Gregory Heytings , Eli Zaretskii , 59956@debbugs.gnu.org, John Wiegley To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 19 11:32:24 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 1p7DRY-0001Dg-Sb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Dec 2022 11:32:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7DRF-0002VC-Dy; Mon, 19 Dec 2022 05:32:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7DRD-0002QB-4l for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2022 05:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7DRC-0000h0-Sl for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2022 05:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7DRC-0003iK-EQ for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2022 05:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Dec 2022 10:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59956 X-GNU-PR-Package: emacs Original-Received: via spool by 59956-submit@debbugs.gnu.org id=B59956.167144588614259 (code B ref 59956); Mon, 19 Dec 2022 10:32:02 +0000 Original-Received: (at 59956) by debbugs.gnu.org; 19 Dec 2022 10:31:26 +0000 Original-Received: from localhost ([127.0.0.1]:38236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7DQb-0003hv-K0 for submit@debbugs.gnu.org; Mon, 19 Dec 2022 05:31:25 -0500 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:46929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7DQZ-0003hm-QV for 59956@debbugs.gnu.org; Mon, 19 Dec 2022 05:31:24 -0500 Original-Received: by mail-ej1-f53.google.com with SMTP id bj12so20260611ejb.13 for <59956@debbugs.gnu.org>; Mon, 19 Dec 2022 02:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=MpZW/IxXI1ZquNjE0GoLSqv33PluNtDJ+8Wf34J4GxU=; b=hyVWwL63GYGPnOpt6o4e+xZY/mJGBlWUZfsx7SdSZxQiQFw/3ZY35QL+IONxntW2Pk F0NVakuk9R/YZ7DGfkJ0oBoN+ix7su6X30c/i1XktFnBRUkW27dUy0nkia57mO0e7nPn bsk1dLC21+M6Etl+7OpIYBlSjB7osLR8Ohk4xsKbBDMm/Z69enVlZRF1KWtJ0iUpBBCH gz7OQlChv+uLRxxrh29RIO4GNqW5uI70lmiTWmr3Lyhq1b53LJjqXrert9XgYDeZVZMp ZFRn9tooBNwOgm9R8S7g7oB0548CvadFMl2z7Yoq1palPp7rS8bQi1GddbGziifkBR2F l1Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MpZW/IxXI1ZquNjE0GoLSqv33PluNtDJ+8Wf34J4GxU=; b=iC5iVFRoO8wBdQ4xP0SgUgXEq/Kgqx3D+W9j+9vTING1GkbJfJkjY5Pb5mQhdClfda XhSMCRlXY+qIFYUlb+Ojn1V1HoN530q6jEptXa+vpRfzejDlzUcJhd1bMVMAiNZnVDiy OZKYMYJEdX6Jfyk3MuOzq5XU8j3DtIxXf5UW2GTx/GyKFwcb1z8FTPkdOo5ZKKCP1pgB 4+4W7JUQqDlkWzEjJUgIAT8Wbrm8/yg3cK70kbzushDru8T+MPGQ0XMRLWkohAr7amH4 ICyhbIZuv5MQOz/jgM4272KFvYK7zsHuRBAONV/3/0pE5Ea8IlRfTWZh3C6sFUlRzdGe vLcA== X-Gm-Message-State: ANoB5pkHnnRVXHIEPaRgHFgvJsvKtZ22WkzULOQv9Z6na5z3codGz54c YXBm/ZreevfOz8HZsX4x6T9a1HpirswWPg== X-Google-Smtp-Source: AA0mqf52fJ+jsm6FVcb31yjYU62Lu63pUSS8Bp0Z0r3KnG8CP7Xo9h3a7MlMT3N4PwnuKsV6pmcLnw== X-Received: by 2002:a17:907:ca2:b0:7c1:26b9:c556 with SMTP id gi34-20020a1709070ca200b007c126b9c556mr28740846ejc.15.1671445877593; Mon, 19 Dec 2022 02:31:17 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::a34]) by smtp.gmail.com with ESMTPSA id 9-20020a170906318900b0077a8fa8ba55sm4153363ejy.210.2022.12.19.02.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 02:31:16 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 18 Dec 2022 19:54:44 -0500") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251413 Archived-At: On Sun, 18 Dec 2022 at 19:54, Stefan Monnier wrote: > There's a tension here: we want the completion to operate on the actual > buffer text obviously, so in some places we definitely want to see the > "unexpanded argument" [1], but when it comes to looking at other arguments > to decide which completion table to use at point, it's often more useful > to see the expanded arguments (i.e. the thing that the command will > actually see). E.g. if the previous arg is `$foo` which expands to `-u` > we'd probably prefer to see `-u` in order to know we should complete > against user names. If $foo is "-u -v"`, your patch will make pcomplete see this as a single argument, no? I think it makes sense to send the string "$foo" with the list '("-u" "-v") embedded as text property, and add some convenience functions to fetch the list for the pcomplete functions that can handle the more refined information.