From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/76168 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.gnus.general,gmane.emacs.bbdb.user Subject: Re: gcc tab completion strangeness Date: Mon, 31 Jan 2011 16:14:28 -0500 Message-ID: References: <871v4kio15.fsf@micropit.couberia.bzh> <87lj2sbidu.fsf@member.fsf.org> <87pqs4jx2a.fsf@ericabrahamsen.net> <87ipxwwg22.fsf@topper.koldfront.dk> <87sjwa5wod.fsf@topper.koldfront.dk> <87fws8vox6.fsf@topper.koldfront.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296508510 3081 80.91.229.12 (31 Jan 2011 21:15:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 21:15:10 +0000 (UTC) Cc: bbdb-info@lists.sourceforge.net, Tassilo Horn , jidanni@jidanni.org, ding@gnus.org To: asjo@koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) Original-X-From: ding-owner+M24520@lists.math.uh.edu Mon Jan 31 22:15:04 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pk15T-00065G-MF for ding-account@gmane.org; Mon, 31 Jan 2011 22:15:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Pk15L-00021o-9Z; Mon, 31 Jan 2011 15:14:55 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Pk15J-00021a-Nn for ding@lists.math.uh.edu; Mon, 31 Jan 2011 15:14:53 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Pk15I-0002tj-BR for ding@lists.math.uh.edu; Mon, 31 Jan 2011 15:14:53 -0600 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Pk15H-0006FQ-4Q for ding@gnus.org; Mon, 31 Jan 2011 22:14:51 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAKu0Rk1Ld/8K/2dsb2JhbACkeHS9cYVOBIUTj2g X-IronPort-AV: E=Sophos;i="4.60,405,1291611600"; d="scan'208";a="89992976" Original-Received: from 75-119-255-10.dsl.teksavvy.com (HELO ceviche.home) ([75.119.255.10]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 31 Jan 2011 16:14:29 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id AFDE4660DC; Mon, 31 Jan 2011 16:14:28 -0500 (EST) In-Reply-To: <87fws8vox6.fsf@topper.koldfront.dk> ("Adam =?iso-8859-1?Q?Sj?= =?iso-8859-1?Q?=F8gren=22's?= message of "Mon, 31 Jan 2011 20:44:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:76168 gmane.emacs.bbdb.user:2437 Archived-At: >>> I looks quite ugly. >> Yes, I'd rather not hard code that much info about BBDB-internals in >> message.el. Can you try the patch below instead, which should work >> about as well, but without relying on internal knowledge about BBDB? > In my brief testing your patch below works great - thanks for looking > into this! Must have been about as brief as my testing, indeed, since my patch uses != which doesn't exist (it's called /= is Elisp). Stefan ;-) === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/message.el 2011-01-31 15:04:55 +0000 @@ -7867,7 +7867,12 @@ (eudc-expand-inline)) ((and (memq 'bbdb message-expand-name-databases) (fboundp 'bbdb-complete-name)) - (bbdb-complete-name)) + (let ((starttick (buffer-modified-tick))) + (or (bbdb-complete-name) + ;; Apparently, bbdb-complete-name can return nil even when + ;; completion took place. So let's double check the buffer was + ;; not modified. + (/= starttick (buffer-modified-tick))))) (t (expand-abbrev))))