From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#42347: Feature request: Visual block attribute for overlays Date: Wed, 8 Jul 2020 19:19:05 +0200 (CEST) Message-ID: Reply-To: Gregory Heytings Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12732"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.21 (NEB 202 2017-01-01) To: 42347@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 14 02:52:22 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jv9BF-0003Bx-7P for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Jul 2020 02:52:21 +0200 Original-Received: from localhost ([::1]:46732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jv9BE-00052b-2m for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Jul 2020 20:52:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv9Aw-0004zj-6v for bug-gnu-emacs@gnu.org; Mon, 13 Jul 2020 20:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jv9Av-0001Av-Sr for bug-gnu-emacs@gnu.org; Mon, 13 Jul 2020 20:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jv9Av-00016L-Q6 for bug-gnu-emacs@gnu.org; Mon, 13 Jul 2020 20:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jul 2020 00:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42347 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15946878924194 (code B ref -1); Tue, 14 Jul 2020 00:52:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jul 2020 00:51:32 +0000 Original-Received: from localhost ([127.0.0.1]:49652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jv9AS-00015a-5p for submit@debbugs.gnu.org; Mon, 13 Jul 2020 20:51:32 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jv9AO-00015Q-Fm for submit@debbugs.gnu.org; Mon, 13 Jul 2020 20:51:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv9AO-0004OV-7V for bug-gnu-emacs@gnu.org; Mon, 13 Jul 2020 20:51:28 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:62033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv9AM-00018X-BK for bug-gnu-emacs@gnu.org; Mon, 13 Jul 2020 20:51:27 -0400 Original-Received: from sdf.org (IDENT:smmsp@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 06E0p7SC021576 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 14 Jul 2020 00:51:12 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 068HJALk024374; Wed, 8 Jul 2020 17:19:10 GMT Received-SPF: pass client-ip=205.166.94.24; envelope-from=ghe@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/13 20:51:24 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182973 Archived-At: 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