From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80549 Path: news.gmane.org!not-for-mail From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Newsgroups: gmane.emacs.gnus.general Subject: advising gnus-summary-resend-message, the clean way Date: Mon, 07 Nov 2011 22:53:40 +0100 Message-ID: <871utj8uqj.fsf@micropit.couberia.bzh> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1320702881 5601 80.91.229.12 (7 Nov 2011 21:54:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2011 21:54:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28832@lists.math.uh.edu Mon Nov 07 22:54:37 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 1RNX9H-0003Xn-Hr for ding-account@gmane.org; Mon, 07 Nov 2011 22:54:35 +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 1RNX8k-0005v0-4W; Mon, 07 Nov 2011 15:54:02 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RNX8i-0005ui-9U for ding@lists.math.uh.edu; Mon, 07 Nov 2011 15:54:00 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RNX8h-0006dE-95 for ding@lists.math.uh.edu; Mon, 07 Nov 2011 15:54:00 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RNX8e-0004ZB-6p for ding@gnus.org; Mon, 07 Nov 2011 22:53:56 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RNX8d-0003D7-CL for ding@gnus.org; Mon, 07 Nov 2011 22:53:55 +0100 Original-Received: from arennes-359-1-216-137.w2-2.abo.wanadoo.fr ([2.2.79.137]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Nov 2011 22:53:55 +0100 Original-Received: from pmlists by arennes-359-1-216-137.w2-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Nov 2011 22:53:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: arennes-359-1-216-137.w2-2.abo.wanadoo.fr User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) Cancel-Lock: sha1:7ojG2x3tmuG1F6Sh8FE6PiRYnmY= X-Spam-Score: -6.1 (------) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80549 Archived-At: Hello, I want to use bbdb completion, even in the mini-buffer, so my first idea[1] was, to advise gnus-summary-resend-message: --8<---------------cut here---------------start------------->8--- (defadvice gnus-summary-resend-message (around pm/resend-with-bbdb activate) "Resend message with bbdb address completion." (flet ((message-read-from-minibuffer (p &optional d) (bbdb-completing-read-mails p d))) ad-do-it)) --8<---------------cut here---------------end--------------->8--- But it does not work, I think it's because `message-read-from-minibuffer' is called from the `interactive' form. Redefining `message-read-from-minibuffer' works well: --8<---------------cut here---------------start------------->8--- (defun message-read-from-minibuffer (prompt &optional initial-contents) (bbdb-completing-read-mails prompt initial-contents)) --8<---------------cut here---------------end--------------->8--- But it does not seem clean to me: when there will be other usages of message-read-from-minibuffer in future gnus versions, this redefinition could break things. For now, it works for me, but I would like to know, how it should be done the clean way. [1]: Eric Abrahamsen gave me some hints. -- Peter