GNU logs - #48572, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: Daniel Mendler <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 21 May 2021 18:49:02 +0000
Resent-Message-ID: <handler.48572.B.162162292923640 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 48572 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier@HIDDEN>, joaotavora@HIDDEN
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.162162292923640
          (code B ref -1); Fri, 21 May 2021 18:49:02 +0000
Received: (at submit) by debbugs.gnu.org; 21 May 2021 18:48:49 +0000
Received: from localhost ([127.0.0.1]:37576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lkACW-00069E-PW
	for submit <at> debbugs.gnu.org; Fri, 21 May 2021 14:48:48 -0400
Received: from lists.gnu.org ([209.51.188.17]:49254)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1lkACS-000694-Da
 for submit <at> debbugs.gnu.org; Fri, 21 May 2021 14:48:47 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59618)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1lkACR-0001nn-Rx
 for bug-gnu-emacs@HIDDEN; Fri, 21 May 2021 14:48:44 -0400
Received: from server.qxqx.de ([2a01:4f8:121:346::180]:52081 helo=mail.qxqx.de)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1lkACP-0005xT-MJ
 for bug-gnu-emacs@HIDDEN; Fri, 21 May 2021 14:48:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:
 Message-ID:Cc:Subject:From:To:Sender:Reply-To:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=ltZP6Ratw0k3wbtudAQ+SnB8G7EnyUqJP0IEbLt4LQU=; b=Dkw4rXgy7H0AojDaYIkCUqe/jV
 L9DIKxJvxwW8G2tKkIworwNfhT1dpG5B7mOGGQWSScsTlSboc7Vfpj5R/IMVKLEBO7zqFaNvePqPW
 rwFG9zgXWb1cflMOi9F8gizOLjsm4wGu2AznOyQLzeZDJyYlihVCOh4sppy8HYWO4vpc=;
From: Daniel Mendler <mail@HIDDEN>
Message-ID: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
Date: Fri, 21 May 2021 20:48:35 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=2a01:4f8:121:346::180;
 envelope-from=mail@HIDDEN; helo=mail.qxqx.de
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

In some scenarios it is useful to disable the completion style
infrastructure. This includes Eglot or my Asynchronous Fuzzy Finder for
Emacs (https://github.com/minad/affe/).

The addition of a passthrough completion style helps these use cases.

(defun passthrough-all-completions (_str table pred _point)
  "Passthrough completion function.
See `completion-all-completions' for the arguments STR, TABLE, PRED and
POINT."
  (let ((completion-regexp-list))
    (all-completions "" table pred)))

(defun passthrough-try-completion (str table pred _point)
  "Passthrough completion function.
See `completion-try-completion' for the arguments STR, TABLE, PRED and
POINT."
  (let ((completion-regexp-list)
        (completion (try-completion str table pred)))
    (if (stringp completion)
        (cons completion (length completion))
      completion)))

(add-to-list 'completion-styles-alist
             (list 'passthrough
                   #'passthrough-try-completion
                   #'passthrough-all-completions
                   "Passthrough completion style."))




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Daniel Mendler <mail@HIDDEN>
Subject: bug#48572: Acknowledgement (28.0.50; Add `passthrough` completion
 style to minibuffer.el)
Message-ID: <handler.48572.B.162162292923640.ack <at> debbugs.gnu.org>
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
X-Gnu-PR-Message: ack 48572
X-Gnu-PR-Package: emacs
Reply-To: 48572 <at> debbugs.gnu.org
Date: Fri, 21 May 2021 18:49:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 48572 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
48572: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48572
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 22 May 2021 23:22:01 +0000
Resent-Message-ID: <handler.48572.B.162172566325484 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Daniel Mendler <mail@HIDDEN>
Cc: 48572 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-Debbugs-Original-Cc: bug-gnu-emacs@HIDDEN, joaotavora@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.162172566325484
          (code B ref -1); Sat, 22 May 2021 23:22:01 +0000
