From: Drew Adams <drew.adams@oracle.com>
To: Gregory Heytings <ghe@sdf.org>
Cc: 42307@debbugs.gnu.org
Subject: bug#42307: Feature request: Visual block attribute for overlays
Date: Fri, 10 Jul 2020 09:42:32 -0700 (PDT) [thread overview]
Message-ID: <ae50e98e-d231-4aa9-98ad-b233dba63874@default> (raw)
In-Reply-To: <alpine.NEB.2.21.2007101748360394.11489@sdf.lonestar.org>
> > What if `overlay-start' were on the `u', instead of the `i',
>
> Actually it starts on the '(', the opening parenthesis is green if you
> look close enough.
Yes, that's what I meant and should have said.
> > of `if (consp ,funs))'? Would the overlay cover only from that `u'
> > onward, or would it still cover from the `i' of `if' onward? IOW,
> > does the left edge of the highlighted area extend downward from
> > `overlay-start', or does it start from the first non-whitespace
> > char in the line?
>
> If you take the algorithm, it would start on the "u", extend to the
> place it extends on the picture on the right, and on the next lines
> two whitespace characters on the left would not be displayed as
> green anymore (that is, the green area would start under the "f" of
> "(if".
Why is that? That starting position of the second line's
highlight doesn't correspond to anything "natural", does
it? I would expect either that it starts as it does now,
directly under the `(' of the first line, or directly
under the `u' that started the overlay.
> > What about a variant of your "visual block" that extends the
> > overlay so that all lines, from the first line, which contains
> > `overlay-start' to the last line, which contains `overlay-end',
> > are covered through the same columns? Coverage (highlighting)
> > would then always be a rectangle. In your example, the
> > highlighting of the last line would be extended to the same
> > column as that of the other lines.
> >
>
> That's a possible variant, indeed. Let's name this one
> "visualrectangle". But from a programmer's point of view it
> makes (IMHO) less sense.
Neither makes sense from a coding point of view, I think.
At least not what you describe above, where the second
line's highlighting starts under the `f' of the first
line's `if'. What does that position even correspond to?
In any case, overlays, and highlighting, are not just for
code.
> > Your "visual block", and the variant just described, just
> > like the old behavior, cover both whitespace chars and
> > empty screen real estate (no chars), from `overlay-start'
> > to `overlay-end'. The new behavior is the only one that
> > covers only _chars_ in that span (whitespace or other chars).
> >
>
> Indeed. Yet another possibility would be cover only
> non-whitespace chars. Let's name this one "visiblechars".
>
> > In any case, whatever the choices we offer, Elisp should
> > make it simple to choose any of them.
> >
>
> Yes ;-) My personal preference order among the possible choices is:
>
> 1. visualblock
> 2. the previous default
> 3. visiblechars
> 4. the current default
> 5. visualrectangle
next prev parent reply other threads:[~2020-07-10 16:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 8:24 bug#42307: Feature request: Visual block attribute for overlays Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-10 14:56 ` Drew Adams
2020-07-10 15:24 ` Drew Adams
2020-07-10 16:02 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-10 16:42 ` Drew Adams [this message]
2020-07-10 18:57 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-10 21:26 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-11 23:50 ` Juri Linkov
2020-07-12 1:25 ` Drew Adams
2020-07-12 8:21 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-12 23:59 ` Juri Linkov
2020-07-13 6:45 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
-- strict thread matches above, loose matches on Subject: below --
2020-07-08 17:19 bug#42347: " Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-14 2:32 ` Eli Zaretskii
2020-07-14 7:38 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-14 14:55 ` Eli Zaretskii
2020-07-14 15:45 ` bug#42307: " Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-14 16:34 ` Eli Zaretskii
2020-07-14 17:01 ` bug#42307: " Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-14 17:10 ` Eli Zaretskii
2020-07-14 17:20 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-14 4:23 ` bug#42347: " Drew Adams
2020-07-14 7:49 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-14 14:48 ` Drew Adams
2020-07-14 15:53 ` bug#42307: " Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=ae50e98e-d231-4aa9-98ad-b233dba63874@default \
--to=drew.adams@oracle.com \
--cc=42307@debbugs.gnu.org \
--cc=ghe@sdf.org \
/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).