From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: Re: BibTeX completion via completion-in-region Date: Sat, 5 Dec 2009 11:45:24 -0600 Message-ID: <19226.39988.288763.3156@regnitz.physics.niu.edu> References: <19225.59404.211849.447292@regnitz.physics.niu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260035247 4211 80.91.229.12 (5 Dec 2009 17:47:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2009 17:47:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 05 18:47:20 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NGyj1-0005NF-Bp for ged-emacs-devel@m.gmane.org; Sat, 05 Dec 2009 18:47:19 +0100 Original-Received: from localhost ([127.0.0.1]:58630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGyj1-0004w7-0F for ged-emacs-devel@m.gmane.org; Sat, 05 Dec 2009 12:47:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGyhL-00049S-89 for emacs-devel@gnu.org; Sat, 05 Dec 2009 12:45:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGyhG-00047A-BN for emacs-devel@gnu.org; Sat, 05 Dec 2009 12:45:34 -0500 Original-Received: from [199.232.76.173] (port=50632 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGyhG-000472-6m for emacs-devel@gnu.org; Sat, 05 Dec 2009 12:45:30 -0500 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]:9624) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGyhG-0000pe-4M for emacs-devel@gnu.org; Sat, 05 Dec 2009 12:45:30 -0500 Original-Received: from regnitz.physics.niu.edu (adsl-68-77-29-3.dsl.emhril.ameritech.net [68.77.29.3]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id E2D8423532; Sat, 5 Dec 2009 18:45:27 +0100 (CET) In-Reply-To: X-Mailer: VM 8.2 trial under 23.1.50.1 (i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118311 Archived-At: On Sat Dec 5 2009 Stefan Monnier wrote: > > - You greatly shortened the code of bibtex-complete-internal by > > calling completion-in-region. The code calling > > bibtex-complete-internal assumes that this function returns the > > completion. This still seems to work, though completion-in-region > > has no documented return value. So I suggest to make the > > completion the documented return value of completion-in-region. > > As you can see in the code, it doesn't return the completion, but yes, > we should document that it returns a boolean. I'll take care of it, no > need for a bug-report. Yet then I am still confused about what is now the proper way to hook into the completion mechanism if one wants to perform some post-completion processing based on the actual value of the completion that was selected by the user. The old BibTeX code achieved this goal in two steps, by hooking into choose-completion-string-functions plus using the return value of bibtex-complete-internal. (Unfortunately, I cannot recall all details anymore under which circumstances one or the other step was needed.) Now bibtex-complete-internal does not return the completion anymore (because of completion-in-region) so that this step doesn't work anymore in the old way. Is this step really not needed anymore (and should be removed from the code)? Is it sufficient now that the post-completion procesing is done inside choose-completion-string-functions? For the other things, I'll submit bug reports. Roland