Subject: [PATCH 3/3 v2] Re: 30.1; mml: Produce Unobtrusive Signatures

From: Daniel Kahn Gillmor <[email-masked]>
Date: Tue, 20 May 2025 14:47:00 -0400

Attached is a revised version of patch 3, which corrects the default
keybindings.

        --dkg

From a5de7ee57e1933a0783c8346db52c569074c07f7 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <[email-masked]>
Date: Thu, 15 May 2025 22:03:25 -0400
Subject: [PATCH] mml: Add C-c RET s u to make Unobtrusive Signature

This adds to the default keymap to make it relatively easy to make an
Unobtrusive Signature when sending mail.

Unobtrusive Signatures are defined on a per-message basis, and
explicitly ignored per-part, so we do not facilitate part-based signing.

Signed-off-by: Daniel Kahn Gillmor <[email-masked]>
---
 lisp/gnus/mml-sec.el | 5 +++++
 lisp/gnus/mml.el     | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index 6fb82836e9a..71913c8e8cc 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -399,6 +399,11 @@ Use METHOD if given.  Else use `mml-secure-method' or
    (or method mml-secure-method mml-default-sign-method)
    'encrypt))
 
+(defun mml-secure-message-sign-unobtrusive ()
+  "Add MML tag to encrypt/sign the entire message."
+  (interactive nil mml-mode)
+  (mml-secure-message "unobtrusive" 'sign))
+
 (defun mml-secure-message-sign-smime ()
   "Add MML tag to encrypt/sign the entire message."
   (interactive nil mml-mode)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 11a8de7c011..52c9c63833a 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1178,7 +1178,8 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
     "s" (define-keymap
           "p" #'mml-secure-message-sign-pgpmime
           "o" #'mml-secure-message-sign-pgp
-          "s" #'mml-secure-message-sign-smime)
+          "s" #'mml-secure-message-sign-smime
+          "u" #'mml-secure-message-sign-unobtrusive)
     "S" (define-keymap
           "p" #'mml-secure-sign-pgpmime
           "o" #'mml-secure-sign-pgp
-- 
2.47.2