From 24906d37e815e7d4968daff5cd713eb4bd27ef62 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Fri, 10 Apr 2026 10:20:05 -0400 Subject: [PATCH] =?UTF-8?q?Add=20header-line=20to=20=CE=BC-compose=20to=20?= =?UTF-8?q?show=20the=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global.org | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/global.org b/global.org index ccd5359..e569601 100644 --- a/global.org +++ b/global.org @@ -1013,7 +1013,27 @@ #+end_src +*** This is an attempt to highlight the current context when composing + #+begin_src emacs-lisp + (add-hook 'mu4e-compose-mode-hook + (defun my-do-compose-stuff () + (setq header-line-format-right '("Context: " + (:eval (mu4e-context-name (mu4e-context-current)))) + header-line-separator + '(:eval (let* ((len-left 0) + (len-right (length (format-mode-line header-line-format-right))) + (len-separator (- (+ (window-width) 2 2 2) (+ len-left len-right)))) + (format (format "%%%ds" len-separator) "")))) + (put 'header-line-format-right 'risky-local-variable t) + (put 'header-line-separator 'risky-local-variable t) + (setq header-line-format '("" header-line-separator + header-line-format-right)))) #+end_src +*** Save attachments with more reasonable permissions + #+begin_src emacs-lisp + (setq mm-attachment-file-modes #o644) + #+end_src + *** Recipient handling Add aliases (i.e. mailing groups) to [[file://~/.mailrc][the .mailrc file]]