From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#13609: 24.2.92; completion-list-insert-choice-function Date: Sun, 3 Feb 2013 09:46:49 -0600 Message-ID: <20750.34409.832682.449021@gargle.gargle.HOWL> References: <87a9rm7kfa.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359906430 5491 80.91.229.3 (3 Feb 2013 15:47:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Feb 2013 15:47:10 +0000 (UTC) Cc: 13609-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 03 16:47:29 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U21my-0004tb-Qi for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2013 16:47:28 +0100 Original-Received: from localhost ([::1]:48927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U21mg-0002xL-Cx for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2013 10:47:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U21mc-0002wL-3l for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 10:47:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U21mY-0002QO-U9 for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 10:47:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U21mY-0002QB-PO for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 10:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U21nW-0003At-5v for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2013 10:48:02 -0500 Resent-From: "Roland Winkler" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Feb 2013 15:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 13609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 13609@debbugs.gnu.org, winkler@gnu.org, winkler@gnu.org Original-Received: via spool by 13609-done@debbugs.gnu.org id=D13609.135990647712192 (code D ref 13609); Sun, 03 Feb 2013 15:48:01 +0000 Original-Received: (at 13609-done) by debbugs.gnu.org; 3 Feb 2013 15:47:57 +0000 Original-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 Original-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 Original-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 In-Reply-To: X-Mailer: VM 8.2 trial under 24.2.92.1 (x86_64-unknown-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70645 Archived-At: 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