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: BibTeX completion via completion-in-region Date: Fri, 4 Dec 2009 22:56:44 -0600 Message-ID: <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 1259989031 29191 80.91.229.12 (5 Dec 2009 04:57:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2009 04:57:11 +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 05:57:04 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 1NGmhc-00087u-H7 for ged-emacs-devel@m.gmane.org; Sat, 05 Dec 2009 05:57:04 +0100 Original-Received: from localhost ([127.0.0.1]:52578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGmhc-00077H-C0 for ged-emacs-devel@m.gmane.org; Fri, 04 Dec 2009 23:57:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGmhU-00073b-Gc for emacs-devel@gnu.org; Fri, 04 Dec 2009 23:56:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGmhP-0006wS-3i for emacs-devel@gnu.org; Fri, 04 Dec 2009 23:56:55 -0500 Original-Received: from [199.232.76.173] (port=39211 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGmhO-0006w7-VN for emacs-devel@gnu.org; Fri, 04 Dec 2009 23:56:51 -0500 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]:3543) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGmhO-0005LT-Rs for emacs-devel@gnu.org; Fri, 04 Dec 2009 23:56:51 -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 C0D3323532; Sat, 5 Dec 2009 05:56:46 +0100 (CET) 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:118289 Archived-At: Hi Stefan I noticed that you updated the completion code of BibTeX mode. Three things: - Suppose I want to complete the BibTeX string "AB". So I hit TAB while point is past the "AB". This gives me a buffer displaying possible completions, for example, "ABC" and "ABD". Then I select "ABC". This will insert the complete string "ABC" so that I get the awkward result "ABABC". I do not know whether this is related to the fact that completion-ignore-case is t in that case. (Maybe this is a known problem. There are some comments of that kind in minibuffer.el.) - 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. - The return value of bibtex-complete-internal is used by bibtex-complete-string-cleanup which displays the expansion of the BibTeX string. Yet now this message can be hidden by the `Sole completion' message issued by minibuffer-complete. Here I am actually not sure what would be the best solution. I like the message that tells me the expansion of the BibTeX string (I cannot and will never be able to remember their meanings...). But I also understand that a "Sole completion' message can be helpful. And I know for sure that I am annoyed when one of these message is delayed by the other. If you prefer, I can submit proper bug reports for these things. Roland