From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#18241: 24.4.50; [PATCH] I can now highlight-lines-matching-regexp from isearch Date: Mon, 01 Jul 2019 00:12:47 +0300 Organization: LINKOV.NET Message-ID: <87o92epvs0.fsf@mail.linkov.net> References: <87sil4uhlw.fsf@secretsauce.net> <87a7e55l3b.fsf@shorty.i-did-not-set--mail-host-address--so-tickle-me> <87d0ixaawv.fsf@mail.linkov.net> <87blyfvtdb.fsf@secretsauce.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215473"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 18241@debbugs.gnu.org, Lars Ingebrigtsen To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 01 00:16:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hhi7N-000tuy-UU for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jul 2019 00:16:18 +0200 Original-Received: from localhost ([::1]:46756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhi7M-0000bu-HI for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Jun 2019 18:16:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52173) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhi7D-0000bd-2n for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhi79-0002ar-Jd for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33899) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhi79-0002aG-49 for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hhi78-00040C-VE for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2019 22:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18241 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18241-submit@debbugs.gnu.org id=B18241.156193295315351 (code B ref 18241); Sun, 30 Jun 2019 22:16:02 +0000 Original-Received: (at 18241) by debbugs.gnu.org; 30 Jun 2019 22:15:53 +0000 Original-Received: from localhost ([127.0.0.1]:47442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhi6z-0003zX-0r for submit@debbugs.gnu.org; Sun, 30 Jun 2019 18:15:53 -0400 Original-Received: from black.elm.relay.mailchannels.net ([23.83.212.19]:52222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhi6x-0003zO-82 for 18241@debbugs.gnu.org; Sun, 30 Jun 2019 18:15:51 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0E7E56A1BBD; Sun, 30 Jun 2019 22:15:50 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (100-96-85-75.trex.outbound.svc.cluster.local [100.96.85.75]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8C5E96A0300; Sun, 30 Jun 2019 22:15:49 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Sun, 30 Jun 2019 22:15:50 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Tasty-Left: 6e9be2d6007a55a8_1561932949897_526184775 X-MC-Loop-Signature: 1561932949897:2561019342 X-MC-Ingress-Time: 1561932949897 Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTP id 6026183DFD; Sun, 30 Jun 2019 15:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=0P7TSp/eOFXqsIV3SYWwHUnvZkY=; b= DxypXHRP646nBbgIysAqr63n4osEztR/cx9bd8C+uFS8K7AiC1knqZK43wg4SmfU 9rTlFWR1QQttcDOLLWw2H5CIwYwJ0S9ZSKQPXIz0PdHesg8DtELrYYcV22kw3p8+ JbCMRIPqXxvc/eeQGnN4mEbJu0m3WSwQdbr5kwrLZwI= Original-Received: from mail.jurta.org (m91-129-109-60.cust.tele2.ee [91.129.109.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTPSA id 6CD9B83DFC; Sun, 30 Jun 2019 15:15:41 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a17 In-Reply-To: <87blyfvtdb.fsf@secretsauce.net> (Dima Kogan's message of "Sun, 30 Jun 2019 11:08:16 -0700") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrvdehgddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledriedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledriedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughimhgrsehsvggtrhgvthhsrghutggvrdhnvghtnecuvehluhhsthgvrhfuihiivgepvd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161913 Archived-At: > Given that 'M-s h r' is handled specially in isearch already, it only > makes sense that 'M-s h l' would be too. And there's no down side to > supporting this at all. Yes, it makes sense to do the same that 'M-s h r' already does. > I'm attaching a new patch. It does away with the weird macro thing I was > doing (don't know why I was doing that), and adds notes in the NEWS and > the documentation. Thanks, indeed better to avoid macros: we have 2 macros in isearch, and they are more of a hindrance than a help especially during development. > +@kindex M-s h l @r{(Incremental Search)} > +@findex isearch-highlight-lines-matching-regexp > + Similarly, you can exit the search while highlighting whole lines > +containing matches of the last search string. To this end, type > +@kbd{M-s h l} (@code{isearch-highlight-lines-matching-regexp}), which > +will run @code{highlight-lines-matching-regexp} (@pxref{Highlight > +Interactively}) passing it the regexp derived from the last search > +string and prompting you for the face to use for highlighting. To > +remove the highlighting, type @kbd{M-s h u} (@code{unhighlight-regexp}). Maybe it's possible to make the text shorter by just adding a new sentence about 'M-s h l' to the middle of the paragraph that describes 'M-s h r'? > -(defun isearch-highlight-regexp () > +(defun isearch--highlight-regexp-or-lines-internal (hi-lock-func) The suffix '-internal' is not necessary here because the double dash in 'isearch--' implies that the function is internal.