From: Robert Pluim <rpluim@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 37858@debbugs.gnu.org
Subject: bug#37858: 27.0.50; Ensure a minimum width for `space` display prop
Date: Tue, 22 Oct 2019 10:03:46 +0200 [thread overview]
Message-ID: <m2ftjlurz1.fsf@gmail.com> (raw)
In-Reply-To: <jwvy2xdams1.fsf@iro.umontreal.ca> (Stefan Monnier's message of "Mon, 21 Oct 2019 16:03:58 -0400")
>>>>> On Mon, 21 Oct 2019 16:03:58 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:
Stefan> Package: Emacs
Stefan> Version: 27.0.50
Stefan> For text displayed in columns, alignment is generally obtained with
Stefan> a `display` text-property of the form
Stefan> (space :align-to FOO)
Stefan> This works great when the previous text ends before FOO, but when we
Stefan> mis-calculate (or didn't calculate at all) and the previous text already
Stefan> extends further than the desired alignment of the following text, such
Stefan> space is reduced down to 0 pixels which is often not what we want.
Stefan> Sometimes one can workaround this by placing 2 spaces in the buffer: one
Stefan> with the :align-to and another fixed size space. But it can be
Stefan> cumbersome to do that and it leads to undesirable artifacts (e.g. the
Stefan> cursor can be placed between the two space).
Stefan> So, I'd like to extend our `space` specifications so as to be able to
Stefan> specify a minimum width. I came up with the patch below which lets you
Stefan> write:
Stefan> (space :align-to FOO :min-width BAR)
Stefan> which seems to work fine, but while trying to update the Elisp doc for
Stefan> it I realized that maybe a better option is to extend the acceptable
Stefan> forms for FOO so it can be of the form:
Stefan> (space :align-to (max FOO (+ BAR current-x)))
Hmm, I think I probably prefer the former. Perhaps when you've
documented the semantics of your :min-relative-width addition Iʼll be
able to judge better :-)
Robert
next prev parent reply other threads:[~2019-10-22 8:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 20:03 bug#37858: 27.0.50; Ensure a minimum width for `space` display prop Stefan Monnier
2019-10-22 8:03 ` Robert Pluim [this message]
2019-10-22 15:08 ` Eli Zaretskii
2022-05-07 12:07 ` bug#37880: 27.0.50; Changing font size in Info-mode messes up formatting Lars Ingebrigtsen
2022-05-07 14:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 14:38 ` bug#37858: " Eli Zaretskii
2022-05-07 15:58 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 16:06 ` bug#37880: " Eli Zaretskii
2022-05-07 16:20 ` Eli Zaretskii
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=m2ftjlurz1.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=37858@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.