[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32281: shr.el align support patch

From: Eli Zaretskii
Subject: bug#32281: shr.el align support patch
Date: Tue, 07 Aug 2018 18:07:50 +0300

> From: Bad Blue Bull <address@hidden>
> Cc: "address@hidden" <address@hidden>
> Date: Tue, 07 Aug 2018 03:51:52 +0300
>  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.
> I need to use a character to mark places where lines must be split (specified 
> by <br> tags and end of list
> items), also a character to mark end of a paragraph to be filled (a mark can 
> be used for this purpose but docs
> warn against it). These chars will be removed when a paragraph gets filled, I 
> don't see them cause any trouble
> in the future and those values can easily be altered to diffirent ones if it 
> happens.

I'm not sure I understand why you needed a character for that role.
fill-region-as-paragraph accepts buffer positions, and
re-search-forward can be told not to search beyond a certain buffer
position.  So you should be able to record the positions in some
variables, and use them instead of inserting characters that need to
be deleted afterwards.

The disadvantage of inserting characters that were not there in the
first place is that if the user types C-g at some unfortunate moment,
these characters might be left in the buffer (unless you complicate
the code by arranging for them to be deleted in that case).  Using
buffer positions avoids all those complications.

Am I missing some reason why you needed characters as markers?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]