unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* message.el and mml-secure-bcc-is-safe
@ 2017-01-07 11:43 Yuri D'Elia
  2017-01-21 16:34 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Yuri D'Elia @ 2017-01-07 11:43 UTC (permalink / raw)
  To: emacs-devel

I'd like to manipulate the mml tags on the message inside the
'message-send-hook depending on the recipient.

By reading though message.el, this seems to be possible as the hook is
ran early enough.

However, I notice that (mml-secure-bcc-is-safe) is called before the
hook. If I plan to modify the tags, it actually makes sense to run it
just afterwards instead so that it checks the final headers and tags.

Could we move (mml-secure-bcc-is-safe) just after the hook?
It makes more sense to me, unless there's some specific reason to do so.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: message.el and mml-secure-bcc-is-safe
  2017-01-07 11:43 message.el and mml-secure-bcc-is-safe Yuri D'Elia
@ 2017-01-21 16:34 ` Lars Ingebrigtsen
  2017-01-22 13:44   ` Jens Lechtenboerger
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-21 16:34 UTC (permalink / raw)
  To: Yuri D'Elia; +Cc: Jens Lechtenboerger, emacs-devel

Yuri D'Elia <wavexx@thregr.org> writes:

> I'd like to manipulate the mml tags on the message inside the
> 'message-send-hook depending on the recipient.
>
> By reading though message.el, this seems to be possible as the hook is
> ran early enough.
>
> However, I notice that (mml-secure-bcc-is-safe) is called before the
> hook. If I plan to modify the tags, it actually makes sense to run it
> just afterwards instead so that it checks the final headers and tags.
>
> Could we move (mml-secure-bcc-is-safe) just after the hook?
> It makes more sense to me, unless there's some specific reason to do so.

I'm not sure...  there might be subtleties there...  I've added Jens to
the Cc; he added the code so he might have an opinion.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: message.el and mml-secure-bcc-is-safe
  2017-01-21 16:34 ` Lars Ingebrigtsen
@ 2017-01-22 13:44   ` Jens Lechtenboerger
  2017-01-25 17:02     ` Yuri D'Elia
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Lechtenboerger @ 2017-01-22 13:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Yuri D'Elia, emacs-devel

On 2017-01-21, at 17:34, Lars Ingebrigtsen wrote:

> Yuri D'Elia <wavexx@thregr.org> writes:
>
>> I'd like to manipulate the mml tags on the message inside the
>> 'message-send-hook depending on the recipient.
>>
>> By reading though message.el, this seems to be possible as the hook is
>> ran early enough.
>>
>> However, I notice that (mml-secure-bcc-is-safe) is called before the
>> hook. If I plan to modify the tags, it actually makes sense to run it
>> just afterwards instead so that it checks the final headers and tags.
>>
>> Could we move (mml-secure-bcc-is-safe) just after the hook?
>> It makes more sense to me, unless there's some specific reason to do so.
>
> I'm not sure...  there might be subtleties there...  I've added Jens to
> the Cc; he added the code so he might have an opinion.

There was no particular reason for adding the bcc-check before
executing that hook.  Feel free to exchange their order.

Best wishes
Jens



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: message.el and mml-secure-bcc-is-safe
  2017-01-22 13:44   ` Jens Lechtenboerger
@ 2017-01-25 17:02     ` Yuri D'Elia
  2017-01-25 17:16       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Yuri D'Elia @ 2017-01-25 17:02 UTC (permalink / raw)
  To: emacs-devel

On Sun, Jan 22 2017, Jens Lechtenboerger wrote:
>> I'm not sure...  there might be subtleties there...  I've added Jens to
>> the Cc; he added the code so he might have an opinion.
>
> There was no particular reason for adding the bcc-check before
> executing that hook.  Feel free to exchange their order.

Lars, are you going to commit this change, or should I prep a patch?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: message.el and mml-secure-bcc-is-safe
  2017-01-25 17:02     ` Yuri D'Elia
@ 2017-01-25 17:16       ` Lars Ingebrigtsen
  2017-01-27 14:37         ` [PATCH] Run 'mml-secure-bcc-is-safe after 'message-send-hook Yuri D'Elia
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-25 17:16 UTC (permalink / raw)
  To: Yuri D'Elia; +Cc: emacs-devel

Yuri D'Elia <wavexx@thregr.org> writes:

> On Sun, Jan 22 2017, Jens Lechtenboerger wrote:
>>> I'm not sure...  there might be subtleties there...  I've added Jens to
>>> the Cc; he added the code so he might have an opinion.
>>
>> There was no particular reason for adding the bcc-check before
>> executing that hook.  Feel free to exchange their order.
>
> Lars, are you going to commit this change, or should I prep a patch?

Please prep a patch.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] Run 'mml-secure-bcc-is-safe after 'message-send-hook
  2017-01-25 17:16       ` Lars Ingebrigtsen
@ 2017-01-27 14:37         ` Yuri D'Elia
  2017-01-28 14:21           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Yuri D'Elia @ 2017-01-27 14:37 UTC (permalink / raw)
  To: emacs-devel

If the hook modifies the message (mml tags or headers), we should check bcc on
the final message, not on the original.
---
 lisp/gnus/message.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 4f08b0b272..ce0dad9cb0 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4119,8 +4119,8 @@ It should typically alter the sending method in some way or other."
   (let ((inhibit-read-only t))
     (put-text-property (point-min) (point-max) 'read-only nil))
   (message-fix-before-sending)
-  (mml-secure-bcc-is-safe)
   (run-hooks 'message-send-hook)
+  (mml-secure-bcc-is-safe)
   (when message-confirm-send
     (or (y-or-n-p "Send message? ")
 	(keyboard-quit)))
-- 
2.11.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Run 'mml-secure-bcc-is-safe after 'message-send-hook
  2017-01-27 14:37         ` [PATCH] Run 'mml-secure-bcc-is-safe after 'message-send-hook Yuri D'Elia
@ 2017-01-28 14:21           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-28 14:21 UTC (permalink / raw)
  To: Yuri D'Elia; +Cc: emacs-devel

Yuri D'Elia <wavexx@thregr.org> writes:

> If the hook modifies the message (mml tags or headers), we should
> check bcc on the final message, not on the original.

Thanks; applied.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-28 14:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07 11:43 message.el and mml-secure-bcc-is-safe Yuri D'Elia
2017-01-21 16:34 ` Lars Ingebrigtsen
2017-01-22 13:44   ` Jens Lechtenboerger
2017-01-25 17:02     ` Yuri D'Elia
2017-01-25 17:16       ` Lars Ingebrigtsen
2017-01-27 14:37         ` [PATCH] Run 'mml-secure-bcc-is-safe after 'message-send-hook Yuri D'Elia
2017-01-28 14:21           ` Lars Ingebrigtsen

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