From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 22 11:17:02 2022 Received: (at submit) by debbugs.gnu.org; 22 Jul 2022 15:17:02 +0000 Received: from localhost ([127.0.0.1]:42177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEuOk-0000l0-7n for submit@debbugs.gnu.org; Fri, 22 Jul 2022 11:17:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:47362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEuOf-0000kW-MB for submit@debbugs.gnu.org; Fri, 22 Jul 2022 11:17:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEuOf-0001eu-Fh for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 11:16:57 -0400 Received: from mail.choca.pics ([80.67.172.235]:38484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEuOa-0003Zx-Mm for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 11:16:57 -0400 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 2530418192DD4; Fri, 22 Jul 2022 17:16:42 +0200 (CEST) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id Lff03Tfdc7fO; Fri, 22 Jul 2022 17:16:41 +0200 (CEST) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 7734618192DD5; Fri, 22 Jul 2022 17:16:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id cUzBQMnPyYWB; Fri, 22 Jul 2022 17:16:41 +0200 (CEST) Received: from localhost (240-68-190-109.dsl.ovh.fr [109.190.68.240]) by mail.choca.pics (Postfix) with ESMTPSA id 24F2218192DD4; Fri, 22 Jul 2022 17:16:41 +0200 (CEST) From: Damien Cassou To: bug-gnu-emacs@gnu.org Subject: 28.1.90; shr: The DOM is lost in the rendered result Date: Fri, 22 Jul 2022 17:16:40 +0200 Message-ID: <87mtd1qisn.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=80.67.172.235; envelope-from=damien@cassou.me; helo=mail.choca.pics X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Lars Magne Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, SHR doesn't link the text being inserted in the buffer and DOM node being rendered. This means it is not possible to implement some use cases, e.g., - inspect/copy the DOM node rendered at point; - share/bookmark a link to a particular section of a page (which requires knowing the id attribute of the enclosing DOM node). I fixed this by changing shr-generic from: (defsubst shr-generic (dom) (dolist (sub (dom-children dom)) (if (stringp sub) (shr-insert sub) (shr-descend sub)))) to (defsubst shr-generic (dom) (let ((start (point))) (dolist (sub (dom-children dom)) (if (stringp sub) (shr-insert sub) (shr-descend sub))) (unless (eq start (point-max)) (put-text-property start (1+ start) 'shr-dom dom)))) This seems to work great. Is this change desirable? Do you want a patch? -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 23 01:54:52 2022 Received: (at 56704) by debbugs.gnu.org; 23 Jul 2022 05:54:52 +0000 Received: from localhost ([127.0.0.1]:42931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oF86G-00004z-20 for submit@debbugs.gnu.org; Sat, 23 Jul 2022 01:54:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oF86E-0008WQ-Sa for 56704@debbugs.gnu.org; Sat, 23 Jul 2022 01:54:51 -0400 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=8kolQXgBSmqTiXn++xnxBzoU4AORM25a6vVwNyrYPCo=; b=HWGfgwsx+DYCw44p2rHXsswmkM n8mvikaIpUmCyzwqXcViy/3Md6aGPilPSBaz3PJql5nA0YSkGe2HWiTjtxN9SCzzY4C5LWAmoD8IU KUm92SK2o8nI5EXwLI1IX4w0SHOKsl3bDRRD97JeqXoQarPOeH33+uhZgP18PgRTwa/g=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oF866-0007SJ-Fb; Sat, 23 Jul 2022 07:54:44 +0200 From: Lars Ingebrigtsen To: Damien Cassou Subject: Re: bug#56704: 28.1.90; shr: The DOM is lost in the rendered result In-Reply-To: <87mtd1qisn.fsf@cassou.me> (Damien Cassou's message of "Fri, 22 Jul 2022 17:16:40 +0200") References: <87mtd1qisn.fsf@cassou.me> X-Now-Playing: Rival Consoles's _Kid Velo_: "Into The Heart I" Date: Sat, 23 Jul 2022 07:54:41 +0200 Message-ID: <87lesk74ri.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Damien Cassou writes: > SHR doesn't link the text being inserted in the buffer and DOM node > being rendered. Yes, shr is already slow enough, so basically all "debugging"-like things were eschewed. It'd be nice to have, but if shr is unusably slow, that's not nice, either. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56704 Cc: 56704@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Damien Cassou writes: > SHR doesn't link the text being inserted in the buffer and DOM node > being rendered. Yes, shr is already slow enough, so basically all "debugging"-like things were eschewed. It'd be nice to have, but if shr is unusably slow, that's not nice, either. So we won't be adding something like this, and I'm therefore closing this bug report. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 23 01:55:03 2022 Received: (at control) by debbugs.gnu.org; 23 Jul 2022 05:55:03 +0000 Received: from localhost ([127.0.0.1]:42934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oF86Q-00005s-E8 for submit@debbugs.gnu.org; Sat, 23 Jul 2022 01:55:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oF86O-00005K-Ru for control@debbugs.gnu.org; Sat, 23 Jul 2022 01:55:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=d9cGQSFGhFVy+7mfo+uKYUinXToQx4/0uxH9wH/qtFQ=; b=SObzKUt/DMWAZKtQySHZBsJSvB Zzy2edToOO6byHF3loWs+du4iLeJv2y7Vm0CUOHrzHs7oR0YFS0VnqSSf/qS8BNLLQSlTwdDJhS8J 5VPCSe9zpIEwN1d+6KcKpFx11rVKaH7pTCpSfh5w15a94Gcp91zSAmTaRG/W0PjGXw9o=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oF86H-0007SS-1n for control@debbugs.gnu.org; Sat, 23 Jul 2022 07:54:55 +0200 Date: Sat, 23 Jul 2022 07:54:52 +0200 Message-Id: <87k08474r7.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #56704 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 56704 wontfix close 56704 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 56704 wontfix close 56704 quit From unknown Wed Aug 20 06:39:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Aug 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator