all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#42347: Feature request: Visual block attribute for overlays
@ 2020-07-08 17:19 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  4:23 ` bug#42347: " Drew Adams
  0 siblings, 2 replies; 25+ messages in thread
From: Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-07-08 17:19 UTC (permalink / raw)
  To: 42347


In Emacs 21 to 26, overlays between two points in the buffer on two 
different lines extend to the right border of the window.  This has 
changed in Emacs 27, and now the default is that overlays extend only one 
character position after the last character of the line.  The previous 
behavior can be obtained with the ":extend t" face attribute.  I agree 
that the earlier behavior was not optimal, but I think the current 
behavior with its staircase aspect is not optimal either.

I think a third way to display overlays would make sense, and would be 
better than the earlier and current defaults.  Let's name this attribute 
":visualblock".  It would produce the following result:

1. calculate the overlay it it would have been displayed by Emacs 21-26.

2. remove all pixel columns on the right *and on the left* of the overlay 
which have no "content" (that is, no characters on the right, and 
whitespace characters on the left).

With this, on overlay on, for example, a block of code between () or {} 
would be displayed on the screen as a block.  The above "algorithm" works 
with fixed and variable-width fonts, but could be made more efficient for 
fixed-width fonts.

Gregory





^ permalink raw reply	[flat|nested] 25+ messages in thread
* bug#42307: Feature request: Visual block attribute for overlays
@ 2020-07-10  8:24 Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-07-10 14:56 ` Drew Adams
  0 siblings, 1 reply; 25+ messages in thread
From: Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-07-10  8:24 UTC (permalink / raw)
  To: 42307

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]


In Emacs 21 to 26, overlays between two points in the buffer on two 
different lines extend to the right border of the window.  This has 
changed in Emacs 27, and now the default is that overlays extend only one 
character position after the last character of the line.  The previous 
behavior can be obtained with the ":extend t" face attribute. I agree that 
the earlier behavior was not optimal, but I think the current behavior 
with its staircase aspect is (at least for some cases) not optimal either.

I think a third way to display overlays would make sense, and would be 
better than the earlier and current defaults.  Let's name this attribute 
":visualblock".  It would produce the following result:

1. calculate the overlay as it would have been displayed by Emacs 21-26.

2. remove all pixel columns on the right *and on the left* of the overlay 
which have no "content" (that is, no characters on the right, and 
whitespace characters on the left).

With this, on overlay on, for example, a block of code between () or {} 
would be displayed on the screen as a block.  The above "algorithm" works 
with fixed and variable-width fonts, but could be made more efficient for 
fixed-width fonts.

To give an example of what I mean, I attach three pictures, taken with 
(show-paren-mode) and (setq show-paren-style 'expression), showing 
respectively the earlier default, the current default, and the proposed 
"visualblock" feature.

Gregory

[-- Attachment #2: Type: image/png, Size: 210270 bytes --]

[-- Attachment #3: Type: image/png, Size: 210486 bytes --]

[-- Attachment #4: Type: image/png, Size: 210558 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-07-14 17:20 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 17:19 bug#42347: Feature request: Visual block attribute for overlays 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
  -- strict thread matches above, loose matches on Subject: below --
2020-07-10  8:24 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
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

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.