unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
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 18:08:43 +0300	[thread overview]
Message-ID: <837e4w24xw.fsf@gnu.org> (raw)
In-Reply-To: <jwvy2xdams1.fsf@iro.umontreal.ca> (message from Stefan Monnier on Mon, 21 Oct 2019 16:03:58 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Mon, 21 Oct 2019 16:03:58 -0400
> 
> So, I'd like to extend our `space` specifications so as to be able to
> specify a minimum width.  I came up with the patch below which lets you
> write:
> 
>     (space :align-to FOO :min-width BAR)
> 
> which seems to work fine, but while trying to update the Elisp doc for
> it I realized that maybe a better option is to extend the acceptable
> forms for FOO so it can be of the form:
> 
>     (space :align-to (max FOO (+ BAR current-x)))

Since :align-to already supports expressions of the forms described in
the node "Pixel Specification", to have the latter you'd need:

  . implement a new OP called 'max' (and probably also 'min' for a
    good measure);
  . implement a new POS called, say, 'beg', which will evaluate to the
    x coordinate of where the space display property begins

and then you will have your feature for free, I think.






  parent reply	other threads:[~2019-10-22 15:08 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
2019-10-22 15:08 ` Eli Zaretskii [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=837e4w24xw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).