unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Dima Kogan <dima@secretsauce.net>
Cc: 18241@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
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	[thread overview]
Message-ID: <87o92epvs0.fsf@mail.linkov.net> (raw)
In-Reply-To: <87blyfvtdb.fsf@secretsauce.net> (Dima Kogan's message of "Sun, 30 Jun 2019 11:08:16 -0700")

> 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.





  reply	other threads:[~2019-06-30 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-10 22:04 bug#18241: 24.4.50; [PATCH] I can now highlight-lines-matching-regexp from isearch Dima Kogan
2019-06-25 22:32 ` Lars Ingebrigtsen
2019-06-25 22:58   ` Dima Kogan
2019-06-26 13:49     ` Lars Ingebrigtsen
2019-06-28 19:12       ` Juri Linkov
2019-06-30 18:08         ` Dima Kogan
2019-06-30 21:12           ` Juri Linkov [this message]
2019-07-01  3:09             ` Dima Kogan
2019-07-01 14:08               ` Eli Zaretskii
2019-07-04  1:31                 ` Dima Kogan
2019-07-13  7:22                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o92epvs0.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=18241@debbugs.gnu.org \
    --cc=dima@secretsauce.net \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).