Skip to content

verilog-mode breaks ag-mode jump-to-occurrence. aka sharing compilation-mode-hook is perilous #175

@DanielG

Description

@DanielG

Hi,

I've had the problem that jump-to-occurrence from the ag-mode buffer would stop working randomly. I've finally been able to track down the offender: verilog-mode.

The failure mode is as follows: verilog-mode (after autoload) adds a compilation-mode-hook, which ag-mode seems to run as well since it's a compilation derived mode. This hook (verilog-error-regexp-add-emacs) then goes on to add regexes to compilation-error-regexp-alist and compilation-error-regexp-alist-alist.

Problem is compilation-mode-hook appears to runs in buffer local context so this gets added to ag-mode's internal regexp-alists too! These new rexexps then seem to take precedence over ag's breaking the special handling done to find the File: prefix in --group mode.

Emacs 28.2 (Debian), ag 2.2.0.

--Daniel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions