all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bad Blue Bull <ibmbull@yandex.ru>
Cc: npostavs@gmail.com, 32281@debbugs.gnu.org
Subject: bug#32281: shr.el align support patch
Date: Tue, 07 Aug 2018 20:19:00 +0300	[thread overview]
Message-ID: <83r2jap01n.fsf@gnu.org> (raw)
In-Reply-To: <2042111533660898@iva4-406defa25fee.qloud-c.yandex.net> (message from Bad Blue Bull on Tue, 07 Aug 2018 19:54:58 +0300)

> From: Bad Blue Bull <ibmbull@yandex.ru>
> Cc: "npostavs@gmail.com" <npostavs@gmail.com>,
> 	"32281@debbugs.gnu.org" <32281@debbugs.gnu.org>
> Date: Tue, 07 Aug 2018 19:54:58 +0300
> 
> I've escaped using of paragraph separator symbol by using narrowing

That's also fine.

> (can't just use constant position as
> fill-region-as-paragraph will change the text before it and it won't correspond the end of paragraph anymore).

We have markers for that.  But if narrowing solves your problem, it's
okay to use that.

> Using a marker symbol to mark line breaks is still necessary, any attempt to avoid it would lead to ridicously
> complicated solution.

Can you explain why?  I still don't think I understand.

> fill-region-as-paragraph disregards fill-collumn when aligns pic, all I can do is not to justify images at all (but I'm
> really puzzled how to do it, I could use other marker just to determine where image starts and ends and skip
> that region, but since you're against such approach... )
> Justification is badly implemented in fill, it's useless for proportional fonts and you can see it's bad for images
> too. TBH would be good to make fill.el just ignore justify in such cases (maybe giving a warning message).

To support proportional fonts, we need:

  . convert all the calculations to work in pixels instead of in
    columns (or, equivalently, in units of the canonical character
    width, in which case you then must use floating-point values)
  . put on some (or all?) SPC characters a :width display property,
    with the suitably calculated width in pixels

The infrastructure for all of that already exists, it's just a matter
of coding.





  parent reply	other threads:[~2018-08-07 17:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 14:06 bug#32281: shr.el align support patch Bad Blue Bull
2018-08-06  2:52 ` Noam Postavsky
2018-08-06 15:13   ` Eli Zaretskii
2018-08-07  0:51     ` Bad Blue Bull
2018-08-07  0:59       ` Bad Blue Bull
2018-08-07  2:34       ` Noam Postavsky
2018-08-07 15:07       ` Eli Zaretskii
2018-08-07 16:54         ` Bad Blue Bull
2018-08-07 17:11           ` Bad Blue Bull
2018-08-07 17:19           ` Eli Zaretskii [this message]
2018-08-07 18:15             ` Bad Blue Bull
2018-08-07 18:15       ` Lars Ingebrigtsen
2018-08-07 19:56         ` Bad Blue Bull
2018-08-10  0:12           ` Noam Postavsky
2018-08-06 17:36 ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r2jap01n.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32281@debbugs.gnu.org \
    --cc=ibmbull@yandex.ru \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.