From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#42307: Feature request: Visual block attribute for overlays Date: Fri, 10 Jul 2020 07:56:25 -0700 (PDT) Message-ID: <21c81ecf-75d7-47d7-9b10-d2050769f6e3@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6336"; mail-complaints-to="usenet@ciao.gmane.io" To: Gregory Heytings , 42307@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 10 16:57:10 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 1jtuSc-0001Wu-Bp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jul 2020 16:57:10 +0200 Original-Received: from localhost ([::1]:40060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtuSa-0003Jg-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jul 2020 10:57:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtuSU-0003IN-0A for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 10:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtuST-0000FE-Mx for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 10:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtuST-00059c-KI for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 10:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jul 2020 14:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42307 X-GNU-PR-Package: emacs Original-Received: via spool by 42307-submit@debbugs.gnu.org id=B42307.159439300319787 (code B ref 42307); Fri, 10 Jul 2020 14:57:01 +0000 Original-Received: (at 42307) by debbugs.gnu.org; 10 Jul 2020 14:56:43 +0000 Original-Received: from localhost ([127.0.0.1]:43219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtuSA-000594-NE for submit@debbugs.gnu.org; Fri, 10 Jul 2020 10:56:42 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:34478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtuS6-00058m-5E for 42307@debbugs.gnu.org; Fri, 10 Jul 2020 10:56:41 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06AEqaU3086388; Fri, 10 Jul 2020 14:56:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=N6hVBlPw6KKR4KZcBlsBiRVpP/yW0qToUEU+3izNR/k=; b=Bk8f9uKcwWQunmph/V1eWlL7WBt0JUSt6ar3+jpS1EhUvUmJvFWsoDTxCWdJ0aeMyhNZ zb8+fknToKMRLOzSM4rDHK/MwhBsnz5TXNYC1g51GpgXxGxyNxRVG9yD5D10FZNSz5ms RJ3ukcQjWC7xLiToM0dBKrf/Njyt72tY8c5Gy8RKN8Nux3mnPwxvnLbrxEwmkAI0JJzK nUT0hKCorCCgMpZ6qRHWP+RGQkMHttBTOBHASqYGcUYOl5m/UtQ/RFefMM+OPVFda5I8 Lkf3H7GvZIqHsG4qzE7ULavRe2qqbywuqeWjRZc/2eqkXXaC+hNYeSjis8l0GSn50DKL 4A== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 325y0aqy0k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 10 Jul 2020 14:56:32 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06AEseeP028532; Fri, 10 Jul 2020 14:56:31 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 325k42jw6m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jul 2020 14:56:31 +0000 Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 06AEuQq7028855; Fri, 10 Jul 2020 14:56:30 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9678 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100104 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9678 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100104 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:182892 Archived-At: > 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". ... > > 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. >=20 > 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. Interesting. Thanks for the images, in particular. I agree that each of the 3 is useful, and they all should be available. Looking only at the images, I have this question about your "visual block" coverage: What if `overlay-start' were on the `u', instead of the `i', 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? 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, it would the highlighting of the last line would be extended to the same column as that of the other lines. 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). In any case, whatever the choices we offer, Elisp should make it simple to choose any of them.