From: Uwe Brauer <oub@mat.ucm.es>
To: ding@gnus.org
Subject: Re: how can I convert the To field to CC
Date: Sun, 21 Feb 2021 10:18:19 +0100 [thread overview]
Message-ID: <8735xpdbj8.fsf@mat.ucm.es> (raw)
In-Reply-To: <87v9am2fjh.fsf@zoho.eu>
[-- Attachment #1: Type: text/plain, Size: 806 bytes --]
> dick.r.chiang wrote:
> Great! I rewrote it a bit to do make it generic.
> Works for all edgy cases so far, that is missing header, empty
> header and multiline value.
> (require 'message)
> (defun message-transpose-headers (hdr1 hdr2)
> (interactive "sheader 1: \nsheader 2: ")
> (save-excursion
> (message-position-on-field hdr1)
> (message-position-on-field hdr2)
> (let ((v1 (or (message-field-value hdr1) ""))
> (v2 (or (message-field-value hdr2) "")) )
> (message-replace-header hdr1 v2 "From" t)
> (message-replace-header hdr2 v1 "To" t)) ))
> ;; test:
> ;; (message-transpose-headers "To" "Subject")
well that was a bit of discussion I missed.
But thanks
That works nice for my use case "To" to "Cc"
Don't you want to send a patch to the dev list?
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
next prev parent reply other threads:[~2021-02-21 9:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 20:57 Uwe Brauer
2021-02-19 21:09 ` Emanuel Berg
2021-02-20 1:10 ` Emanuel Berg
2021-02-20 10:16 ` Uwe Brauer
2021-02-20 19:03 ` Emanuel Berg
2021-02-20 22:27 ` Uwe Brauer
2021-02-20 22:39 ` Emanuel Berg
2021-02-20 10:21 ` Uwe Brauer
2021-02-20 19:02 ` Emanuel Berg
2021-02-20 22:26 ` Uwe Brauer
2021-02-20 22:31 ` Uwe Brauer
2021-02-20 23:10 ` dick.r.chiang
2021-02-21 0:24 ` Emanuel Berg
2021-02-21 0:36 ` Emanuel Berg
2021-02-21 3:03 ` dick.r.chiang
2021-02-21 3:18 ` Emanuel Berg
2021-02-21 4:13 ` dick.r.chiang
2021-02-21 2:55 ` dick.r.chiang
2021-02-21 3:24 ` Emanuel Berg
2021-02-21 4:09 ` dick.r.chiang
2021-02-21 4:47 ` Emanuel Berg
2021-02-21 9:18 ` Uwe Brauer [this message]
2021-02-21 9:36 ` Emanuel Berg
2021-03-01 7:40 ` Uwe Brauer
2021-03-02 2:57 ` Emanuel Berg
2021-03-02 3:38 ` Emanuel Berg
2021-03-01 7:44 ` Uwe Brauer
2021-03-02 2:55 ` Emanuel Berg
2021-05-09 4:45 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735xpdbj8.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).