From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84598 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-delay-send-queue should not run message-send-hook Date: Tue, 10 Jun 2014 13:37:54 +0200 Message-ID: <87wqcp3sh9.fsf@micropit.roche-blanche.homenet.org> References: <87ppiza0bg.fsf@micropit.roche-blanche.homenet.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1402400350 19228 80.91.229.3 (10 Jun 2014 11:39:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2014 11:39:10 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32843@lists.math.uh.edu Tue Jun 10 13:39:02 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WuKOJ-0003af-Oa for ding-account@gmane.org; Tue, 10 Jun 2014 13:39:00 +0200 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 1WuKNc-0004Wm-T2; Tue, 10 Jun 2014 06:38:16 -0500 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 1WuKNb-0004Wd-Ow for ding@lists.math.uh.edu; Tue, 10 Jun 2014 06:38:15 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1WuKNa-00023d-9b for ding@lists.math.uh.edu; Tue, 10 Jun 2014 06:38:15 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1WuKNX-00021N-Uf for ding@gnus.org; Tue, 10 Jun 2014 13:38:11 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WuKNX-0002uJ-CX for ding@gnus.org; Tue, 10 Jun 2014 13:38:11 +0200 Original-Received: from arennes-651-1-364-33.w2-14.abo.wanadoo.fr ([2.14.203.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jun 2014 13:38:11 +0200 Original-Received: from pmlists by arennes-651-1-364-33.w2-14.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jun 2014 13:38:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-364-33.w2-14.abo.wanadoo.fr User-Agent: Gnus/5.130012 (=?utf-8?Q?=E7=9C=9F?= Gnus v0.12) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:qIB3GlhfBTzXiTOl4jVBz7Zw/HI= X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84598 Archived-At: On Tue, May 27 2014, Peter Münster wrote: > IMO, `gnus-delay-send-queue' should not run `message-send-hook,' because > `gnus-delay-article' does it already, and sometimes, there can be > interactive commands in this hook, that needs user interaction. > > Do you agree? And if yes, what could be done to suppress the second > execution of `message-send-hook'? Hi, Since there is no feedback, I'm looking for a workaround: --8<---------------cut here---------------start------------->8--- (defun pm/message-send () (unless (message-field-value gnus-delay-header) (do-interactive-things-like-spell-checking))) (add-hook 'message-send-hook 'pm/message-send) --8<---------------cut here---------------end--------------->8--- But this does not work, because the `gnus-delay-header' is removed just before this function. Could you please make use of the `append' argument to `add-hook' in function `gnus-delay-send-queue' (line 156 in gnus-delay.el), like this: --8<---------------cut here---------------start------------->8--- (when (gnus-group-entry group) (gnus-activate-group group) (add-hook 'message-send-hook (lambda () (message-remove-header gnus-delay-header)) t) (setq articles (nndraft-articles)) --8<---------------cut here---------------end--------------->8--- Then, there would be no more problem. TIA, -- Peter