Received: (at submit) by debbugs.gnu.org; 22 May 2021 23:21:03 +0000
Received: from localhost ([127.0.0.1]:40239 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lkavX-0006cy-CA
	for submit <at> debbugs.gnu.org; Sat, 22 May 2021 19:21:03 -0400
Received: from lists.gnu.org ([209.51.188.17]:57622)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1lkavT-0006cC-GM
 for submit <at> debbugs.gnu.org; Sat, 22 May 2021 19:21:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60792)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <monnier@HIDDEN>)
 id 1lkavT-0001vU-8D
 for bug-gnu-emacs@HIDDEN; Sat, 22 May 2021 19:20:59 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27769)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <monnier@HIDDEN>)
 id 1lkavR-0003AO-09
 for bug-gnu-emacs@HIDDEN; Sat, 22 May 2021 19:20:58 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7922F4411A9;
 Sat, 22 May 2021 19:20:55 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2D0514411A4;
 Sat, 22 May 2021 19:20:54 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1621725654;
 bh=bjqTCU3Oluws2M7nulYK2MQK7wqPgmlms2pBexnkVY8=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=DyCcAxqv1gfgjcA4L4U1EJrpqbuwt3vX0zUuxhg3UjthLti4yfVDKY+71M7Xz+1Xj
 Y+3ZP7jA880YM617EQ1UpDLW5J+iDTy3WbCQ5/IEIrpRNsy5dWP95K/DBB+WEnTbV5
 Iyduga5t/HVrZMlaKGmGX8QM2WQdyjPH8s+U4a7eCW8sKjmTQtnzOguKSZlnFDuFne
 PoqmkJqwcM49MWh/IkSwU9xgFA42q4u4PzLFQCCnAPGqImZqWaLyXte1rG7FXwF/W8
 12VkQIHODoWiqQeqol/9QCI9MaKOKks+TwLpMVWlFdIRz+DTNTd7quJ47lALX/G78i
 uYPLvlTwkb4Qw==
Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EBE1C120B01;
 Sat, 22 May 2021 19:20:53 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvbl924awi.fsf-monnier+emacs@HIDDEN>
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
Date: Sat, 22 May 2021 19:20:53 -0400
In-Reply-To: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN> (Daniel
 Mendler's message of "Fri, 21 May 2021 20:48:35 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.125 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
Received-SPF: pass client-ip=132.204.25.50;
 envelope-from=monnier@HIDDEN; helo=mailscanner.iro.umontreal.ca
X-Spam_score_int: -42
X-Spam_score: -4.3
X-Spam_bar: ----
X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> (defun passthrough-all-completions (_str table pred _point)
>   "Passthrough completion function.
> See `completion-all-completions' for the arguments STR, TABLE, PRED and
> POINT."
>   (let ((completion-regexp-list))
>     (all-completions "" table pred)))

Clearly, this is not right: passthrough completion should pass the `str`
and `point` info to the completion table.  The completion table may opt
to ignore that information, but we shouldn't prevent them from using it.
I expect most passthrough uses will want to use `str`.

> (defun passthrough-try-completion (str table pred _point)
>   "Passthrough completion function.
> See `completion-try-completion' for the arguments STR, TABLE, PRED and
> POINT."
>   (let ((completion-regexp-list)
>         (completion (try-completion str table pred)))
>     (if (stringp completion)
>         (cons completion (length completion))
>       completion)))

Same here: I think it's better to pass `point` to the completion table
and let the completion table return the `cons` cell.

Furthermore, `all-completions` and `try-completion` on a completion
table is defined as returning only the prefix completion, so the above
code would force `table` to be a "broken" completion table that doesn't
obey the normal completion table API.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: Dmitry Gutov <dgutov@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 23 May 2021 01:08:02 +0000
Resent-Message-ID: <handler.48572.B48572.16217320462423 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Daniel Mendler <mail@HIDDEN>, 48572 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier@HIDDEN>, joaotavora@HIDDEN
Received: via spool by 48572-submit <at> debbugs.gnu.org id=B48572.16217320462423
          (code B ref 48572); Sun, 23 May 2021 01:08:02 +0000
Received: (at 48572) by debbugs.gnu.org; 23 May 2021 01:07:26 +0000
Received: from localhost ([127.0.0.1]:40275 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lkcaU-0000d0-0E
	for submit <at> debbugs.gnu.org; Sat, 22 May 2021 21:07:26 -0400
Received: from mail-wr1-f48.google.com ([209.85.221.48]:41601)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1lkcaT-0000cl-EX
 for 48572 <at> debbugs.gnu.org; Sat, 22 May 2021 21:07:25 -0400
Received: by mail-wr1-f48.google.com with SMTP id d11so24694476wrw.8
 for <48572 <at> debbugs.gnu.org>; Sat, 22 May 2021 18:07:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=ONi9r6j2G2jj06lYwnSDkyQspwwvgcPPlLXnrjD4BHU=;
 b=XMd6Jc4mJt/aTT6ixzeEnuw7ppwwSfFT6vFA8m168NlBGu5FZyei7x7IAu1K9U1XCW
 ft9niCFa6u3SR1xOpdTvVUhkiKVzT3LgBDiSnOwvw052Fp1fX4Gf2KaRV0eogByHOImE
 AFhU2F4m1kRzwgtue49Qm10uLFe/D86+eU9QhVd7hgLCh5xGA6iLPMR6PBb5bDRM1iNc
 qdG50PKHAoAEgaXUvRucNGi1cSFV0RfBkX1SSz/SFJ8DOFuzf9KJaO0/jas8vI4WyFX5
 NjVBXqa5ycYJD7bmCtNsgCTmP7EgsBD0oqobcKKmk+8ByRG5aq8sWziiidBrQnkkO3Sk
 CbVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 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=ONi9r6j2G2jj06lYwnSDkyQspwwvgcPPlLXnrjD4BHU=;
 b=MHJSMGKCqa5HOwmrzLBRXulEfBht4Z+vBnSpVJlz9c6RMnI0hiHJ9dRMGcFT0zLx5I
 lPa+6SLh4oomoXDIV9r4MatwixvpN2qvzVt4KEgy5n1dXauIPJDQsO6QUCSKDUaUV5xe
 gu9Z142Pvd2MdnhcyB85/NQ8hBgH06evCNug92VSHu523oFK+xWVMRe2YlJN9E3/OITj
 RX2SatHz9UmBCC+ZSrn73TMki9kHXY6q4gUuzPB86H+ULHx9dhrkmUwzOOg0WCtSrg80
 OZrzc6BW6JzwYdm0KEvb7UJJ3FDFTLPTa1BJrKuPocHi0GptNeAWDCNF00L7x4gMdGgv
 HMdg==
X-Gm-Message-State: AOAM532BFLIzKW0fEsCKRzCa4KmAfEVlE1aLD62bwIKi8Mk69qchXEn/
 y/BHKuOqq0nXJs1gqWNwboA=
X-Google-Smtp-Source: ABdhPJysQRGRVmacDwuJNCrYAgJxwsSG4PnxgiwZ2rgjF3CRLJ1ZCQUv98dzaQ9YBU6zl13wicaKuA==
X-Received: by 2002:adf:8b4a:: with SMTP id v10mr15697714wra.274.1621732039473; 
 Sat, 22 May 2021 18:07:19 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id z3sm7312217wrq.42.2021.05.22.18.07.17
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 22 May 2021 18:07:18 -0700 (PDT)
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <eeb4c378-911b-6c45-d4d8-d984c37cbbd1@HIDDEN>
Date: Sun, 23 May 2021 04:07:16 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.8.1
MIME-Version: 1.0
In-Reply-To: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 21.05.2021 21:48, Daniel Mendler wrote:
> The addition of a passthrough completion style helps these use cases.

+1

I think we also need some documented protocol for adding highlightings 
to such returned completions. Maybe even a lazy one.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: Daniel Mendler <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 23 May 2021 10:22:02 +0000
Resent-Message-ID: <handler.48572.B.162176530623940 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: 48572 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-Debbugs-Original-Cc: bug-gnu-emacs@HIDDEN, joaotavora@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.162176530623940
          (code B ref -1); Sun, 23 May 2021 10:22:02 +0000
Received: (at submit) by debbugs.gnu.org; 23 May 2021 10:21:46 +0000
Received: from localhost ([127.0.0.1]:40633 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lklEt-0006E1-C1
	for submit <at> debbugs.gnu.org; Sun, 23 May 2021 06:21:46 -0400
Received: from lists.gnu.org ([209.51.188.17]:38398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1lklEq-0006Dr-Vl
 for submit <at> debbugs.gnu.org; Sun, 23 May 2021 06:21:42 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43266)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1lklEq-0007tc-QA
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 06:21:40 -0400
Received: from server.qxqx.de ([2a01:4f8:121:346::180]:51275 helo=mail.qxqx.de)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1lklEo-0006C1-5d
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 06:21:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:
 MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=56ytnnNliGY0Xd2q+SXOGPyGf0E5t/TGUYNBv5eDhII=; b=aExBEM1HDCXGxc8ZwwrXy5Jvqh
 iGW3AEhsv0W6R9SM97Dyh3IrrEASrtjWQ0FDLAjCutAbuNJRuPMpkZSw/RMVmuw/h86TkwN7vWACb
 Av4xPwq2OGfM+c0FtJEclRH6GZklKmZJ4+rQoSv4E+/LrQachdleOnZxqpdFfRhvZ6Nk=;
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
 <jwvbl924awi.fsf-monnier+emacs@HIDDEN>
From: Daniel Mendler <mail@HIDDEN>
Message-ID: <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@HIDDEN>
Date: Sun, 23 May 2021 12:21:33 +0200
MIME-Version: 1.0
In-Reply-To: <jwvbl924awi.fsf-monnier+emacs@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=2a01:4f8:121:346::180;
 envelope-from=mail@HIDDEN; helo=mail.qxqx.de
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/23/21 1:20 AM, Stefan Monnier wrote:
>> (defun passthrough-all-completions (_str table pred _point)
>>   "Passthrough completion function.
>> See `completion-all-completions' for the arguments STR, TABLE, PRED and
>> POINT."
>>   (let ((completion-regexp-list))
>>     (all-completions "" table pred)))
> 
> Clearly, this is not right: passthrough completion should pass the `str`
> and `point` info to the completion table.  The completion table may opt
> to ignore that information, but we shouldn't prevent them from using it.
> I expect most passthrough uses will want to use `str`.

I see what you mean. In my use case I didn't use an improperly
implemented completion table which does not ignore . However the
question is then if this "passthrough" style is really needed since if
you don't ignore the input, it is mostly equivalent to the emacs21 style.

It is at least good to discuss this. I think all use cases of the
passthrough table are a bit of an edge case (or broken tables in the
strict definition), e.g., my fuzzy finder or eglot.

> Furthermore, `all-completions` and `try-completion` on a completion
> table is defined as returning only the prefix completion, so the above
> code would force `table` to be a "broken" completion table that doesn't
> obey the normal completion table API.

Well, it forces the table to return all candidates.

Overall it seems that the passthrough you have in mind is already
covered by the emacs21 style. I had considered something different which
effectively disables the full completion infrastructure. Maybe these use
cases are too special to be catered for by minibuffer.el?

I have to think a bit more about this. Probably I can achieve the same
in my fuzzy finder using the emacs21 style.

Daniel




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: Daniel Mendler <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 23 May 2021 10:37:01 +0000
Resent-Message-ID: <handler.48572.B.16217661902168 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: 48572 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-Debbugs-Original-Cc: bug-gnu-emacs@HIDDEN, joaotavora@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16217661902168
          (code B ref -1); Sun, 23 May 2021 10:37:01 +0000
Received: (at submit) by debbugs.gnu.org; 23 May 2021 10:36:30 +0000
Received: from localhost ([127.0.0.1]:40655 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lklTC-0000Yu-Kh
	for submit <at> debbugs.gnu.org; Sun, 23 May 2021 06:36:30 -0400
Received: from lists.gnu.org ([209.51.188.17]:42454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1lklTB-0000Yn-BF
 for submit <at> debbugs.gnu.org; Sun, 23 May 2021 06:36:29 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46002)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1lklTB-00036C-4Q
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 06:36:29 -0400
Received: from server.qxqx.de ([2a01:4f8:121:346::180]:47659 helo=mail.qxqx.de)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1lklT7-0005IS-Rc
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 06:36:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:
 MIME-Version:Date:Message-ID:References:Cc:To:From:Subject:Sender:Reply-To:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=1IC9pdieSghklRsctCZQLlSqBkmA6n9ls2daWlcJ0So=; b=lV8+vMwLyZB+1OjlFeUL5vbjfr
 wcXq4jeHcf8JQzoD6CFTIDHhKyfbXNkUvdWzbVwMmh4gdnVJg1HH/wY1ktSD5WdDRnXOcWuimeit1
 pX5RR8z7Rd0oY0JRHAlZtFRhMP9w5YNCpfhJVYUZ1h/WkQNo3aNgiLoN2670UGZ/fxuk=;
From: Daniel Mendler <mail@HIDDEN>
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
 <jwvbl924awi.fsf-monnier+emacs@HIDDEN>
 <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@HIDDEN>
Message-ID: <b89d70cc-9224-2f08-7e85-d146452bd559@HIDDEN>
Date: Sun, 23 May 2021 12:36:22 +0200
MIME-Version: 1.0
In-Reply-To: <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=2a01:4f8:121:346::180;
 envelope-from=mail@HIDDEN; helo=mail.qxqx.de
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

On 5/23/21 12:21 PM, Daniel Mendler wrote:
> I have to think a bit more about this. Probably I can achieve the same
> in my fuzzy finder using the emacs21 style.

Okay, I cannot achieve this, since I want to still forego the
highlighting. But besides that ignoring the string inside the
passthrough style itself is not necessary.

So a style which does not apply highlighting is all that is needed?

Daniel




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 23 May 2021 15:52:01 +0000
Resent-Message-ID: <handler.48572.B.162178507216508 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Daniel Mendler <mail@HIDDEN>
Cc: 48572 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-Debbugs-Original-Cc: bug-gnu-emacs@HIDDEN, joaotavora@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.162178507216508
          (code B ref -1); Sun, 23 May 2021 15:52:01 +0000
Received: (at submit) by debbugs.gnu.org; 23 May 2021 15:51:12 +0000
Received: from localhost ([127.0.0.1]:41676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lkqNk-0004IB-8r
	for submit <at> debbugs.gnu.org; Sun, 23 May 2021 11:51:12 -0400
Received: from lists.gnu.org ([209.51.188.17]:55184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1lkqNf-0004I1-9t
 for submit <at> debbugs.gnu.org; Sun, 23 May 2021 11:51:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38066)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <monnier@HIDDEN>)
 id 1lkqNf-0007Ee-1Q
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 11:51:07 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54441)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <monnier@HIDDEN>)
 id 1lkqNd-0002x1-Cw
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 11:51:06 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id F1D64808A3;
 Sun, 23 May 2021 11:51:03 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DD09A80169;
 Sun, 23 May 2021 11:50:57 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1621785057;
 bh=ri4XXz4QOB1Iocm7GYPELnVGPKLdp/fmfqiKqSuFtL8=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=HWk3xRHZGEcBZ8DDLt80NZTgoL35XsskHLInWSMFtJrfGD42Se9xwJ+Mw6ZWez0uF
 0iE8/YsF5sx8yN0GTt8H29e45HB7kiYTFVxJ+xk2R1tRX8CWqBAyKxkIH1icJMn5E8
 A1O1v5cITuFsmfnuVNeCaXgAjsOIVq6R9H+2Y59grwh0Lv8/k0jqRqTaKKgV31rmlN
 eDq56zgLzOwOGCNZGStajhZiFRAzLTaZBIqbHW6RWbcOOR3y9cb7eHgWai2FeyHB4E
 MktxoNPYjfWzoo/HPaX5WolBrPHFIF8ptU58ca4wKg8PORxg3C5586HQGe1hkyG0Dt
 nSuoGbTTUrp3g==
Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 908FF12055F;
 Sun, 23 May 2021 11:50:57 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvr1hx1mj2.fsf-monnier+emacs@HIDDEN>
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
 <jwvbl924awi.fsf-monnier+emacs@HIDDEN>
 <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@HIDDEN>
Date: Sun, 23 May 2021 11:50:56 -0400
In-Reply-To: <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@HIDDEN> (Daniel
 Mendler's message of "Sun, 23 May 2021 12:21:33 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.079 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
Received-SPF: pass client-ip=132.204.25.50;
 envelope-from=monnier@HIDDEN; helo=mailscanner.iro.umontreal.ca
X-Spam_score_int: -42
X-Spam_score: -4.3
X-Spam_bar: ----
X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

>> Clearly, this is not right: passthrough completion should pass the `str`
>> and `point` info to the completion table.  The completion table may opt
>> to ignore that information, but we shouldn't prevent them from using it.
>> I expect most passthrough uses will want to use `str`.
>
> I see what you mean. In my use case I didn't use an improperly
> implemented completion table which does not ignore . However the
> question is then if this "passthrough" style is really needed since if
> you don't ignore the input, it is mostly equivalent to the emacs21 style.

The "passthrough" (elsewhere called "backend") completion-style is
definitely something we need to add, yes.  But what it should do is pass
all the args from `completion-all/try-completions` to the table and let
the table do *all* the work, i.e. let the completion table implement the
completion-style methods.  But we shouldn't call `all-completions` or
`try-completions` for that.  Instead we should call the completion-table
directly, as is done for the `completion-boundaries` method.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 23 May 2021 18:49:01 +0000
Resent-Message-ID: <handler.48572.B.16217957288191 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: mail@HIDDEN, 48572 <at> debbugs.gnu.org
X-Debbugs-Original-Cc: Daniel Mendler <mail@HIDDEN>, bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16217957288191
          (code B ref -1); Sun, 23 May 2021 18:49:01 +0000
Received: (at submit) by debbugs.gnu.org; 23 May 2021 18:48:48 +0000
Received: from localhost ([127.0.0.1]:41758 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lkt9c-000283-7r
	for submit <at> debbugs.gnu.org; Sun, 23 May 2021 14:48:48 -0400
Received: from lists.gnu.org ([209.51.188.17]:56454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1lkt9Z-00027u-6h
 for submit <at> debbugs.gnu.org; Sun, 23 May 2021 14:48:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33956)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <joaotavora@HIDDEN>)
 id 1lkt9X-0000nR-BO
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 14:48:43 -0400
Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]:40456)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <joaotavora@HIDDEN>)
 id 1lkt9T-0004jy-Pw
 for bug-gnu-emacs@HIDDEN; Sun, 23 May 2021 14:48:43 -0400
Received: by mail-io1-xd2f.google.com with SMTP id e17so13026094iol.7
 for <bug-gnu-emacs@HIDDEN>; Sun, 23 May 2021 11:48:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=AIB7b1aUA/O1tdD/bvckj13+Wk+w8z+ptcuG3OawzCc=;
 b=GGvRZbi2dtYJNRFMzf9ESXkRqWpqO6AD/IROc4pgx8JRA/UVOqN7dBMfuO6VhNqqLw
 xnpK6az4uK681D9d+A4wod1Peh/EhlK7bI4h6sEoSWy+GFTDh2n6erAfnAT84sV+JMGX
 PWQuWpT64BQ19iIW+jgJq7SR0WCPGOiX7yZtB5uy0q/U7qd/1YZ96pvbc9xQn2Z2guvk
 yWvW4Ym09zkx7w31Hq0zXC0cluw7DGW2xGIC70ZGsjT0+yX1sAm5S6cQ/kfL9htneg6w
 /15D9w+j2wWwsvisf0HfxrESuACvEpuK0vmSGvr1G6zB+blkPnEayg1TIaZA//bzJm7Z
 TiIA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=AIB7b1aUA/O1tdD/bvckj13+Wk+w8z+ptcuG3OawzCc=;
 b=NZmT4LQEigUi/HirA8b6ZCIYzx3xoVsQIe+z/QPbErBODZljreIpvnXaUdzFGqkHZj
 N4220n7OkBKrtrudnju3P29sh5JkEhkH0Oh2UJ+KAXOoZaGalOeH8fHVWFnOVuC4FjPt
 XPYWo5PdTMOicvHdKA2gjyN5C2lmQ/wYv75Huvw6AVw09PQdHMw7N1gYl1nAGL6bRZPP
 PEMuLy7bt7z3B3T+bBlL+56Qt1R96/aDKPNv2Vj5AopObyaZfxUaW8ICaDDT4kEK1l2B
 fGs1T4LK3qzNHzb9VJTMpL8K+YDMl52n8K9LcF1TSQ9KLjl+vXz1KHtfyhwo4LUiaUKh
 524Q==
X-Gm-Message-State: AOAM532XT+6RloF5K1iJU/dUNO49Ydo2VI7A7aBQBQlhXkIrGygv+37B
 niZXBep3CwPtQmNbS9HeE/qM/j+XypK9qVDwOts=
X-Google-Smtp-Source: ABdhPJwJNPD0NhyCqSd4YhvEgoZx96kEUzzuVVDEeE2MWjrhgxOUXB+9zMnvoEIyCPR8+V7mNb5ck6d9Lb4eog5MT7Q=
X-Received: by 2002:a02:a312:: with SMTP id q18mr20328282jai.24.1621795718273; 
 Sun, 23 May 2021 11:48:38 -0700 (PDT)
MIME-Version: 1.0
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
 <jwvbl924awi.fsf-monnier+emacs@HIDDEN>
 <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@HIDDEN>
 <jwvr1hx1mj2.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwvr1hx1mj2.fsf-monnier+emacs@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Sun, 23 May 2021 18:33:42 +0100
Message-ID: <CALDnm51FMkaJpQ6etog3wK5ABtCPEh39UrOCx1i7nxJtk87-GA@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000af9f1b05c303bd6c"
Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f;
 envelope-from=joaotavora@HIDDEN; helo=mail-io1-xd2f.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000af9f1b05c303bd6c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

If it helps, I've a working copy of Stefan's idea over at
github.com/joaotavora/sly.

Indeed it's called backend there, and it's been working fine for some years
to let Sly's completion providing backend do the flex or prefix heavy
lifting, while still appearing as a normal completion table to Emacs
frontends, such as icomplete, vanilla, company-capf and even Helm.

A first approach could be just to copy that over to Emacs minubuffer.el.

Jo=C3=A3o

On Sun, May 23, 2021, 16:51 Stefan Monnier <monnier@HIDDEN> wrote=
:

> >> Clearly, this is not right: passthrough completion should pass the `st=
r`
> >> and `point` info to the completion table.  The completion table may op=
t
> >> to ignore that information, but we shouldn't prevent them from using i=
t.
> >> I expect most passthrough uses will want to use `str`.
> >
> > I see what you mean. In my use case I didn't use an improperly
> > implemented completion table which does not ignore . However the
> > question is then if this "passthrough" style is really needed since if
> > you don't ignore the input, it is mostly equivalent to the emacs21 styl=
e.
>
> The "passthrough" (elsewhere called "backend") completion-style is
> definitely something we need to add, yes.  But what it should do is pass
> all the args from `completion-all/try-completions` to the table and let
> the table do *all* the work, i.e. let the completion table implement the
> completion-style methods.  But we shouldn't call `all-completions` or
> `try-completions` for that.  Instead we should call the completion-table
> directly, as is done for the `completion-boundaries` method.
>
>
>         Stefan
>
>

--000000000000af9f1b05c303bd6c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">If it helps, I&#39;ve a working copy of Stefan&#39;s idea=
 over at <a href=3D"http://github.com/joaotavora/sly">github.com/joaotavora=
/sly</a>.<div dir=3D"auto"><br></div><div dir=3D"auto">Indeed it&#39;s call=
ed backend there, and it&#39;s been working fine for some years to let Sly&=
#39;s completion providing backend do the flex or prefix heavy lifting, whi=
le still appearing as a normal completion table to Emacs frontends, such as=
 icomplete, vanilla, company-capf and even Helm.</div><div dir=3D"auto"><br=
></div><div dir=3D"auto">A first approach could be just to copy that over t=
o Emacs minubuffer.el.</div><div dir=3D"auto"><br></div><div dir=3D"auto">J=
o=C3=A3o</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
=3D"gmail_attr">On Sun, May 23, 2021, 16:51 Stefan Monnier &lt;<a href=3D"m=
ailto:monnier@HIDDEN">monnier@HIDDEN</a>&gt; wrote:<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">&gt;&gt; Clearly, this is not right: p=
assthrough completion should pass the `str`<br>
&gt;&gt; and `point` info to the completion table.=C2=A0 The completion tab=
le may opt<br>
&gt;&gt; to ignore that information, but we shouldn&#39;t prevent them from=
 using it.<br>
&gt;&gt; I expect most passthrough uses will want to use `str`.<br>
&gt;<br>
&gt; I see what you mean. In my use case I didn&#39;t use an improperly<br>
&gt; implemented completion table which does not ignore . However the<br>
&gt; question is then if this &quot;passthrough&quot; style is really neede=
d since if<br>
&gt; you don&#39;t ignore the input, it is mostly equivalent to the emacs21=
 style.<br>
<br>
The &quot;passthrough&quot; (elsewhere called &quot;backend&quot;) completi=
on-style is<br>
definitely something we need to add, yes.=C2=A0 But what it should do is pa=
ss<br>
all the args from `completion-all/try-completions` to the table and let<br>
the table do *all* the work, i.e. let the completion table implement the<br=
>
completion-style methods.=C2=A0 But we shouldn&#39;t call `all-completions`=
 or<br>
`try-completions` for that.=C2=A0 Instead we should call the completion-tab=
le<br>
directly, as is done for the `completion-boundaries` method.<br>
<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan<br>
<br>
</blockquote></div>

--000000000000af9f1b05c303bd6c--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Resent-From: Daniel Mendler <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 23 May 2021 19:59:02 +0000
Resent-Message-ID: <handler.48572.B48572.162179992914735 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 48572
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: 48572 <at> debbugs.gnu.org, joaotavora@HIDDEN
Received: via spool by 48572-submit <at> debbugs.gnu.org id=B48572.162179992914735
          (code B ref 48572); Sun, 23 May 2021 19:59:02 +0000
Received: (at 48572) by debbugs.gnu.org; 23 May 2021 19:58:49 +0000
Received: from localhost ([127.0.0.1]:41790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lkuFN-0003pb-Jf
	for submit <at> debbugs.gnu.org; Sun, 23 May 2021 15:58:49 -0400
Received: from server.qxqx.de ([178.63.65.180]:52551 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1lkuFJ-0003pL-Jr
 for 48572 <at> debbugs.gnu.org; Sun, 23 May 2021 15:58:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:
 MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=j1Aj1BkGG4wizLtKFQY3GxSDy+Sft1J1D+RYFleES9c=; b=J9ZIzNdgPInXMATeF9uGngOci5
 YQnicamqoOKfb+QJEnsYn9lnFcwLSMm0cMxqrM4L8vevzk0x3rCjrOrCFj2ezJB/VQ/8zF7TupHET
 9h/YfFqL/+M5MCk2BQPl6IwiejLfToys49xUZDMK83nzNMVt2iILQE3DNMaDxySaAo9w=;
References: <c8b96e0f-fd60-3a6d-19ae-7918d2d5541b@HIDDEN>
 <jwvbl924awi.fsf-monnier+emacs@HIDDEN>
 <2ebf9ed0-bd5d-8107-9d22-61e56f29c02a@HIDDEN>
 <jwvr1hx1mj2.fsf-monnier+emacs@HIDDEN>
From: Daniel Mendler <mail@HIDDEN>
Message-ID: <e7ac1748-a3ff-87d1-fc45-55becd4127d1@HIDDEN>
Date: Sun, 23 May 2021 21:58:35 +0200
MIME-Version: 1.0
In-Reply-To: <jwvr1hx1mj2.fsf-monnier+emacs@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)



On 5/23/21 5:50 PM, Stefan Monnier via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
>>> Clearly, this is not right: passthrough completion should pass the `str`
>>> and `point` info to the completion table.  The completion table may opt
>>> to ignore that information, but we shouldn't prevent them from using it.
>>> I expect most passthrough uses will want to use `str`.
>>
>> I see what you mean. In my use case I didn't use an improperly
>> implemented completion table which does not ignore . However the
>> question is then if this "passthrough" style is really needed since if
>> you don't ignore the input, it is mostly equivalent to the emacs21 style.
> 
> The "passthrough" (elsewhere called "backend") completion-style is
> definitely something we need to add, yes.  But what it should do is pass
> all the args from `completion-all/try-completions` to the table and let
> the table do *all* the work, i.e. let the completion table implement the
> completion-style methods.  But we shouldn't call `all-completions` or
> `try-completions` for that.  Instead we should call the completion-table
> directly, as is done for the `completion-boundaries` method.

But `all-completions` and `try-completion` already calls the table
directly if the table is indeed a table.

Basically `all-completions/try-completion` themselves are already
"passthrough" modulo some calling convention.

Am I missing something?





Last modified: Sun, 23 May 2021 20:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.