[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39121: 27.0.60; occur: Add bindings for next-error-no-select
From: |
Juri Linkov |
Subject: |
bug#39121: 27.0.60; occur: Add bindings for next-error-no-select |
Date: |
Fri, 16 Jul 2021 01:10:44 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> 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.
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select,
Juri Linkov <=
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Mattias Engdegård, 2021/07/16
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Mattias Engdegård, 2021/07/23
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Lars Ingebrigtsen, 2021/07/23
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Mattias Engdegård, 2021/07/23
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Lars Ingebrigtsen, 2021/07/24
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Mattias Engdegård, 2021/07/24
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Lars Ingebrigtsen, 2021/07/25
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Eli Zaretskii, 2021/07/25
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Mattias Engdegård, 2021/07/25
- bug#39121: 27.0.60; occur: Add bindings for next-error-no-select, Basil L. Contovounesios, 2021/07/25