From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32281: shr.el align support patch Date: Mon, 06 Aug 2018 18:13:18 +0300 Message-ID: <83bmafsf3l.fsf@gnu.org> References: <6177421532613989@iva7-bd007c44f58e.qloud-c.yandex.net> <87wot4xl3g.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1533568333 18014 195.159.176.226 (6 Aug 2018 15:12:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2018 15:12:13 +0000 (UTC) Cc: ibmbull@yandex.ru, 32281@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 06 17:12:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmhAy-0004SV-Ih for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2018 17:12:04 +0200 Original-Received: from localhost ([::1]:34608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmhD3-0003DU-94 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2018 11:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmhCw-0003DD-10 for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 11:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmhCs-0000HP-0s for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 11:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmhCr-0000HI-TX for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 11:14:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fmhCr-0008Fn-MP for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 11:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Aug 2018 15:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32281 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 32281-submit@debbugs.gnu.org id=B32281.153356841431680 (code B ref 32281); Mon, 06 Aug 2018 15:14:01 +0000 Original-Received: (at 32281) by debbugs.gnu.org; 6 Aug 2018 15:13:34 +0000 Original-Received: from localhost ([127.0.0.1]:42831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmhCQ-0008Et-7H for submit@debbugs.gnu.org; Mon, 06 Aug 2018 11:13:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmhCO-0008Ee-HC for 32281@debbugs.gnu.org; Mon, 06 Aug 2018 11:13:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmhCF-000076-8B for 32281@debbugs.gnu.org; Mon, 06 Aug 2018 11:13:27 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmhCF-000070-3n; Mon, 06 Aug 2018 11:13:23 -0400 Original-Received: from [176.228.60.248] (port=2245 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fmhCE-0004jq-Gj; Mon, 06 Aug 2018 11:13:22 -0400 In-reply-to: <87wot4xl3g.fsf@gmail.com> (message from Noam Postavsky on Sun, 05 Aug 2018 22:52:35 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149286 Archived-At: > From: Noam Postavsky > Date: Sun, 05 Aug 2018 22:52:35 -0400 > Cc: 32281@debbugs.gnu.org > > Bad Blue Bull writes: > > > Here's a patch for shr.el that makes it handle "align" attribute for > > headers, paragraphs and lists, works only when monospace font is used > > (becoz of lame implementation of fill-paragraph). Also default value > > of shr-use-fonts set to nil so monospace fonts are used by default. > > Seems reasonable overall, but I'm not sure if changing the default is > justified. And I'm sure it isn't. Not only do we not change past defaults so easily, I personally don't think I'd like such a change, or consider it correct. > > + "Fill paragraph at or after point, breaking lines at positions matching regexp argument BRE-REGEXP. The first line of the doc string should not be longer than 78 characters, and should be a complete sentence. > > +BRE-REGEXP must be a regexp that determines positions where to break lines, default value is \\x2028." > > + (unless bre-regexp (setq bre-regexp "\x2028")) > > + (setq bre-regexp (concat bre-regexp "\\|\x2029")) > > + (save-excursion > > + (let ((line-begin) (paragraph-end)) > > + (forward-paragraph) > > + (insert "\x2029") ; use \x2029 (unicode paragraph separator) to mark end of a paragraph Why did you decide to use u+2028 and u+2029 for these purposes? Emacs doesn't yet support these characters as Unicode intended, so using them might have unexpected effects, and might produce different effect if we start supporting them in the future. This needs a NEWS entry, I think. Thanks.