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#6227: Color isearch regexp submatches differently Date: Sun, 20 Sep 2020 21:49:26 -0700 (PDT) Message-ID: References: <> <<87bpca15ja.fsf@mail.jurta.org>> <> <<87wruv1ohr.fsf@mail.jurta.org>> <> <<877hmvtn9t.fsf@mail.jurta.org>> <> <<874ohyppfs.fsf@mail.jurta.org>> <> <> <<8739ww1tjp.fsf@mail.jurta.org>> <> <<87d3vyaodq.fsf@mail.jurta.org>> <<87hbla4nl4.fsf@mail.jurta.org>> <<87mu1llak3.fsf@gnus.org>> <<83lfh50zxa.fsf@gnu.org>> <<87eemwss3t.fsf@gnus.org>> <<834kns22q2.fsf@gnu.org>> <<87sgbcrcgd.fsf@gnus.org>> <<874knso90e.fsf@gnus.org>> <<83pn6gzg3j.fsf@gnu.org>> <<87363ckza5.fsf@gnus.org>> <<835z87zx16.fsf@gnu.org>> 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="37623"; mail-complaints-to="usenet@ciao.gmane.io" Cc: lennart.borgman@gmail.com, 6227@debbugs.gnu.org To: Eli Zaretskii , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 21 06:50:09 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 1kKDmD-0009fd-Dv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Sep 2020 06:50:09 +0200 Original-Received: from localhost ([::1]:55836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKDmC-0003pk-2j for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Sep 2020 00:50:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKDm6-0003pd-4Z for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 00:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKDm5-0000h9-RR for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 00:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKDm5-0004Kz-Og for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 00:50: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: Mon, 21 Sep 2020 04:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6227 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 6227-submit@debbugs.gnu.org id=B6227.160066377916637 (code B ref 6227); Mon, 21 Sep 2020 04:50:01 +0000 Original-Received: (at 6227) by debbugs.gnu.org; 21 Sep 2020 04:49:39 +0000 Original-Received: from localhost ([127.0.0.1]:53103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKDlj-0004KH-IW for submit@debbugs.gnu.org; Mon, 21 Sep 2020 00:49:39 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:36986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKDlf-0004K0-9F for 6227@debbugs.gnu.org; Mon, 21 Sep 2020 00:49:38 -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 08L4ir66172865; Mon, 21 Sep 2020 04:49:29 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=+jAGOFGZMHhPOWVsNm1RigIj9vURDCe3lQeRrBxVnO8=; b=oCNGO/0O2TT32Z0RXePVpOAbz9YXsRvknWKx3KdXfrkVUc5eWBSkygNVRycwcEIJFGQl kDQBO1pTi5K0sHzuCHnc2+6/svluQVHtw3QQUkL78vhGF2acQA53v7Ru7y/cSxC8k0UF 90j4I5WnqYPIzBVL0MzGz4O1Un1sIvnNQeNnYnyIY7sScpf8T9WdHGtke7aUxhC9nlVN ilSwmLeABswvmqpGk97YJ0uL+cL4uZjkmfwdA6w2I/C3ID0fQx7T0+9gVZ6mQkjOI6PC rwqZp2Zp7YpOelApqLP+tenXhtGruDa1YokSvs2bEqt2FySnz/+v9hTS7zlInMCwXdx0 qw== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 33ndnu345b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 21 Sep 2020 04:49:29 +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 08L4jI8Z002153; Mon, 21 Sep 2020 04:49:28 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 33nuwvc0wf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 21 Sep 2020 04:49:28 +0000 Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08L4nRiG003732; Mon, 21 Sep 2020 04:49:27 GMT In-Reply-To: <<835z87zx16.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9750 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 adultscore=0 bulkscore=0 mlxlogscore=968 phishscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009210036 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9750 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 clxscore=1015 impostorscore=0 mlxlogscore=972 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009210036 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:188553 Archived-At: > > I'd rather go the other way, to be honest -- just leave group-1 to -3, > > perhaps. I think it's rather unusual to have a that many sub-groups > > interactively... >=20 > That's true, but the problem which bothers me is that customizing > search-highlight-submatches alone to a larger value is not enough. I > don't think any other customization we have requires users to create > faces or similar objects. FWIW, the option in Isearch+ is just a boolean, not a max number of levels/groups. I use it for both Isearch and `replace-highlight'. The use cases are only interactive, AFAICimagine, and I don't imagine (and haven't seen) any need for lots of levels. I use 8 levels, and that's already a lot. As for the relation between your max # groups and faces: if you really want to let users change the max # (not needed, I think), you can just have a fixed number of faces and recycle them. You don't have to imagine that users will need to both (1) increase `search-highlight-submatches' and (2) create corresponding new faces for the additional groups to be matched. It's pretty clear which level is involved if the same color is used for, say, level 2 and level 10. I mentioned this recycling possibility earlier, saying that I considered going through the 1-8 faces I have and then going through them again, for groups 9-18, and again,... But I've never seen any need for that. Your design sounds like overkill, if the intention is just interactive use. Just a suggestion. Also, your option name should have "max" in it, I think. And if you use it only for Isearch, then maybe use "isearch", not "search" in the name.