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 34F60220ED for ; Mon, 18 Nov 2024 18:30:24 +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 1tD5Zu-0000000ECAj-01UM for ml@inbox.vuxu.org; Mon, 18 Nov 2024 11:30:22 -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 1tD5Zs-00000006yc6-0kmG for ml@inbox.vuxu.org; Mon, 18 Nov 2024 11:30:20 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1tCgI7-00000006wYm-37jM for ding@lists.math.uh.edu; Sun, 17 Nov 2024 08:30:19 -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.98) (envelope-from ) id 1tCgI3-0000000CIF3-0G0S for ding@lists.math.uh.edu; Sun, 17 Nov 2024 08:30:19 -0600 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:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: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=rENVgLl0eW7gQwejWijeyAHe+SMZBZVeDLhRHWGr/yY=; b=Jd7ZoaQTeDFCnH4HKElCM03B2Z pWQ0N8V82gGniTIOt9jeXkjnrI7cDng/9ajBKtL4VveEgzGp3c3cwJPvf4SyGHIChKfm3Py1lRd+m DcnbhgizwPstCuOGtE8AvxxbrZFrJ6jRWCWYT275wlqD1HN70F/u2dy/yac54nzQiqCY=; 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 1tCgHu-0002F9-Up for ding@gnus.org; Sun, 17 Nov 2024 15:30:09 +0100 Received: from [146.0.225.174] (port=38468 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 1tCgHs-000KsK-2f; Sun, 17 Nov 2024 14:30:04 +0000 From: Tim Landscheidt To: "Husain Alshehhi" Cc: ding Subject: Re: Extracting Header and Content from an Article In-Reply-To: <30844.7794335493$1731379178@news.gmane.org> (Husain Alshehhi's message of "Mon, 11 Nov 2024 20:38:14 -0600") Organization: https://www.tim-landscheidt.de/ References: <30844.7794335493$1731379178@news.gmane.org> Date: Sun, 17 Nov 2024 14:29:58 +0000 Message-ID: <87jzd253x5.fsf@vagabond.tim-landscheidt.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk "Husain Alshehhi" wrote: > When the point is in the summary page while viewing an > article, or while a point is in an open article, I want to > be able to (1) extract a header value which is not in the > gnus-extra-headers, and (2) get some content from the > article via regexp search (using capture groups). What are > the right GNUS APIs to use for my use case? 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. Tim