|
From: | Emanuel Berg |
Subject: | Re: message, can't find basic stuff [Elisp] |
Date: | Sat, 20 Feb 2021 20:04:49 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Better versions: (defun message-set-header (hdr val) (interactive "sheader: \nsvalue: ") (message-position-on-field hdr) (message-beginning-of-header nil) (delete-region (point) (point-at-eol)) (insert val) ) ;; test: ;; (message-set-header "Subject" "Lara loves YOU") (defun message-transpose-headers (hdr1 hdr2) (interactive "sheader 1: \nsheader 2: ") (save-excursion (let ((v1 (or (message-field-value hdr1) "")) (v2 (or (message-field-value hdr2) "")) ) (message-set-header hdr1 v2) (message-set-header hdr2 v1) ))) ;; test: ;; (message-transpose-headers "To" "Subject") -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |