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#42307: Feature request: Visual block attribute for overlays Date: Fri, 10 Jul 2020 16:02:52 +0000 Message-ID: References: <21c81ecf-75d7-47d7-9b10-d2050769f6e3@default> 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="8675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.21 (NEB 202 2017-01-01) Cc: 42307@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 10 18:25:57 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 1jtvqX-00029C-0C for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jul 2020 18:25:57 +0200 Original-Received: from localhost ([::1]:42050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtvqV-00007F-T5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jul 2020 12:25:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtvjq-0003F4-HR for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 12:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtvjq-0005dU-6J for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 12:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtvjq-00077V-2E for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 12:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jul 2020 16:19:02 +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.159439791427338 (code B ref 42307); Fri, 10 Jul 2020 16:19:02 +0000 Original-Received: (at 42307) by debbugs.gnu.org; 10 Jul 2020 16:18:34 +0000 Original-Received: from localhost ([127.0.0.1]:43309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvjN-00076q-2W for submit@debbugs.gnu.org; Fri, 10 Jul 2020 12:18:34 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:55780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvUL-0006kp-4s for 42307@debbugs.gnu.org; Fri, 10 Jul 2020 12:03:03 -0400 Original-Received: from sdf.org (IDENT:ghe@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 06AG2wVu027324 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 10 Jul 2020 16:02:59 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 06AG2wrO002105; Fri, 10 Jul 2020 16:02:58 GMT In-Reply-To: <21c81ecf-75d7-47d7-9b10-d2050769f6e3@default> X-Mailman-Approved-At: Fri, 10 Jul 2020 12:18:31 -0400 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:182896 Archived-At: Thanks for your feedback! > > 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', > Actually it starts on the '(', the opening parenthesis is green if you look close enough. > > 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". > > 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. > 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. > > 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 Gregory