unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ivan Kanis <ivan.kanis@googlemail.com>
Cc: 9158@debbugs.gnu.org
Subject: bug#9158: 24.0.50; Regression in e-mail heade completion
Date: Fri, 21 Oct 2011 18:57:04 -0400	[thread overview]
Message-ID: <jwv1uu6c6n6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87wrdt4txa.fsf@kanis.fr> (Ivan Kanis's message of "Wed, 31 Aug 2011 15:00:49 +0200")

>>> I get the message "completion for "foo" unfound" which is fine. The bug
>>> is that the cursor moves forward several spaces.  Apparently
>>> indent-relative gets called when it shouldn't.
>>> I expected the cursor to remain at the end of the entry that did not
>>> match.  It worked fine on 23.3.
>> The way the new code works can't handle this correctly because the BBDB
>> code doesn't indicate that something happened: it just always returns nil
>> whether something was done or not.
>> The new BBDB-3 has fixed this, AFAIK, so you may want to try that out.
> I have just installed bbdb 3.  It doesn't fix it.  I'll reopen the bug
> because it's a regression.

After looking into it some more, I realized that it's actually behaving
as designed, but not as documented in the docstring.

Could you try the patch below?


        Stefan


=== modified file 'lisp/gnus/message.el'
--- lisp/gnus/message.el	2011-10-11 13:02:03 +0000
+++ lisp/gnus/message.el	2011-10-21 22:54:20 +0000
@@ -7892,7 +7892,11 @@
 		(let ((mail-abbrev-mode-regexp (caar alist)))
 		  (not (mail-abbrev-in-expansion-header-p))))
       (setq alist (cdr alist)))
-    (cdar alist)))
+    (when (cdar alist)
+      (lexical-let ((fun (cdar alist)))
+        ;; Even if completion fails, return a non-nil value, so as to avoid
+        ;; falling back to message-tab-body-function.
+        (lambda () (funcall fun) 'completion-attempted)))))
 
 (defun message-debbugs-completion ()
   (save-excursion






  reply	other threads:[~2011-10-21 22:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 16:49 bug#9158: 24.0.50; Regression in e-mail heade completion Ivan Kanis
2011-08-22 21:22 ` Stefan Monnier
2011-08-31 13:00   ` Ivan Kanis
2011-10-21 22:57     ` Stefan Monnier [this message]
2011-10-26 17:28       ` Stefan Monnier
2011-11-03 10:05       ` Ivan Kanis

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv1uu6c6n6.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=9158@debbugs.gnu.org \
    --cc=ivan.kanis@googlemail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).