Hi I have a function, most likely based on ancient code (based on 2.35) that inserts a word or expression in the subject line, according to a special field in the BBDB entry. That code works nicely, however if I use it to reply to a message, that already has a subject then that expression is added at the end of the subject line not at the beginning. The relevant code is the line (message-carefully-insert-headers (list (cons 'Subject signame))) So cons seems her the culprit. Any idea how to modify the line above to have the expression inserted always at the beginning? I had a look at message-change-subject. That function however is rather complicated. So if somebody comes up with a simple solution I would appreciate it Thanks Uwe Brauer
Uwe Brauer wrote: > That code works nicely, however if I use it to reply to > a message, that already has a subject then that expression > is added at the end of the subject line not at > the beginning. > > The relevant code is the line > (message-carefully-insert-headers (list (cons 'Subject > signame))) > > So cons seems her the culprit. Any idea how to modify the > line above to have the expression inserted always at > the beginning? (defun message-insert-subject-first (word) (interactive "sword: ") (when word (message-goto-subject) (message-beginning-of-line) (insert word) )) -- underground experts united https://dataswamp.org/~incal
[-- Attachment #1: Type: text/plain, Size: 208 bytes --] > Uwe Brauer wrote: > (defun message-insert-subject-first (word) > (interactive "sword: ") > (when word > (message-goto-subject) > (message-beginning-of-line) > (insert word) )) Ok, thanks [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5673 bytes --]