* how to add a specific word at beginning Subject line (Subject already exists) @ 2022-01-20 22:08 Uwe Brauer 2022-01-21 0:02 ` Emanuel Berg 0 siblings, 1 reply; 3+ messages in thread From: Uwe Brauer @ 2022-01-20 22:08 UTC (permalink / raw) To: ding 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to add a specific word at beginning Subject line (Subject already exists) 2022-01-20 22:08 how to add a specific word at beginning Subject line (Subject already exists) Uwe Brauer @ 2022-01-21 0:02 ` Emanuel Berg 2022-01-21 7:08 ` Uwe Brauer 0 siblings, 1 reply; 3+ messages in thread From: Emanuel Berg @ 2022-01-21 0:02 UTC (permalink / raw) To: ding 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to add a specific word at beginning Subject line (Subject already exists) 2022-01-21 0:02 ` Emanuel Berg @ 2022-01-21 7:08 ` Uwe Brauer 0 siblings, 0 replies; 3+ messages in thread From: Uwe Brauer @ 2022-01-21 7:08 UTC (permalink / raw) To: ding [-- 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 --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-21 7:09 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-01-20 22:08 how to add a specific word at beginning Subject line (Subject already exists) Uwe Brauer 2022-01-21 0:02 ` Emanuel Berg 2022-01-21 7:08 ` Uwe Brauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).