summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2025-03-12 06:36:21 -0300
committerDavid Bremner <david@tethera.net>2025-03-14 08:51:02 -0300
commitdf4c1b5be769effb2ef7bc85c8bb8e09fb8f43fc (patch)
tree10bcc3a142eb6ba25862e3b4e86772d7d990a102
parent5802f5d6269172222a6fccf5908eae833014917b (diff)
Set 'untrusted-content' to t in all modes
Instead of trying to guess in which modes this is safe not to set in, let's just set it in all of them. Background (added by db): untrusted-content was added in Emacs 29.3 and is currently set by Gnus and used by org-mode to prevent certain unsafe operations. I think the intent is to use it for blocking more unsafe operations in the future.
-rw-r--r--emacs/notmuch-hello.el4
-rw-r--r--emacs/notmuch-mua.el4
-rw-r--r--emacs/notmuch-show.el2
-rw-r--r--emacs/notmuch-tree.el2
-rw-r--r--emacs/notmuch.el2
5 files changed, 12 insertions, 2 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 15ba7c78..67c805a8 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -760,7 +760,9 @@ The screen may be customized via `\\[customize]'.
Complete list of currently available key bindings:
\\{notmuch-hello-mode-map}"
- (setq notmuch-buffer-refresh-function #'notmuch-hello-update))
+ (setq notmuch-buffer-refresh-function #'notmuch-hello-update)
+ (when (boundp 'untrusted-content)
+ (setq untrusted-content t)))
;;; Inserters
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index a75b0f5c..74c62aaf 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -379,7 +379,9 @@ Typically this is added to `notmuch-mua-send-hook'."
(define-derived-mode notmuch-message-mode message-mode "Message[Notmuch]"
"Notmuch message composition mode. Mostly like `message-mode'."
- (notmuch-address-setup))
+ (notmuch-address-setup)
+ (when (boundp 'untrusted-content)
+ (setq untrusted-content t)))
(put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 921c0ef1..8a8e6a7b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1696,6 +1696,8 @@ All currently available key bindings:
(setq notmuch-buffer-refresh-function #'notmuch-show-refresh-view)
(setq buffer-read-only t)
(setq truncate-lines t)
+ (when (boundp 'untrusted-content)
+ (setq untrusted-content t))
(setq imenu-prev-index-position-function
#'notmuch-show-imenu-prev-index-position-function)
(setq imenu-extract-index-name-function
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 301ffd6e..aa0d92a7 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -1095,6 +1095,8 @@ Complete list of currently available key bindings:
(hl-line-mode 1))
(setq buffer-read-only t)
(setq truncate-lines t)
+ (when (boundp 'untrusted-content)
+ (setq untrusted-content t))
(when notmuch-tree-outline-enabled (notmuch-tree-outline-mode 1)))
(defvar notmuch-tree-process-exit-functions nil
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 5477bf4a..29b2a9ed 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -416,6 +416,8 @@ Complete list of currently available key bindings:
(add-to-invisibility-spec (cons 'ellipsis t))
(setq truncate-lines t)
(setq buffer-read-only t)
+ (when (boundp 'untrusted-content)
+ (setq untrusted-content t))
(setq imenu-prev-index-position-function
#'notmuch-search-imenu-prev-index-position-function)
(setq imenu-extract-index-name-function