diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-01 22:14:07 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-01 22:14:07 -0400 |
| commit | a007fb21b563ee4f0f9c526b6623bbecaa9ee065 (patch) | |
| tree | 4100eda544d428b2ed912b7a45ad50159619cfdf /modules | |
| parent | 8809ad3e909ff441dfaa3c6b7fe80eaad0bd1e28 (diff) | |
| download | dotemacs-a007fb21b563ee4f0f9c526b6623bbecaa9ee065.tar.gz dotemacs-a007fb21b563ee4f0f9c526b6623bbecaa9ee065.zip | |
fix(mail): drop obsolete image vars, make the remote-image toggle report state
The "block remote images" comment sat on mu4e-view-show-images / mu4e-view-image-max-width, which are obsolete since mu4e 1.7 and ignored by the shr view — the real gate is gnus-blocked-images. The comment now documents the actual policy (remote blocked, embedded inline), and cj/mu4e-toggle-remote-images echoes the effective state after each refresh instead of leaving you to guess what it did.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/mail-config.el | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/modules/mail-config.el b/modules/mail-config.el index 84d5f029..297e70d4 100644 --- a/modules/mail-config.el +++ b/modules/mail-config.el @@ -375,11 +375,13 @@ Prompts user for the action when executing." (setq shr-width 72) ; Set width for HTML rendering (setq shr-bullet "• ") ; Nice bullet points - ;; Block remote images by default (privacy/security) - (with-suppressed-warnings ((obsolete mu4e-view-show-images mu4e-view-image-max-width) - (free-vars mu4e-view-show-images mu4e-view-image-max-width)) - (setq mu4e-view-show-images t) - (setq mu4e-view-image-max-width 800)) + ;; Image policy: remote HTTP images are blocked by default (tracking + ;; pixels) via `gnus-blocked-images' "http" above; embedded/attached + ;; images render inline via `mu4e-show-images'; sizing is governed by + ;; `shr-max-image-proportion'. The per-message override is + ;; `cj/mu4e-toggle-remote-images' below. (The old mu4e-view-show-images / + ;; mu4e-view-image-max-width pair was dropped: obsolete since mu4e 1.7, + ;; ignored by the shr-based view.) ;; ------------------------------- View Actions ------------------------------ ;; define view and article menus @@ -392,14 +394,18 @@ Prompts user for the action when executing." ;; Custom function to toggle remote content and bind it in view mode (defun cj/mu4e-toggle-remote-images () - "Toggle display of remote images in current message." + "Toggle display of remote images in the current message. +Buffer-local, so the override lasts only for this message view. +Echoes the effective state so there's no guessing what a refresh did." (interactive) (require 'mu4e-view) (setq-local gnus-blocked-images (if (equal gnus-blocked-images "http") nil "http")) - (mu4e-view-refresh)) + (mu4e-view-refresh) + (message "Remote images: %s (this message only)" + (if (equal gnus-blocked-images "http") "blocked" "shown"))) ;; first letter is the keybinding (setq mu4e-headers-actions |
