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,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17231 invoked from network); 8 Mar 2022 16:35:52 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 8 Mar 2022 16:35:52 -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.2) (envelope-from ) id 1nRcoQ-00Cyc8-FU for ml@inbox.vuxu.org; Tue, 08 Mar 2022 10:35:50 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94.2) (envelope-from ) id 1nRcoP-005JtG-Sh for ml@inbox.vuxu.org; Tue, 08 Mar 2022 10:35:49 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1nRcoO-005Jt9-JE for ding@lists.math.uh.edu; Tue, 08 Mar 2022 10:35:48 -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.2) (envelope-from ) id 1nRcoM-001hDY-Ni for ding@lists.math.uh.edu; Tue, 08 Mar 2022 10:35:48 -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:In-Reply-To:Date: References: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=eJFYcOHHwp/k5ivhrELYAHLJ/6Sb57YKym4DoF2WkE8=; b=lMEFBTIQD7Z5YE0CDpabs61gEi JtSdVFauL4sgjUmq8oOgUdoIpRjbrBSMwBZnEPvAqt+asP3nxOzTzrRHCE244dUZCsX6WG684PntJ 0lIEKg5s1gVeqpv9uYZdX/xViI6DHWjz7OYiBscPkRD4hE2TEjnCe+42wgjNoq0TzisQ=; Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nRcoG-0005oU-0Q for ding@gnus.org; Tue, 08 Mar 2022 17:35:42 +0100 Received: by mail-qt1-x82b.google.com with SMTP id w1so16605470qtj.2 for ; Tue, 08 Mar 2022 08:35:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=eJFYcOHHwp/k5ivhrELYAHLJ/6Sb57YKym4DoF2WkE8=; b=aDqRfHFXc2uyE4IrZXRONBGoPeFAE0FeU8Wd7XwMNhSfIdOTeBc8mZoEOHWTJnQG6m TitBc1lhV/BWw4RSU73mDJrtqtg94p1W7jzq+wkmwX/M32cGX/lf4/fSFtaPW8UFfi4P FRJX2kGEd4ejMfeoqDXmxZlOVGpWIOSTMUX7/+mo62p71TcxgHeuQJpjcVrpurakbcGy kv5twJ0ae+doZPlB1I0Jf1LzLZXaV1ZZRcCk3Vuf3TkHOFGFBZaR9b8nqa/veZPMeYyc hAm27UU+GWivYf95fUKWkhqYvf/9ci7h0izHmrkDX90SW0d2HDI5Q1Guw4aWpQUlP71O di7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=eJFYcOHHwp/k5ivhrELYAHLJ/6Sb57YKym4DoF2WkE8=; b=AJEecmEMtL4/QTJ/lVcvSwlv2VlyQp6wpzMnbbGpkSL7ycpAmvtyQqRyeTeronvUI/ otR5RX6GiSK3jB72L9TS4pKD5T9JKehq8g1fYFqbqZezg21vGX/lOp29lnlIHronZyeJ CpPFT+ZSpfqMGUgBmRJGF7bZKuyeevgikKvVtQQh/SdYpw6Mxb7Fsk869PG1j1A+ak8k e+M9KFv0KKtFc9ZyhYiqara8dM002eUiQYytdgtElLuT8pARNmSKzT6SgxkZnVfKOPkB aUBSz7PE1k/zMEYbhiCNamnSmwB5Q2mVcjr2ifhyngHWdLYyQGf38OkK7DEgLYroWQJQ g+Ig== X-Gm-Message-State: AOAM533orJHCrMDwtJC9URTc2lKkvssakXtpOXyOq/0I4VaxLEIn/3q4 3B6XmdIJyQ8y0zl2elU8DpQ= X-Google-Smtp-Source: ABdhPJyuymG+iu1c5yZEBC8jTQZAsyAaD0O50P295azh2ndBch/urRDsFkHgMMZ0q5xUliBnloKcVg== X-Received: by 2002:a05:622a:193:b0:2de:2c0d:e3eb with SMTP id s19-20020a05622a019300b002de2c0de3ebmr14345353qtw.42.1646757337678; Tue, 08 Mar 2022 08:35:37 -0800 (PST) Received: from localhost (pool-96-232-253-158.nycmny.fios.verizon.net. [96.232.253.158]) by smtp.gmail.com with ESMTPSA id d12-20020a05620a158c00b00648ec3fcbdfsm7620740qkk.72.2022.03.08.08.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 08:35:37 -0800 (PST) From: dick To: Sam Steingold Cc: ding@gnus.org Subject: Re: hackernews & gnus-summary-browse-url References: <87k0d5xrf4.fsf@ericabrahamsen.net> Date: Tue, 08 Mar 2022 11:35:36 -0500 In-Reply-To: (Sam Steingold's message of "Tue, 08 Mar 2022 10:05:32 -0500") Message-ID: <875yoofllz.fsf@dick> User-Agent: Gnus/5.14 (Gnus v5.14) Commercial/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk Not exactly what you want, but close enough: (add-hook 'gnus-summary-mode-hook (lambda () (require 'url-http) (defvar url-http-end-of-headers) (when (equal (gnus-group-real-name gnus-newsgroup-name) "gwene.com.ycombinator.news") (make-local-variable 'gnus-article-prepare-hook) (add-to-list 'gnus-article-prepare-hook (lambda () (when (and (buffer-live-p (get-buffer gnus-original-article-buffer)) (buffer-live-p (get-buffer gnus-article-buffer))) (with-current-buffer gnus-original-article-buffer (when-let ((found (re-search-forward "\"\\([^\"]+\\)\">Comments" nil t)) (url (match-string 1)) (resbuf (url-retrieve-synchronously url t nil 5))) (unwind-protect (with-current-buffer gnus-article-buffer (let ((inhibit-read-only t)) (message-goto-body) (save-excursion (delete-region (point) (point-max))) (shr-insert-document (with-current-buffer resbuf (libxml-parse-html-region (1+ url-http-end-of-headers) (point-max)))))) (kill-buffer resbuf))))))))))