GNU bug report logs - #32281
shr.el align support patch

Previous Next

Package: emacs;

Reported by: Bad Blue Bull <ibmbull <at> yandex.ru>

Date: Thu, 26 Jul 2018 14:59:01 UTC

Severity: wishlist

Tags: patch, wontfix

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: ibmbull <at> yandex.ru, 32281 <at> debbugs.gnu.org
Subject: bug#32281: shr.el align support patch
Date: Mon, 06 Aug 2018 18:13:18 +0300
> From: Noam Postavsky <npostavs <at> gmail.com>
> Date: Sun, 05 Aug 2018 22:52:35 -0400
> Cc: 32281 <at> debbugs.gnu.org
> 
> Bad Blue Bull <ibmbull <at> yandex.ru> 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.




This bug report was last modified 6 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.