From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#34776: 27.0.50; Some questions about choose-completion-string-functions Date: Wed, 06 Mar 2019 15:05:29 -0800 Message-ID: <871s3jeh8m.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="146937"; mail-complaints-to="usenet@blaine.gmane.org" To: 34776@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 07 00:06:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1fc3-000c7t-Ni for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Mar 2019 00:06:12 +0100 Original-Received: from localhost ([127.0.0.1]:40892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1fc2-0002R3-AU for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Mar 2019 18:06:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1fbw-0002Qr-KK for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 18:06:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1fbu-00030B-SF for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 18:06:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1fbu-000301-NI for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 18:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h1fbu-0008KM-De for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 18:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Mar 2019 23:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34776 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155191354931988 (code B ref -1); Wed, 06 Mar 2019 23:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Mar 2019 23:05:49 +0000 Original-Received: from localhost ([127.0.0.1]:34794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1fbh-0008Js-AK for submit@debbugs.gnu.org; Wed, 06 Mar 2019 18:05:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1fbe-0008Ja-8j for submit@debbugs.gnu.org; Wed, 06 Mar 2019 18:05:47 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48641) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1fbZ-0002em-6Y for submit@debbugs.gnu.org; Wed, 06 Mar 2019 18:05:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1fbY-0002O5-AY for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 18:05:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1fbX-0002dA-CT for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 18:05:40 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:44446 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1fbW-0002Wj-Nt for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 18:05:39 -0500 Original-Received: from localhost (unknown [207.109.85.82]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id ED2BEFA17C for ; Wed, 6 Mar 2019 23:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ericabrahamsen.net; s=mail; t=1551913531; bh=4DqEMMGJCGp+DJ80j8ipXsAy6pcKy60XZs1DVgbAtBs=; h=From:To:Subject:Date:From; b=MciYWcklr6acEw9rq+dQN/zznuBSS2p5GIeqskxpjDxEqLnhgzXkNM2dLXdA1LUAy K8kDcIS2PS4Pg52zvFSGCEtNEIo8ajgtsIzBxBlIDgModACo+UuPMJbKl4pWJl4BU7 1NHK11FUMz9StK3+M0UaOFsL4aL9J9qTsh5G3C5g= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156110 Archived-At: I'm trying to use `choose-completion-string-functions' to do some "stuff" after the user finishes a completion, and have two questions: 1. The docstring of this variable says it is called with three arguments, but in fact it's called with four: the fourth is passed as nil, and is only there for backward compatibility, apparently. But still, you can't use a function that only accepts three args. I can provide a patch for the docstring if this is correct. 2. The code in `choose-completion-string' behaves as though the above variable is buffer local, but it is never declared to be so. I'm not sure if this is a bug (ie, we should be using `defvar-local'), or whether I should be adding functions here using the (local 'SYMBOL) convention of `add-function'. If that's the case, that's probably also a docstring bug, as we should warn users that they'll want to specify a local variable. WDYT? Eric