Gnus development mailing list
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: asjo@koldfront.dk (Adam Sjøgren)
Cc: bbdb-info@lists.sourceforge.net,
	 Tassilo Horn <tassilo@member.fsf.org>,
	 jidanni@jidanni.org,  ding@gnus.org
Subject: Re: gcc tab completion strangeness
Date: Mon, 31 Jan 2011 16:14:28 -0500	[thread overview]
Message-ID: <jwv62t47qh5.fsf-monnier+emacs@gnu.org> (raw)
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")

>>> 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))))
 



  reply	other threads:[~2011-01-31 21:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 18:58 Peter Münster
2011-01-10 20:42 ` Tassilo Horn
2011-01-10 20:58   ` Eric Abrahamsen
2011-01-10 22:27     ` Adam Sjøgren
2011-01-30 13:49       ` Adam Sjøgren
2011-01-31  2:18         ` Lars Ingebrigtsen
2011-01-31 21:47           ` Adam Sjøgren
     [not found]         ` <jwvlj21azom.fsf-monnier+emacs@gnu.org>
2011-01-31 19:44           ` Adam Sjøgren
2011-01-31 21:14             ` Stefan Monnier [this message]
2011-01-31 21:42               ` Adam Sjøgren
2011-02-01 14:09                 ` Stefan Monnier
2011-02-01  1:24               ` Lars Ingebrigtsen
2011-02-01 15:54                 ` Stefan Monnier
2011-01-11  8:26 ` Gijs Hillenius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv62t47qh5.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=asjo@koldfront.dk \
    --cc=bbdb-info@lists.sourceforge.net \
    --cc=ding@gnus.org \
    --cc=jidanni@jidanni.org \
    --cc=tassilo@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).