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 09:42:32 -0700 (PDT) Message-ID: References: <21c81ecf-75d7-47d7-9b10-d2050769f6e3@default> 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="6575"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42307@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 10 18:43:11 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 1jtw7B-0001YM-WA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jul 2020 18:43:10 +0200 Original-Received: from localhost ([::1]:57372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtw7B-0004Ve-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jul 2020 12:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtw74-0004VE-FC for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 12:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60006) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtw74-00013J-6o for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 12:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtw74-0007gb-3m for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2020 12:43:02 -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 16:43: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.159439936929526 (code B ref 42307); Fri, 10 Jul 2020 16:43:02 +0000 Original-Received: (at 42307) by debbugs.gnu.org; 10 Jul 2020 16:42:49 +0000 Original-Received: from localhost ([127.0.0.1]:43319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtw6q-0007gA-Ux for submit@debbugs.gnu.org; Fri, 10 Jul 2020 12:42:49 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:49306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtw6o-0007fv-59 for 42307@debbugs.gnu.org; Fri, 10 Jul 2020 12:42:47 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06AGaqk5059506; Fri, 10 Jul 2020 16:42:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=CakPCuIHwmqSnxJ7ypn5q6HFSkECThrY4xW2NMPk7F8=; b=UGiS24F53q9RpKuleU72aBt8u0pPfIpd4D1ycoXNxiNogCO9LK0/f2iVtTIcXBkEUCFJ jRpZsvJ3L+SYZO3gq8xU5X/Cq9MXeq0EI1QM3RL5JDKVPp4FdjT/IFft+M1zyB5TWUG/ RUqxHOsV6tlLuMqOs7vn7GFQxuiQzOV1U4lcp+n4iBr13FORIxapAPHt8NRMFGZvQSow mBzEHE/g5H0B15naqu3egn41zXko8zM133yaiGo5CY2yX8DHAmH53gEXKffCtZlpXo80 fILuAY8Xnzm7sSTzbRJHPQS3kvVOl+NlgqAOAasZzsId1Zh6viXmkNgkDcd/oA3cU0KU 2g== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 325y0arjd2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 10 Jul 2020 16:42:40 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06AGdOuj105449; Fri, 10 Jul 2020 16:42:40 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 325k3kmk4t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jul 2020 16:42:40 +0000 Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06AGgXFA001217; Fri, 10 Jul 2020 16:42:33 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 adultscore=0 bulkscore=0 mlxscore=0 spamscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100111 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9678 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 malwarescore=0 clxscore=1015 impostorscore=0 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100111 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:182897 Archived-At: > > What if `overlay-start' were on the `u', instead of the `i', >=20 > 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? >=20 > 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. > > >=20 > 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). > > >=20 > Indeed. Yet another possibility would be cover only > non-whitespace chars. Let's name this one "visiblechars". >=20 > > In any case, whatever the choices we offer, Elisp should > > make it simple to choose any of them. > > >=20 > Yes ;-) My personal preference order among the possible choices is: >=20 > 1. visualblock > 2. the previous default > 3. visiblechars > 4. the current default > 5. visualrectangle