From unknown Sat Aug 16 20:58:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13609 <13609@debbugs.gnu.org> To: bug#13609 <13609@debbugs.gnu.org> Subject: Status: 24.2.92; completion-list-insert-choice-function Reply-To: bug#13609 <13609@debbugs.gnu.org> Date: Sun, 17 Aug 2025 03:58:31 +0000 retitle 13609 24.2.92; completion-list-insert-choice-function reassign 13609 emacs submitter 13609 "Roland Winkler" severity 13609 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 02 11:26:11 2013 Received: (at submit) by debbugs.gnu.org; 2 Feb 2013 16:26:11 +0000 Received: from localhost ([127.0.0.1]:33065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1fuq-0003TX-Ne for submit@debbugs.gnu.org; Sat, 02 Feb 2013 11:26:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58665) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1fum-0003TL-Rb for submit@debbugs.gnu.org; Sat, 02 Feb 2013 11:26:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1ftr-0001Fa-GX for submit@debbugs.gnu.org; Sat, 02 Feb 2013 11:25:10 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:55951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1ftr-0001FL-CP for submit@debbugs.gnu.org; Sat, 02 Feb 2013 11:25:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1ftn-0006sD-U6 for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2013 11:25:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1ftl-00011S-BM for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2013 11:25:03 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1ftl-00011O-9F for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2013 11:25:01 -0500 Received: from adsl-68-77-17-140.dsl.emhril.ameritech.net ([68.77.17.140]:35349 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1U1ftj-00040B-I8 for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2013 11:24:59 -0500 Date: Sat, 02 Feb 2013 10:24:57 -0600 Message-Id: <87a9rm7kfa.fsf@gnu.org> From: "Roland Winkler" To: bug-gnu-emacs@gnu.org Subject: 24.2.92; completion-list-insert-choice-function X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) The default value of completion-list-insert-choice-function is completion--replace. The `--' in the name of completion--replace suggests to me that this is an internal function other code should not rely on. Yet isn't it a common scenario to bind completion-list-insert-choice-function to a function which calls completion--replace, plus it does something else? (This is what bbdb-complete-mail does in BBDB v3.) So I suggest to rename completion--replace to completion-replace to make it clear that other code may use this function. (Or solve this problem in some other way that other code may rely upon.) In GNU Emacs 24.2.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2013-01-10 on regnitz Windowing system distributor `The X.Org Foundation', version 11.0.10706000 System Description: Ubuntu 10.04.4 LTS From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 03 08:52:41 2013 Received: (at 13609) by debbugs.gnu.org; 3 Feb 2013 13:52:41 +0000 Received: from localhost ([127.0.0.1]:33768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1zzt-0000Qo-6M for submit@debbugs.gnu.org; Sun, 03 Feb 2013 08:52:41 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:39928) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1zzr-0000Qh-Qr for 13609@debbugs.gnu.org; Sun, 03 Feb 2013 08:52:40 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpZnt/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFFpZnt/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="323881" Received: from 69-165-153-237.dsl.teksavvy.com (HELO pastel.home) ([69.165.153.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Feb 2013 08:51:39 -0500 Received: by pastel.home (Postfix, from userid 20848) id 68FE159527; Sun, 3 Feb 2013 08:51:39 -0500 (EST) From: Stefan Monnier To: "Roland Winkler" Subject: Re: bug#13609: 24.2.92; completion-list-insert-choice-function Message-ID: References: <87a9rm7kfa.fsf@gnu.org> Date: Sun, 03 Feb 2013 08:51:39 -0500 In-Reply-To: <87a9rm7kfa.fsf@gnu.org> (Roland Winkler's message of "Sat, 02 Feb 2013 10:24:57 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13609 Cc: 13609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > So I suggest to rename completion--replace to completion-replace > to make it clear that other code may use this function. No, because some other package may already have changed completion-list-insert-choice-function, so you should really read the current value of completion-list-insert-choice-function, and then call that (via `funcall') rather than hard-coding completion--replace. > (Or solve this problem in some other way that other code may rely upon.) As a matter of fact there's a new feature in trunk that does just that: `add-function'. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 03 10:47:57 2013 Received: (at 13609-done) by debbugs.gnu.org; 3 Feb 2013 15:47:57 +0000 Received: from localhost ([127.0.0.1]:34421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U21nQ-0003Aa-Nx for submit@debbugs.gnu.org; Sun, 03 Feb 2013 10:47:57 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:48871) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U21nN-0003AR-9W for 13609-done@debbugs.gnu.org; Sun, 03 Feb 2013 10:47:54 -0500 Received: from adsl-68-77-17-140.dsl.emhril.ameritech.net ([68.77.17.140]:37802 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1U21mO-0003Dr-HA; Sun, 03 Feb 2013 10:46:53 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20750.34409.832682.449021@gargle.gargle.HOWL> Date: Sun, 3 Feb 2013 09:46:49 -0600 From: "Roland Winkler" To: Stefan Monnier Subject: Re: bug#13609: 24.2.92; completion-list-insert-choice-function In-Reply-To: References: <87a9rm7kfa.fsf@gnu.org> X-Mailer: VM 8.2 trial under 24.2.92.1 (x86_64-unknown-linux-gnu) X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13609-done Cc: 13609-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On Sun Feb 3 2013 Stefan Monnier wrote: > > So I suggest to rename completion--replace to completion-replace > > to make it clear that other code may use this function. > > No, because some other package may already have changed > completion-list-insert-choice-function, so you should really read the > current value of completion-list-insert-choice-function, and then call > that (via `funcall') rather than hard-coding completion--replace. Thank you, that makes sense, it solves my problem. Possibly, such a strategy could even be mentioned in the docstring of completion-list-insert-choice-function. How about adding the following sentences? If you want to bind this variable to a function calling the default value of this variable as part of its job, do not hard-code this value in your code as it may change in future versions of Emacs. Instead, read the current value of completion-list-insert-choice-function, then call that via `funcall'. Of course, this is a generic issue with any foo-function variables that come with a default. Merely, I do not know where to put such a more generic remark into the elisp manual so that you find it when you need it. > > (Or solve this problem in some other way that other code may rely upon.) > > As a matter of fact there's a new feature in trunk that does just that: > `add-function'. Great, though I'll keep this for future versions of BBDB. Right now I want to keep BBDB 3 compatible with GNU Emacs 23 and 24. (Sometimes this is hard when you have to ignore cool new stuff...) Roland From unknown Sat Aug 16 20:58:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 04 Mar 2013 12:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator