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 12427 invoked from network); 21 Feb 2021 00:36:28 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 21 Feb 2021 00:36:28 -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 1lDcja-003Hhe-PP for ml@inbox.vuxu.org; Sat, 20 Feb 2021 18:36:26 -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 1lDcja-00E0Ao-79 for ml@inbox.vuxu.org; Sat, 20 Feb 2021 18:36:26 -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 1lDcjZ-00E0Ai-8N for ding@lists.math.uh.edu; Sat, 20 Feb 2021 18:36:25 -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 1lDcjX-003BjC-B1 for ding@lists.math.uh.edu; Sat, 20 Feb 2021 18:36:24 -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=QXQPWEd5aDKgw2Gep2KpCxZ9Fxg96wBNkw8NWwjKWvY=; b=VuzsIdH8cd6M875Q20ktDCziFC 5YzDAXWQ5c1YKTZ41XZ6FE6uxdTiIlJXOtVUcRktmhGCsuph0eJ9leOBZN9nZA9seRYScndClPjd3 s2HM1wj0SvinLJ+1cirkjLAib7m15doa0JkbVbXGBcFyUjp/EjCMr3QR0ASaOyTpJZfI=; 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 1lDcjQ-0001N5-HY for ding@gnus.org; Sun, 21 Feb 2021 01:36:19 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lDcjP-0003qx-Br for ding@gnus.org; Sun, 21 Feb 2021 01:36:15 +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: Sun, 21 Feb 2021 01:36:08 +0100 Message-ID: <871rda5kav.fsf@zoho.eu> References: <87k0r3kc70.fsf@mat.ucm.es> <87a6rzmtmw.fsf@zoho.eu> <87blcfghv2.fsf@mat.ucm.es> <87k0r27eao.fsf@zoho.eu> <87ft1qe5qd.fsf@mat.ucm.es> <87mtvye3nn.fsf@dick> <87blce5kub.fsf@zoho.eu> 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:ffaFmXKRpzCX6UhNBqbFimno/q8= Mail-Copies-To: never List-ID: Precedence: bulk > (defun my/message-swap-to-cc () > (interactive) > (when-let ((to (or (message-field-value "To") "")) > (cc (or (message-field-value "Cc") "")) ) > (message-replace-header "To" cc "From") > (message-replace-header "Cc" to "To"))) This also cannot do multiliners and the reason is `message-field-value' which I also used. One could consider that a bug in Emacs. Maybe not the BIGGEST bug. -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal