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#57905: [PATCH] Fix eshell directory and executable completion on action t Date: Sun, 18 Sep 2022 17:31:01 -0700 Message-ID: References: <87a66x55hy.fsf@gnus.org> 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="37378"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57905@debbugs.gnu.org To: Lars Ingebrigtsen , Daniel Pettersson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 19 02:32:13 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 1oa4ho-0009aN-DT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 02:32:12 +0200 Original-Received: from localhost ([::1]:51626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa4hm-0003n0-I4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Sep 2022 20:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa4hf-0003md-45 for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 20:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oa4he-0005QR-SY for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 20:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oa4he-0001vE-Gf for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2022 20:32: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: Mon, 19 Sep 2022 00:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57905 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57905-submit@debbugs.gnu.org id=B57905.16635474747333 (code B ref 57905); Mon, 19 Sep 2022 00:32:02 +0000 Original-Received: (at 57905) by debbugs.gnu.org; 19 Sep 2022 00:31:14 +0000 Original-Received: from localhost ([127.0.0.1]:51535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oa4gs-0001uD-7T for submit@debbugs.gnu.org; Sun, 18 Sep 2022 20:31:14 -0400 Original-Received: from mail-pl1-f182.google.com ([209.85.214.182]:42850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oa4gn-0001tx-WD for 57905@debbugs.gnu.org; Sun, 18 Sep 2022 20:31:12 -0400 Original-Received: by mail-pl1-f182.google.com with SMTP id v1so26466733plo.9 for <57905@debbugs.gnu.org>; Sun, 18 Sep 2022 17:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:from:to:cc:subject :date; bh=oV0R6WSFFHJeITFX536/LTCxFW+VG4eMpCgdfZaHQhg=; b=HswhrXIIImSxRM1jvLv5bdHGP2zzIhK4tZOZgo/1eyTSJQufspb9bfwuIyY+MmZOV0 IIyUPNX5oGPPgFTSjADqtHf/5xPOxU35s8w2DgaafXemZqh9dtI/4Ryl+bEtJ2RfkGYA AUlYFSbJo5nb/PTscoNH3Hs2b6ELFgEpoFnR2K6BgCbWxn5NOf7LwnMTRd11h7S1wYqn q9n02ZRBJikajK27DSuBi4Nx0TNjUwkbQ4nBL+Hg5O9z/wQhMmnHG0883KRYLVvaZmuM VxQztwrDBWLPfKZ/3OZxBvdedNHK7/HD4PyJRoI3ZDLZ+XzhT5cA+ZsaL5iCuAmqmfzw eOcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:x-gm-message-state :from:to:cc:subject:date; bh=oV0R6WSFFHJeITFX536/LTCxFW+VG4eMpCgdfZaHQhg=; b=nKkF7qtpDLo83CpkOcSS425VimO6bYpQE/8eV81j26w9vPSglhMfXfc9vMTKooonuG V36m0/eYQ2j3wudrPgDMstvzIo+VKlPjiRt7biLElb2AF5eDeybpa+eHu++ldDoYXqt0 WhoJM0SfSxZ1FDVHuzDf6tsE+g57Ns/RRlyxLG/C1G3zLl7lhrN17FLGViVUHFYCB9De uQh32Hwzj6KDZ4mlORrAw+mxTKoQnfDAvPsxwIY7x4z4w/QORBIy2Dyw3pdoszIZaCxf Hz1KnvQULBZTkfBsLWSM3cNrUkj8EgvgQyMC4waewBtypixm44g5Ac1bT8mdCLgKbor6 NoOA== X-Gm-Message-State: ACrzQf22/fmeMy9T5lbxvY5FeoNI2QXUUm8K6SoILB8iE+rTDA54Ebnj 6wh4Is/W+y7B8syarQifGTSkvEgVGIA= X-Google-Smtp-Source: AMsMyM78l4MRLKYqjnSC32WMcgvbqDowx5CjqtveJPVl5hfnlx9DNzGaHbMMQ30xqjMf77Tk6FL5vA== X-Received: by 2002:a17:903:41c9:b0:176:b9df:c743 with SMTP id u9-20020a17090341c900b00176b9dfc743mr10643289ple.162.1663547462909; Sun, 18 Sep 2022 17:31:02 -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 u21-20020a632355000000b0041c30def5e8sm12583396pgm.33.2022.09.18.17.31.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Sep 2022 17:31:02 -0700 (PDT) In-Reply-To: <87a66x55hy.fsf@gnus.org> Content-Language: en-US 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:243022 Archived-At: On 9/18/2022 3:41 AM, Lars Ingebrigtsen wrote: > Daniel Pettersson writes: > >> This issue is not present with one completion as further down the call >> stack `completion-file-name-table' is called with action t, which concates >> completion string directory with completion candidate. >> >> Possible solution: > > Hm... I'm not that familiar with how this works in eshell myself; > perhaps Jim has some comments -- added to the CCs. With the caveats that I don't know much about pcomplete (maybe someone who does would have something interesting to say about this patch?) and that I haven't built Emacs with the patch, I think the logic here makes sense. Some regression tests would be nice though. I've been trying to add tests as I go through various parts of Eshell, but I haven't looked much at the "interactive" bits like em-cmpl.el yet. 'eshell-test/forward-arg' in test/lisp/eshell/eshell-tests.el might make for an ok basis to adapt into some completion tests (which could probably then go into .../em-cmpl-tests.el). That said, I wouldn't object to merging this without regression tests; it doesn't seem fair to me to expect patch authors to write tests when the component they're patching doesn't have tests in the first place. :)