From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil Date: Tue, 05 Mar 2024 20:22:52 +0100 Message-ID: <877cigzdo3.fsf@gmail.com> References: <87o7btzmdo.fsf@gmail.com> <87jzmhzm3v.fsf@gmail.com> <861q8onan6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6377"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69555@debbugs.gnu.org, rahguzar@zohomail.eu To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 05 20:24:47 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rhaP9-0001Rn-IF for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Mar 2024 20:24:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhaOx-0008IN-GA; Tue, 05 Mar 2024 14:24:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhaOu-0008Ht-BO for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 14:24:32 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhaOu-0004LX-3b for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 14:24:32 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhaPN-0002U6-Uh for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 14:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Mar 2024 19:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69555 X-GNU-PR-Package: emacs Original-Received: via spool by 69555-submit@debbugs.gnu.org id=B69555.17096666759507 (code B ref 69555); Tue, 05 Mar 2024 19:25:01 +0000 Original-Received: (at 69555) by debbugs.gnu.org; 5 Mar 2024 19:24:35 +0000 Original-Received: from localhost ([127.0.0.1]:49029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhaOw-0002TH-Lr for submit@debbugs.gnu.org; Tue, 05 Mar 2024 14:24:35 -0500 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:50242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhaOs-0002Sz-Rg for 69555@debbugs.gnu.org; Tue, 05 Mar 2024 14:24:33 -0500 Original-Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33d7b8f563eso3964113f8f.0 for <69555@debbugs.gnu.org>; Tue, 05 Mar 2024 11:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709666574; x=1710271374; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F1uZAp2Di3LzvK4issOgFR7jOMchrh0Sv8ulgzcvcZg=; b=nHSo4U9OyNfW6UVGTe9R1tHXhW7YSeSZLjEAUti/rHmLlSZ3nmHqAdtya9D2Uf7tkZ Nlx9OnjDR6e7T9j/YWh3hlshV07z005WDEm2oBCFtzfEjV3naEM4yJTE1TgqLTQHL+Kn AbIl9eP0yhkOgeS80KQGom7d62/xeGxocakQWG9p2MgQa+Ew3FQneYaG34FxYhXmfTcG LAIh7ff42AzFV2/4cHtZilnYcgz1nHPPr8/Chg2yTujIpqF5iyowzYazCj4FLx3g+X3i VWrnFk8nDIolNjLmk2EUewlSCgpZ/MRgRD9AvcKSz3rXX+4ZnUTgY6+StYHcwi7Y52AQ IVYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709666574; x=1710271374; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F1uZAp2Di3LzvK4issOgFR7jOMchrh0Sv8ulgzcvcZg=; b=ORXspJC7z2cQ59TA2CCoDLKY8P02wh/DrH+Tq1NNin0H3glc0VnWu8eq5/k5ehiDRJ 7qsiqw4UyBmgfMgV4lud8qSD9I/D/J+uRrEyx1Z35NV3lCKrH+mvVKM/SYcRroPDjYcK weTzr43C67vrSsic7TZx0LX5HX5qLnof5NkncL53n761R9zMgNU4mFv42YtPBtC0rFXo DIGhd1QbsLSc/g+xt2gPQj7tKMLeHyxQx1vNP7rLsmaQq4yVVoDiN0qa+NLj+pGTJQbx uVlfgRBLgabGRJvQwDpAcxEIWqCjR6R0NDHQGS1KPZBvGifSyuu5wUIPH0aywhBGns52 7I+A== X-Gm-Message-State: AOJu0YxKp0sg9mqHtFtsfPxR90diKafWJY9N+Z6n1dIeCPWMi6Wt+84Q onbBbe2rq8+CGy7npw415Ij9D3cbKLkiqnw7agc4xrqHrn8QzKoi X-Google-Smtp-Source: AGHT+IFlMWflIvPCf1UBDmiNVUfr1LB4WawxNx6hES5sKbaPr3oI/ctHLhnhJWzjkGjijA5G7i4+tA== X-Received: by 2002:a5d:6e48:0:b0:33d:7e99:babc with SMTP id j8-20020a5d6e48000000b0033d7e99babcmr8824530wrz.50.1709666574252; Tue, 05 Mar 2024 11:22:54 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id a16-20020a5d53d0000000b0033de10c9efcsm15672379wrw.114.2024.03.05.11.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 11:22:53 -0800 (PST) In-Reply-To: <861q8onan6.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Mar 2024 14:09:01 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281079 Archived-At: Eli Zaretskii writes: >> Cc: Rahguzar >> From: K=C3=A9vin Le Gouguec >> Date: Mon, 04 Mar 2024 23:08:20 +0100 >>=20 >> K=C3=A9vin Le Gouguec writes: >>=20 >> > Will post an updated patch once I have= a >> > bug number to replace the "bug#TODO" placeholders. >>=20 >> See attached. > > The change in behavior is unconditional, AFAIU. Should we have a > separate knob for that? Perhaps someone out there doesn't want text > to be indented when shr-fill-text is nil? Perhaps; I could look into adding that knob. FWIW nothing in the original feature request (bug#66676) gives me the impression that this new option should affect indentation; the stated motivation was: > 1) Using `visual-line-mode` for line wrapping. I think this is more > natural for html and makes resizing windows work more nicely. That's why I interpret the indentation change as a side-effect; curious to hear Rahguzar's thoughts though. Another reason I'm not overly fond of adding another knob is figuring out what should happen if a user keeps shr-fill-text set to t, but sets that hypothetical indentation option to nil. Should we support that? Or should shr-fill-text become a tri-state? (nil, 'indent-only, t) I'm open to biting the bullet, but I'd also like to make sure we don't sophisticate shr.el further than we want to. > Also, please time the code on some substantially large body of text, > with and without shr-fill-text, and compare that with the current > version. I think performance is an important aspect of any change in > this area. Can do; would "(elisp) Profiling" be the starting point? (For all my list lurking, I confess my eyes have always glossed over discussions involving benchmarks) (Also wondering if we have any "standard" or preferred HTML documents or websites to throw at shr.el for benchmarking purposes; if not, I guess I'll peruse =F0=9F=A4=94) Thanks for the review!