From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#50470: 27.1; 'company-mode' 'eshell' Date: Sat, 18 Mar 2023 03:01:11 +0200 Message-ID: <5d0b85af-2cd0-bc7c-16ca-17ecd2cbf12c@yandex.ru> References: <87h7evegav.fsf@debian-BULLSEYE-live-builder-AMD64> <154bd0e9-2779-5a28-5587-a845a982e39f@yandex.ru> <815516d6-262b-4ef1-786e-ec5b4199847c@yandex.ru> <01845bee-7637-76f6-2e86-2e2de91f6f6e@yandex.ru> <0e8cc089-63ae-71b5-9617-ce76478d3ba4@yandex.ru> <602e2d92-7914-0e2b-b06e-0d47d0ac8c99@yandex.ru> <20ee85be-aafc-8942-14ea-b0c2a1abc2c9@yandex.ru> <00ad5c72-20c5-d27e-2bc8-6436858bbd8d@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30544"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Cc: Christophe , 50470@debbugs.gnu.org, John Wiegley To: Jim Porter , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 18 02:02:29 2023 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 1pdKxo-0007na-Np for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Mar 2023 02:02:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdKxX-0004Om-IT; Fri, 17 Mar 2023 21:02:12 -0400 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 1pdKxR-0004OM-92 for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2023 21:02:05 -0400 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 1pdKxO-00036q-Eu for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2023 21:02:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pdKxO-0007FP-5I for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2023 21:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Mar 2023 01:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50470 X-GNU-PR-Package: emacs Original-Received: via spool by 50470-submit@debbugs.gnu.org id=B50470.167910128227808 (code B ref 50470); Sat, 18 Mar 2023 01:02:02 +0000 Original-Received: (at 50470) by debbugs.gnu.org; 18 Mar 2023 01:01:22 +0000 Original-Received: from localhost ([127.0.0.1]:45912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdKwj-0007ES-MX for submit@debbugs.gnu.org; Fri, 17 Mar 2023 21:01:21 -0400 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:50990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdKwi-0007EF-57 for 50470@debbugs.gnu.org; Fri, 17 Mar 2023 21:01:20 -0400 Original-Received: by mail-wm1-f41.google.com with SMTP id g18so4335828wmk.0 for <50470@debbugs.gnu.org>; Fri, 17 Mar 2023 18:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679101274; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=RSdFIUctdPIL3GiOKhDWpkCgI6ys04ALQxhZx4EWUL0=; b=X2ufl6dqkeA0K+TKaLs7yXKSnskh87zVss50QzDmOsb+lMIeS/7q2RH2kwxFYAzioq m13tuPY09VsjACtzKbllYTfkwGvnaS1jzy/DRk4zVG//P807xdBS94fz/+xBrkoqfOaU 7sM4739oqWq9IVTxrhJ5HFQf1sVNdMZB5wURgwIoZ0M5Debnur89kWrMh/mtdZyTZnd0 U14pKCOXwdMxR+58YI7F0URYC06XNUaNGkoCU5PeW6gK6QE33bdrthaJ8bNnBqN7lkfK qYsZX1vK3YS+2UE5kcTlLe/nK4j5pN6A8tu1YHlHimEjdQ0of0g8z3iHb490PEDWf4vO FAdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679101274; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RSdFIUctdPIL3GiOKhDWpkCgI6ys04ALQxhZx4EWUL0=; b=VkV8Jsj2d4CZYYPHLVBKS7cRzx8i99uLWYaI1TDrXSjY+KBnvZRa/DxMCQJdVRLbwU G2zh92okpuXO2N1zkI67bRA62qR/yG4CWRTL+++bdxzYzM8OqsUullnCZ6kPxrP9vxsf IieWk/jhR8YtsMDKcvLyfdNLq5DLRGn4M4mXkqE9VV8gbTxzOmPOWPx7GnJOJN8cqSIE BKCgtlrexRad9kjYnrmZUmbEbDqpz1VBsvAN+PiOif1wl6wtvv6f4l7CT4Q3PAGB+rh+ lp1emovvFwAio6aVteWRaQV2nzSkdr4ztKyn+036FjYrvXPRLUfaATWHEc2EeqMkweKn yMVg== X-Gm-Message-State: AO0yUKUdTkwNsVspn3Q0yhUU6SuhDK5thP5USs+9QAcfFB2UYelvrCBO Slb3fqJGrvMpG8W1lM9uy24= X-Google-Smtp-Source: AK7set9QnUR7p9wZkOFd6ztD4zRlgisUqkllVrWDNK5EEE3asp1Mu24BlCkcGfA5LrjP+KgCQpWpaA== X-Received: by 2002:a05:600c:4f07:b0:3ed:3cec:d2fc with SMTP id l7-20020a05600c4f0700b003ed3cecd2fcmr9261237wmq.37.1679101273964; Fri, 17 Mar 2023 18:01:13 -0700 (PDT) Original-Received: from [192.168.0.2] ([85.132.229.92]) by smtp.googlemail.com with ESMTPSA id j8-20020a05600c1c0800b003ebf73acf9asm17091774wms.3.2023.03.17.18.01.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Mar 2023 18:01:13 -0700 (PDT) Content-Language: en-US In-Reply-To: <00ad5c72-20c5-d27e-2bc8-6436858bbd8d@gmail.com> 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:258116 Archived-At: On 17/03/2023 08:26, Jim Porter wrote: > I've recently been digging through how Eshell and Pcomplete interact, so > I think I understand what's happening here. Thanks! > On 6/7/2022 3:39 PM, Dmitry Gutov wrote: >> pcomplete-completions-at-point somehow has pcomplete-stub pointing to >> the necessary value (e.g. "/home/dgutov/Do") in the asterisk-less >> cases (due to some other code path being taken), but not in this >> specific one. > > I believe the problem is that when Eshell parses the command line to > figure out what to give Pcomplete, it expands the globs itself, so > things get messed up. So we want to prevent glob-expansion before > passing to Pcomplete. > > The below patch does this, but it's probably not the right way to do it. >  However, it's a simple change, and before I go through the larger > effort of a proper patch, I want to be sure I'm actually solving the > right thing. I can't comment on the exact right way to implement this, but the patch does seem to solve the remaining problem here. Which is completion for inputs containing *. The result looks rather nice.