From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from mx1.math.uh.edu (mx1.math.uh.edu [129.7.128.32]) by inbox.vuxu.org (Postfix) with ESMTP id 40B1A22FE3 for ; Tue, 19 Nov 2024 20:22:50 +0100 (CET) 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.98) (envelope-from ) id 1tDTo5-0000000F6XR-2rMl for ml@inbox.vuxu.org; Tue, 19 Nov 2024 13:22:41 -0600 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.97.1) (envelope-from ) id 1tDTo3-0000000742g-4A1l for ml@inbox.vuxu.org; Tue, 19 Nov 2024 13:22:36 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1tDTo1-0000000742X-1PDW for ding@lists.math.uh.edu; Tue, 19 Nov 2024 13:22:33 -0600 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.98) (envelope-from ) id 1tDTnw-0000000F6X1-2Bys for ding@lists.math.uh.edu; Tue, 19 Nov 2024 13:22:33 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: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=5qFbfjrZ4GaVbham/L/loGJfdOkUaz1SoyoeyxodZwI=; b=PvAvkn9sVnYMZ45NuztFYxEkC+ W59/dU9QFkYnpVTVE6tM65tRGTw2fIBlwF5ibV7i+QdKgOXDpkHtBQNgWok1LpesGrqCM1OelAfb1 hB5Q+XV5FP+p26pRiAYQXwZ/jBaa4vCrpHrpJoIQ6VHAoUmAVOg1lEsx54k4HLM0UyPI=; Received: from gavdos.tim-landscheidt.de ([2a01:4f8:1c0c:4bd6::1]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tDTnp-0006OK-68 for ding@gnus.org; Tue, 19 Nov 2024 20:22:23 +0100 Received: from [146.0.225.174] (port=41902 helo=vagabond) by gavdos.tim-landscheidt.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tDTnm-000XNF-1r; Tue, 19 Nov 2024 19:22:18 +0000 From: Tim Landscheidt To: "Husain Alshehhi" Cc: ding@gnus.org Subject: Re: Extracting Header and Content from an Article In-Reply-To: <29523.5648796492$1731988489@news.gmane.org> (Husain Alshehhi's message of "Mon, 18 Nov 2024 21:53:23 -0600") Organization: https://www.tim-landscheidt.de/ References: <30844.7794335493$1731379178@news.gmane.org> <87jzd253x5.fsf@vagabond.tim-landscheidt.de> <29523.5648796492$1731988489@news.gmane.org> Date: Tue, 19 Nov 2024 19:22:15 +0000 Message-ID: <871pz7av14.fsf@vagabond.tim-landscheidt.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk "Husain Alshehhi" wrote: >> I do not know if it is the right way, but I use patterns of >> the type: >> | (gnus-with-article-buffer >> | (gnus-fetch-original-field "User-Agent")) >> Similarly, I use gnus-with-article-buffer and >> save-mark-and-excursion to "enter" the article buffer, then >> article-goto-body to go to the article body's top, and then >> search-forward-regexp to capture text. > Thank you. Extracting the field worked well. > For the body, however, I noticed that I need a little more: what I want > to search in is the the whole email, not just the article buffer. In > particular, I want to be able to search the text/plain as well as the > text/html parts. gnus-with-article-buffer and article-goto-body, on the > other hand, only allow me to search within the buffer, which has only > the visible part of the email (text/html in my case). I have one use case where I need to search (or rather copy parts of) the raw article text, and I use gnus-summary-show-raw-article for that as G=C4=B3s suggested. For another use case, more similar to yours, I want to pro- perly iterate over attachments, etc. I haven't done any ac- tual work in that direction, but noted that it would proba- bly involve iterating over (gnus-article-mime-handles). If someone has a working example, any pointer would be much appreciated. Tim