From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14216 invoked from network); 20 Feb 2021 01:10:46 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 20 Feb 2021 01:10:46 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lDGnA-002hJ5-A5 for ml@inbox.vuxu.org; Fri, 19 Feb 2021 19:10:40 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1lDGn9-00DnfS-O0 for ml@inbox.vuxu.org; Fri, 19 Feb 2021 19:10:39 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lDGn7-00DnfD-Ov for ding@lists.math.uh.edu; Fri, 19 Feb 2021 19:10:37 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lDGn5-002bd9-EQ for ding@lists.math.uh.edu; Fri, 19 Feb 2021 19:10:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jnONJAwHuGxMOxJjJCdRZXkAQAcBVAhRWqhuh6pOynQ=; b=AYpPMzHvPd9vB/T5xk+9aFrN1a LbdNaPF+upKyYkysGSG9cC+RZNac6ZriseCVHSEBn9vEzDFLsJh3WgIGjDDxmisrMb1KkPQNiyvW/ bAcjLRm7+qZozBsIl+Ne2IKr12456q+fQNNMvANOSL1Swp1ds3UU0cIw4Y+kOj/HSOE0=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDGmu-0008DM-AI for ding@gnus.org; Sat, 20 Feb 2021 02:10:30 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lDGmt-0004zO-56 for ding@gnus.org; Sat, 20 Feb 2021 02:10:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org To: ding@gnus.org From: Emanuel Berg Subject: Re: how can I convert the To field to CC Date: Sat, 20 Feb 2021 02:10:15 +0100 Message-ID: <87a6rzmtmw.fsf@zoho.eu> References: <87k0r3kc70.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:3lTqMfMJfPw3Ee9qrFFs26KEhxc= Mail-Copies-To: never List-ID: Precedence: bulk Uwe Brauer wrote: > For example I expanded a mail alias that contains a lot of > addresses but I did this in the TO field not in the CC > field. Would be nifty if I could change it on the fly ;; is there really no function like this already? (defun message-set-header (hdr val) (interactive "sheader: \nsvalue: ") ;; check here if there _is_ such a header - how? ;; also a must-have, super-simple building-block from the holster ;; but can't find it either (message-position-on-field hdr) (message-beginning-of-line) (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: ") (let ((v1 (message-field-value hdr1)) (v2 (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