From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc. Date: Sun, 20 Mar 2022 10:38:48 +0100 Message-ID: <87sfrd2cbb.fsf@gmail.com> References: <87sftyweb2.fsf@gmail.com> <861r1iyrvw.fsf@mail.linkov.net> <87zgo6owaf.fsf@gmail.com> <86k0f9xnrn.fsf@mail.linkov.net> <87tuedp6pl.fsf@gmail.com> <861r1g7n3b.fsf@mail.linkov.net> <87o84jcx5x.fsf@gmail.com> <8635lvif0r.fsf@mail.linkov.net> <87mtidip1w.fsf@gmail.com> <86zglrl4gq.fsf@mail.linkov.net> <87ee32yk7v.fsf@gmail.com> <861qz1zqfb.fsf@mail.linkov.net> <875yod1wyb.fsf@gmail.com> <86mtho5y56.fsf@mail.linkov.net> <87sfrgz979.fsf@gmail.com> <861qz0475w.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34150"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 53126@debbugs.gnu.org, Dmitry Gutov To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 20 10:39:11 2022 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 1nVs1n-0008el-3i for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 10:39:11 +0100 Original-Received: from localhost ([::1]:59122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVs1l-0003Vw-Ip for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 05:39:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVs1e-0003Vn-Fg for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 05:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVs1e-0007WW-77 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 05:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVs1e-0007k6-37 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 05:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Mar 2022 09:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 53126-submit@debbugs.gnu.org id=B53126.164776913829751 (code B ref 53126); Sun, 20 Mar 2022 09:39:02 +0000 Original-Received: (at 53126) by debbugs.gnu.org; 20 Mar 2022 09:38:58 +0000 Original-Received: from localhost ([127.0.0.1]:32829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVs1a-0007jn-DL for submit@debbugs.gnu.org; Sun, 20 Mar 2022 05:38:58 -0400 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:41874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVs1Y-0007jX-KQ for 53126@debbugs.gnu.org; Sun, 20 Mar 2022 05:38:57 -0400 Original-Received: by mail-ej1-f53.google.com with SMTP id a8so24649295ejc.8 for <53126@debbugs.gnu.org>; Sun, 20 Mar 2022 02:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=R55TZgkh7P0FokMLgWb7rPIPF31lJrCTAWscRUw0xxM=; b=EN5iXngoGQh0aCaIPdOqoRPhiCok7RwA+DUjybonwdQMLVwM1wgt54PUeCz0Gz5mdt 4KlOHT1qaHg74b3j/A16D3HzV1iVgeK3UNGOhxN6EvKcBiiuGykYc/ADvg3R9TSHsJe3 PtGKYSetWRcoPUPUQlg6ctjijTlFPoWa0xIu39uTknJClGu/+svQ4MJCffxQhy7r14qk 8GEB1F0syPNLRMs+1a5b1jxHYOruz4wD4ExgWjTCcX0JYlO5WwKkP1ndJm0A/qicZeMe 4vFVd5SbMYMOLXUQl+IHf3kdGvqYPSFUpQO6UtguP3X9SmcQJd3QgDHuwjpjEpIrY0XD 77Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=R55TZgkh7P0FokMLgWb7rPIPF31lJrCTAWscRUw0xxM=; b=0tuUWa1HZWYPRddgCq12lqJgoUUBkJBwxiF9K+/R8aQRA7Kt6r7qbBcGFEpTvYDE9d dpRCZiCVCq+4yE9fAHgj1OUELv3pk3Fg6CrXGxqZq+29Zs466BIhUdII4mRWZNfL5GMc C4xWfB/SHuzoGcUIFyllGN20DS+xeTsVxoNRkoNr3VEtkJGbi6Py50dkwEs+oUXNuT5x wQ7p6amAd/LU9PfHHKuVGVz7wLz/4Mgm+hJZv7Ertyse/5QGgGp7+0ZypT9T7TrWPLci zuRH+UAg79G/zWiTKeIOSOFyf8G9n7zfq38WTTBp2XGxcmLL7KZuPhKcIUJ9OFMNw7sP nWYw== X-Gm-Message-State: AOAM530LTwMDSOUw1MJa82QdjjPQvKh53RyHsXvCrbvDcv41FIxVHHqO 0t1pdvnQ8Na6bFOU8ej5uEg= X-Google-Smtp-Source: ABdhPJz1gx0OH29tkcZeXsYmAMumNOSBqlIZZWPBoB6AfmlGzVEB8eduzTzOS1FPCuI0DMe5dojalg== X-Received: by 2002:a17:907:7b9d:b0:6df:fb8f:fe82 with SMTP id ne29-20020a1709077b9d00b006dffb8ffe82mr1439536ejc.652.1647769130487; Sun, 20 Mar 2022 02:38:50 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::758e]) by smtp.gmail.com with ESMTPSA id sh42-20020a1709076eaa00b006df78692a9csm5675051ejc.94.2022.03.20.02.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Mar 2022 02:38:49 -0700 (PDT) In-Reply-To: <861qz0475w.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 17 Mar 2022 22:40:19 +0200") 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:228614 Archived-At: On Thu, 17 Mar 2022 at 22:40, Juri Linkov wrote: > This means dozens of new options for every possible command that uses > the minibuffer: occur-lazy-highlight, keep-lines-lazy-highlight, > flush-lines-lazy-highlight, kill-matching-lines-lazy-highlight, > copy-matching-lines-lazy-highlight, how-many-lazy-highlight, ... I'm experimenting with adding lazy-highlight directly into `read-regexp', controlled by a new option `read-regexp-lazy-highlight', which, preferably, would be t by default. Thus, in particular, all the above commands would get lazy-highlight by default. At first this felt somewhat intrusive, and third-party code might require adaptation. The advantage is that the said adaptation is very easy. Namely, a package author would have three options: - Do nothing. Then read-regexp will have lazy highlighting as dictated by read-regexp-lazy-highlight. - If lazy-highlighting makes no sense at all in a given context, then let-bind read-regexp-lazy-highlight to nil. - If customizability is desired, define `package-X-lazy-highlight' and let-bind read-regexp-lazy-highlighting to that. What do you think? (This is probably also the approach with the minimal number of additional code/changed lines, which seems to be desirable.) Dmitry -- I've CC'ed you because I noticed project.el makes a bunch of calls to read-regexp, and also a call query-replace-read-args at one point. To summarize the story here: would you like to have lazy highlight and lazy count (in =E2=80=9Canzu=E2=80=9D style) while reading re= gexps and query-replace arguments in package.el? How fine-grained would you like the user options to be here, and what should the defaults be?