unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 39121@debbugs.gnu.org, Tino Calancha <tino.calancha@gmail.com>
Subject: bug#39121: 27.0.60; occur: Add bindings for  next-error-no-select
Date: Fri, 16 Jul 2021 01:10:44 +0300	[thread overview]
Message-ID: <87r1fzi7c3.fsf@mail.linkov.net> (raw)
In-Reply-To: <CD8A4158-1AD5-4997-8F36-8F8E7DF9BD32@acm.org> ("Mattias Engdegård"'s message of "Thu, 15 Jul 2021 18:31:20 +0200")

> Sorry about stirring in this pile again, but it looks like there is
> unfinished business with respect to `occur-highlight-regexp`
> introduced by this patch:
>
> +(defvar occur-highlight-regexp t
> +  "Regexp matching part of visited source lines to highlight temporarily.
> +Highlight entire line if t; don't highlight source lines if nil.")
>
> Are the t and nil cases really handled? As far as I can tell:
>
> - `occur-mode-goto-occurrence` and `occur-mode-display-occurrence`
>    both crash if `occur-highlight-regexp` isn't a string
> - `occur--highlight-occurrence` does not distinguish t from nil
> - `occur--highlight-occurrence` is only called from the two other (crashing) functions
>
> This was discovered when using an external package that uses
> occur-mode for their own purposes and don't actually have a regexp to
> match (only start and end markers).
>
> Since `occur-highlight-regexp` appears to serve an internal purpose only,
> perhaps we can use some other method to get at the text to highlight?

It seems `compilation-highlight-regexp` was supposed to duplicate the logic
of the existing variable `compilation-highlight-regexp` that is t by default.
But I see such conditions `(stringp highlight-regexp)` in `compilation-goto-locus`,
so maybe 'occur' needs to do the same.





       reply	other threads:[~2021-07-15 22:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CD8A4158-1AD5-4997-8F36-8F8E7DF9BD32@acm.org>
2021-07-15 22:10 ` Juri Linkov [this message]
2021-07-16 13:20   ` bug#39121: 27.0.60; occur: Add bindings for next-error-no-select Mattias Engdegård
2021-07-23 13:32   ` Mattias Engdegård
2021-07-23 14:05     ` Lars Ingebrigtsen
2021-07-23 17:16       ` Mattias Engdegård
2021-07-24 11:46         ` Lars Ingebrigtsen
2021-07-24 17:29           ` Mattias Engdegård
2021-07-25  6:41             ` Lars Ingebrigtsen
2021-07-25  9:16               ` Eli Zaretskii
2021-07-25 10:55                 ` Mattias Engdegård
2021-07-25 11:39                   ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-25 14:45                     ` Mattias Engdegård
2021-07-25 11:49                   ` Eli Zaretskii
2021-07-25 15:09                     ` Mattias Engdegård
2021-07-25 16:27                       ` Eli Zaretskii
2021-07-25 18:54                         ` Mattias Engdegård
2021-07-25 19:23                           ` Eli Zaretskii
2021-07-25 19:30                             ` Mattias Engdegård
2021-07-26 12:43                               ` Eli Zaretskii
2021-07-25 10:06               ` Mattias Engdegård
2020-01-13 20:51 Tino Calancha

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=87r1fzi7c3.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=39121@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    --cc=tino.calancha@gmail.com \
    /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).