From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: BibTeX completion via completion-in-region Date: Sat, 05 Dec 2009 11:08:27 -0500 Message-ID: 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 X-Trace: ger.gmane.org 1260029327 20325 80.91.229.12 (5 Dec 2009 16:08:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2009 16:08:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Roland Winkler" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 05 17:08:40 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 1NGxBX-0003Q2-Dr for ged-emacs-devel@m.gmane.org; Sat, 05 Dec 2009 17:08:39 +0100 Original-Received: from localhost ([127.0.0.1]:50318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGxBX-0003KQ-29 for ged-emacs-devel@m.gmane.org; Sat, 05 Dec 2009 11:08:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGxBQ-0003JM-Rn for emacs-devel@gnu.org; Sat, 05 Dec 2009 11:08:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGxBM-0003I3-Vo for emacs-devel@gnu.org; Sat, 05 Dec 2009 11:08:32 -0500 Original-Received: from [199.232.76.173] (port=49304 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGxBM-0003I0-Pk for emacs-devel@gnu.org; Sat, 05 Dec 2009 11:08:28 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:59594 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGxBM-0002zb-Nf for emacs-devel@gnu.org; Sat, 05 Dec 2009 11:08:28 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4EAHgUGktFpZ7i/2dsb2JhbACBTNNVhDMEih4 X-IronPort-AV: E=Sophos;i="4.47,347,1257138000"; d="scan'208";a="50750008" Original-Received: from 69-165-158-226.dsl.teksavvy.com (HELO pastel.home) ([69.165.158.226]) by ironport2-out.pppoe.ca with ESMTP; 05 Dec 2009 11:08:27 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 5FB7D80B1; Sat, 5 Dec 2009 11:08:27 -0500 (EST) In-Reply-To: <19225.59404.211849.447292@regnitz.physics.niu.edu> (Roland Winkler's message of "Fri, 4 Dec 2009 22:56:44 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:118305 Archived-At: >>>>> "Roland" == Roland Winkler > - 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.) That would be a bug, indeed. Please report it. > - 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. > - 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. That's a problem, indeed. Please bug-report it. Stefan