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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9601 invoked from network); 16 Mar 2021 17:27:06 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 16 Mar 2021 17:27:06 -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 1lMDTD-000bWV-O9 for ml@inbox.vuxu.org; Tue, 16 Mar 2021 12:27:03 -0500 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 1lMDTD-001UEG-4F for ml@inbox.vuxu.org; Tue, 16 Mar 2021 12:27:03 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lMDTA-001UE8-Rr for ding@lists.math.uh.edu; Tue, 16 Mar 2021 12:27:00 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lMDT9-000bWA-5N for ding@lists.math.uh.edu; Tue, 16 Mar 2021 12:27:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WoDUml8z0MIQtPuwYOX8G0vjXO8QORMHvSnfSUwSGOs=; b=Y7QFRGpgqnVLnmGYAW1S1S4ibt N/9iKZa01RtCSzVpOy6wquPsU0QoryOAIagopsv29AITIhs5yUwZDQFjPThFsrf/h8XRW6dy7IgD0 Z75ctuNq2F2PIthZ1QoWav6ZIBJpXhNi01p8eTuOM8fw+eTi8FDEk983i8LX3FnEqqns=; Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMDSv-0005d0-W3 for ding@gnus.org; Tue, 16 Mar 2021 18:26:54 +0100 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 52410FA0FB for ; Tue, 16 Mar 2021 17:26:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1615915603; bh=WoDUml8z0MIQtPuwYOX8G0vjXO8QORMHvSnfSUwSGOs=; h=From:To:Subject:References:Date:In-Reply-To:From; b=l6Z59BGQ/4YAE9WyYRcPHZbMqn+Q+nDYFDRR2QBM1V/5BEaMAKJTdpgW59iNGOSQa L2TTGThUPGbari40Yu222NBwIfOzDQ2EOjohoFl0Qsy+1GvJvJR97W7W0vIBt0/3lX eT4ugDgbLTFWqKR6HX8iCVnZvOIqs0Vl2uZghjUU= From: Eric Abrahamsen To: ding@gnus.org Subject: Re: [UTF8 problems] References: <87v99wfbmq.fsf@mat.ucm.es> <87zgz8tckb.fsf@ericabrahamsen.net> <87a6r5h1fx.fsf_-_@mat.ucm.es> <87czw02e9l.fsf@ericabrahamsen.net> <87tupbgwvy.fsf@mat.ucm.es> Date: Tue, 16 Mar 2021 10:26:41 -0700 In-Reply-To: <87tupbgwvy.fsf@mat.ucm.es> (Uwe Brauer's message of "Tue, 16 Mar 2021 12:29:05 +0100") Message-ID: <87y2enrovi.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk Uwe Brauer writes: >>>> "EA" == Eric Abrahamsen writes: > >> Uwe Brauer writes: >>>>>> "EA" == Eric Abrahamsen writes: >>> >>>> Uwe Brauer writes: >>>> Hi >>>> >>>> I know that 'mail-header-from extract information from the from field, >>>> but is there something similar for the CC field. I cannot not find >>>> anything similar. >>> >>>> In general you can use `gnus-fetch-original-field' to get any header you >>>> want, specified as a string. So; >>> >>>> (gnus-fetch-original-field "cc") >>> >>> That works fine for ascii, but I just got that result >>> >>> =?UTF-8?Q?Marta_Gonz=C3=A1lez?= >>> >>> That does not happen for org-capture with %:fromname >>> >>> Any ideas? > >> (mail-decode-encoded-address-string >> (gnus-fetch-original-field "cc")) > >> There are some other `mail-decode-encoded-*' functions for other uses. > > > Thanks but it does not work > > Here it is what I did > > > (defun my-extract-cc () > (interactive) > (mail-decode-encoded-address-string > (gnus-fetch-original-field "cc"))) > ("mg" "Annu:Grupos:Ejercicios" > table-line (file+headline "~/ALLES/HGs/tex/vorlesungen/HGAnnu/Ejercios-Alumnos-Grupos/2021/Ejercios-Teoria21.org" "Exercicios Annu21") > "| | | | | %:fromname|%:fromaddress | %:subject| %(my-extract-cc) |%^{Hoja|1|2|3|4|5|6|7}|%^{Exercicio|1|} | %a|%:date | " :prepend t :empty-lines 1 :unnarrowed t > ) > > > But then I obtained. > > > | | | | | %![Error: (wrong-type-argument stringp nil)] |1|2 | > > > I tried to debug the function but nothing strange happened. I am really > puzzled. Looks like the %(expr) escapes are evaluated in the *Capture* buffer, not the buffer where you started the capture. You might have to do: (defun my-extract-cc () (interactive) (with-current-buffer (org-capture-get :original-buffer) (mail-decode-encoded-address-string (gnus-fetch-original-field "cc"))))