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#50459: 28.0.50; Python shell completion is incompatible with flex, orderless, etc. Date: Fri, 10 Sep 2021 17:22:39 +0300 Message-ID: References: <87wnnsl1d1.fsf@gmail.com> <87czpijixk.fsf@gmail.com> <877dfqjfwu.fsf@gmail.com> <87mtolr91a.fsf@gmail.com> <877dfopsoa.fsf@gnus.org> <87zgskejjq.fsf@gmail.com> <87ee9wa7yo.fsf@gmail.com> <8ee6271b-142e-7cc1-3d24-7e5c342ef86b@yandex.ru> 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="27953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: Augusto Stoffel , Lars Ingebrigtsen , Michael Albinus , 50459@debbugs.gnu.org, Gregory Heytings To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 10 16:23:12 2021 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 1mOhQu-000747-1Y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Sep 2021 16:23:12 +0200 Original-Received: from localhost ([::1]:43798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOhQr-0001nm-W1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Sep 2021 10:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOhQk-0001jx-Mb for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 10:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOhQk-0003o9-Ee for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 10:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mOhQk-0000Jr-6S for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 10:23: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: Fri, 10 Sep 2021 14:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50459 X-GNU-PR-Package: emacs Original-Received: via spool by 50459-submit@debbugs.gnu.org id=B50459.16312837711198 (code B ref 50459); Fri, 10 Sep 2021 14:23:02 +0000 Original-Received: (at 50459) by debbugs.gnu.org; 10 Sep 2021 14:22:51 +0000 Original-Received: from localhost ([127.0.0.1]:38915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOhQZ-0000JG-Fn for submit@debbugs.gnu.org; Fri, 10 Sep 2021 10:22:51 -0400 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:36467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOhQX-0000J0-J4 for 50459@debbugs.gnu.org; Fri, 10 Sep 2021 10:22:50 -0400 Original-Received: by mail-wm1-f47.google.com with SMTP id l18-20020a05600c4f1200b002f8cf606262so1604288wmq.1 for <50459@debbugs.gnu.org>; Fri, 10 Sep 2021 07:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lP8+T//0sjKi7TplPNKlZbYTwgCJ+VF9OPivj6JsWBg=; b=VHebrV75bTlr5bWU5sgliYPXsXWMymuL+kdle1F+bvBC7e/ulkh3eImbWvq0NZQk4Y XOngwD6sNfTWtgC35X/u017wbFVYAWPgRsEFF6k0KqGyz+SMRHjV/rivZufSQI2gT5f1 9xSWWMav+BjgV6yfCwtoJgmBjVMm8pGHhXfcWuPR3lF/7M1tMZ9la3t/3uIk40FS2Gup rZqNPjos8PP4FncmiVd1wpFr4Wqr6Yq+a5+OAPxplQybZbp3wAs5+JPQ5H1CoqTIDAb5 1OpAWLz4LYj29WDDpklKkIZKLt2oREuXxBk0k91vLUlyzZOBqoOxI9yQKq4oQEtvBVox TPhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lP8+T//0sjKi7TplPNKlZbYTwgCJ+VF9OPivj6JsWBg=; b=CQKd6JJ2a0V0ivMs6kgJWitei9C3E9cQHpQYXqJb0OLnRIGpnAAzw2Jn15+5sbT06W gQLkJA/lkepntohAfBIWaG6YvwYafY1G1GDCIm7fhWuZBQUrFEjvSfyzgwF9G0LnlW3A 572GCu5Wbz9GfgEJXP6B+zH0eH4d+kWuD2TfaZyGduliq3+iZI8nr7g0W7tErO9N9eca ft0Tzyo+WU/XyvUIIkMR60Kr5sSl27hujoB4fBw8pYPJPoq1yZIA3VpzVrVpIcu1B9s2 Ay9W+2N91QNTpjSJpO+RLbAjFqDlEyV271rAIhnusOGYrXRShU20p6sN4fj+Xoo4DJ1R Qwtg== X-Gm-Message-State: AOAM533B6Sm9oShuIzacdJeHrALG1p5Nm3aLljlk49f5v4dk7ChaGH1N VGogI6aGw9c6ahMHyMO/qVw= X-Google-Smtp-Source: ABdhPJzqyqP/FdE2S3r57uKmXC6P4uDXnYPtlliGLjz45/SQAYPv9G0GiL1sOQ7Ra1PZtR/a5opq1w== X-Received: by 2002:a1c:f606:: with SMTP id w6mr8634993wmc.42.1631283763709; Fri, 10 Sep 2021 07:22:43 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id d7sm4689263wrs.39.2021.09.10.07.22.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Sep 2021 07:22:43 -0700 (PDT) In-Reply-To: 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:214016 Archived-At: On 10.09.2021 17:06, João Távora wrote: > On Fri, Sep 10, 2021 at 2:28 PM Dmitry Gutov wrote: >> >> On 10.09.2021 16:14, João Távora wrote: >>> - If you're OK with letting the server do the filtering and the >>> highlighting, you can make a "backend" style like I did for SLY, for >>> example. It's going to be faster, but `completion-styles` won't be >>> honoured. That's doesn't mean you give up 100% on "flex". In SLY, >>> there is flex implemented on the Common Lisp side, and for Eglot, many >>> LSP server do their own flex matching. >> >> You can't really do that with python-shell completion. > > Probably not unless you write some python, no. I don't see that > as being that dirty. I didn't say it was dirty, just not very fitting for the current approach: when you do completion by piping code for evaluation through inferior shell, you generally like that code to be simple. And reimplementing every completion style in Python seems like anything but. >> Nor do you need >> do: the basic pcmpl mechanism should work just fine with it, and for >> performance the completion table just needs some smarter caching. > > Yes, as I said in b), with "sufficiently smart caching" (and infinite > memory space) you can do everything, indeed. It's one of the > famous "two hard problems" though, so good luck. Completion backends do caching anyways, whether it's on the Emacs side, or somewhere inside a language server. Since completion logic is defined on "our" side here (despite being written in Python), caching logic can reside here too.