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: Wed, 8 Jun 2022 01:39:03 +0300 Message-ID: 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> 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="1199"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: Christophe , 50470@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 Wed Jun 08 01:20:58 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 1nyiVM-00005t-UD for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Jun 2022 01:20:57 +0200 Original-Received: from localhost ([::1]:54906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyiVL-00048W-H2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 19:20:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyhrm-00037o-I5 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 18:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyhrm-00012n-9e for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 18:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyhrm-0003dM-2r for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 18:40: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: Tue, 07 Jun 2022 22:40: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.165464155613912 (code B ref 50470); Tue, 07 Jun 2022 22:40:02 +0000 Original-Received: (at 50470) by debbugs.gnu.org; 7 Jun 2022 22:39:16 +0000 Original-Received: from localhost ([127.0.0.1]:41885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyhr2-0003cJ-Ek for submit@debbugs.gnu.org; Tue, 07 Jun 2022 18:39:16 -0400 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:36704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyhqy-0003c4-3V for 50470@debbugs.gnu.org; Tue, 07 Jun 2022 18:39:14 -0400 Original-Received: by mail-wm1-f44.google.com with SMTP id h62-20020a1c2141000000b0039aa4d054e2so12459979wmh.1 for <50470@debbugs.gnu.org>; Tue, 07 Jun 2022 15:39:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Z6Fnm0Y8jk84qXKR9lh16XC9DaQitoUyfCdFTezOUio=; b=NbIKesoGFG8JqBT5pQ8ZZJvSR2eWrrQqY8F2aNnheH/n13CcyBLojV5Qlh29OWbm7B CcTXOmRCY8Es9vS9TSQzfOoEQ6BlMyJeEAPaSEIVRXvoH/YRFkJjpBJjJ0mMVTO7+bz5 HjvYm2kzh3CqGrcwqnN/B6cAh+1vRljZ4UTaIlT5BIZZo961fhBvNHMBNh2zJUXoOMhm NGBwPcz6ccanISy3FcSnGm+pKCIEcF44saOCGIrZyql5i08jxQdUOvghKH2zJpMbpXAO na3TV4epIHGp75bVYPLKvzlishdJkBfpl4il2C/UkZsxYntNRJPabve+7lHnK6+hykvi /aJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Z6Fnm0Y8jk84qXKR9lh16XC9DaQitoUyfCdFTezOUio=; b=jbJJ14TnI/14SGIleHCwQrakg1iRzyI2DCG3eNKSYffCFflB82SQ4wJARPRgTUr4lS WAZ8vK3tOniULE5Gy5nDan42UB745/FAPworgRpLac1X9oB+q372WHopjlspIg1JIgUU Ut9lcZQqzWQ+0HMQ9ysIQYTKncGVT8ZAa6Vxu+AiwNOIBr/a4JajmCUYrqt1yJZD7V6B kZpl6NsLnCdxynZtDgnO7Y7wFKMOeuobh6MTr4kYdbSezY39V+TT4dnVOHeUNepmq+hL dQu2Kjbuvd7+oh52JmfIQPgBUaM8sZTVzgRCVO30uXj4zwY53moQt6vALZJPNdWsqQ33 EwEg== X-Gm-Message-State: AOAM530A8QL8t685YHmBFutb2seAL54LZGMzPIaWpGGPNweNclrU7tkl 9VUwWjgpwfAb4Jh9vekPoKM= X-Google-Smtp-Source: ABdhPJyZYmohm8NGzDa5EBdBTsjxAhrTrSE13M1rjZPluTqotZSftzIl0c+hSj9TZXFDV6E6ra8kgQ== X-Received: by 2002:a05:600c:34cf:b0:39c:4dfb:1398 with SMTP id d15-20020a05600c34cf00b0039c4dfb1398mr14929682wmq.133.1654641546152; Tue, 07 Jun 2022 15:39:06 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id w25-20020a7bc759000000b0039c5645c60fsm4854657wmk.3.2022.06.07.15.39.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jun 2022 15:39:05 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:233939 Archived-At: On 07.06.2022 18:52, Stefan Monnier wrote: > Dmitry Gutov [2022-06-06 12:07:58] wrote: >> On 06.06.2022 04:34, Stefan Monnier via Bug reports for GNU Emacs, the Swiss >> army knife of text editors wrote: >>> Still, if you remove the ~/ the behavior is still not great: it seems I get >>> "Do*" completed to "Documents/ " where the SPC might not be what I want. >> I think that space comes from exit-function (defined at the end of >> pcomplete-completions-at-point). >> So it should be orthogonal to the contents of the completion table. > Right, but when we complete file names in Eshell, the behavior is > better, because the exit-function is different. I don't think there's > much we can do about it within `pcomplete.el`, tho. I'm sorry, I don't understand. pcomplete-completions-at-point is the completion function used for Eshell, and the exit-function it defines at the end is the one that inserts the spaces. So... which behaviors are you comparing? Speaking of trying to use completion-table-subvert, it doesn't seem obvious which value to use as S2. What we have is a list of strings, and the common prefix isn't going to always match the (unexpanded) input. 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. Conceptually, it seems easier and cleaner to avoid expansion in the first place. The patch below does that, though I'm not sure what unwanted side-effects it might have ('cd' still works). In any case, supporting completion with asterisk doesn't seem very useful, given that the user might as well omit that char and get the same list of completions, and typing asterisk in the middle of a work doesn't work. That's where the 'backend' style could help indeed. diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 5396044d8c..fa504bb618 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -204,8 +204,8 @@ eshell-dirs-initialize 'eshell-dirs-substitute-cd) eshell-interpreter-alist))) - (add-hook 'eshell-parse-argument-hook - #'eshell-parse-user-reference nil t) + ;; (add-hook 'eshell-parse-argument-hook + ;; #'eshell-parse-user-reference nil t) (if (eshell-under-windows-p) (add-hook 'eshell-parse-argument-hook #'eshell-parse-drive-letter nil t))