From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84672 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.gnus.general Subject: PATCH: make it possible to check for gnus-delay-header in message-send-hook Date: Mon, 30 Jun 2014 13:44:53 +0200 Message-ID: <87mwculiyy.fsf@micropit.roche-blanche.homenet.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1404128844 9808 80.91.229.3 (30 Jun 2014 11:47:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Jun 2014 11:47:24 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32915@lists.math.uh.edu Mon Jun 30 13:47:17 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 1X1a3H-0000tk-TU for ding-account@gmane.org; Mon, 30 Jun 2014 13:47:16 +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 1X1a1K-0001IH-OD; Mon, 30 Jun 2014 06:45:14 -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 1X1a1J-0001I8-5S for ding@lists.math.uh.edu; Mon, 30 Jun 2014 06:45:13 -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 1X1a1H-0004Nd-8D for ding@lists.math.uh.edu; Mon, 30 Jun 2014 06:45:12 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1X1a1F-0004ry-1z for ding@gnus.org; Mon, 30 Jun 2014 13:45:09 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X1a1E-0008VW-JI for ding@gnus.org; Mon, 30 Jun 2014 13:45:08 +0200 Original-Received: from arennes-651-1-289-102.w2-11.abo.wanadoo.fr ([2.11.168.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jun 2014 13:45:08 +0200 Original-Received: from pmlists by arennes-651-1-289-102.w2-11.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jun 2014 13:45:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-289-102.w2-11.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:jIkdcXX0FDkwbnXkWsr30WkADls= X-Spam-Score: -0.0 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84672 Archived-At: Hi, Please find here a small patch: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/gnus-delay.el b/lisp/gnus-delay.el index 5432d4d..75b967e 100644 --- a/lisp/gnus-delay.el +++ b/lisp/gnus-delay.el @@ -153,7 +153,7 @@ DELAY is a string, giving the length of the time. Possible values are: (when (gnus-group-entry group) (gnus-activate-group group) (add-hook 'message-send-hook - (lambda () (message-remove-header gnus-delay-header))) + (lambda () (message-remove-header gnus-delay-header)) t) (setq articles (nndraft-articles)) (while (setq article (pop articles)) (gnus-request-head article group) --8<---------------cut here---------------end--------------->8--- This patch makes it possible to check for gnus-delay-header in message-send-hook. This is needed for example, if you want interactive actions in the message-send-hook: --8<---------------cut here---------------start------------->8--- (add-hook 'message-send-hook (lambda () (unless (message-field-value gnus-delay-header) (do-interactive-things-like-spell-checking)))) --8<---------------cut here---------------end--------------->8--- It would be nice, if you could add this to gnus-master. TIA, -- Peter