Subject: bug#62095: 30.0.50; Compilation wrong error match

From: Ergus <[email-masked]>
Date: Fri, 10 Mar 2023 14:31:23 +0100

Hi:

Using the compilation buffer I get a pattern highlighted but it is not
an error.

I would like to know which of the patterns in
compilation-error-regexp-alist-alist matched this.

This is the line that matches:

```
C:\Program Files (x86)\link.exe /ERRORREPORT:QUEUE /OUT:"E:\Repository.dll" /INCREMENTAL /NOLOGO "C:\Users\somefile.lib" user32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK /PDB:"somefile.pdb" /SUBSYSTEM:CONSOLE /LARGEADDRESSAWARE /OPT:NOREF /OPT:NOICF /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"somefile" /MACHINE:X86 /SAFESEH:NO /machine:X86 /DLL
```

The highlight goes from the beginning of the line up to /TLBID:1

And I think that compile-mode gets confused by the `/ERRORREPORT + something:1`.

If there is some function to find the pattern matching and help on this,
please just tell me and I will try to fix it myself. I tried a loop more
or less like:

(dolist (var compilation-error-regexp-alist)
     (re-search-forward (car (alist-get var compilation-error-regexp-alist-alist)) nil t))

But it does not match with any pattern, so... no idea

In GNU Emacs 30.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.17.8) of 2023-03-06 built on Ergus
Repository revision: 1e5393a57a3bbe3f9167fee59232c2e424afadf2
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
 --with-x-toolkit=gtk3 --with-xft --with-modules --with-cairo
 --with-harfbuzz --with-native-compilation
 '--program-transform-name=s/^ctags$/ctags.emacs/''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-auto-revert-mode: t
  electric-pair-mode: t
  flyspell-mode: t
  company-mode: t
  flycheck-mode: t
  diff-hl-margin-mode: t
  gtags-mode: t
  repeat-mode: t
  xterm-mouse-mode: t
  xclip-mode: t
  override-global-mode: t
  winner-mode: t
  save-place-mode: t
  delete-selection-mode: t
  savehist-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  which-key-mode: t
  eldoc-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/mnt/casa/gits/emacs_clones/gtags-mode/gtags-mode hides /home/ergo/.config/emacs/elpa/gtags-mode-1.0/gtags-mode
/home/ergo/.config/emacs/elpa/transient-20230304.1149/transient hides /home/ergo/.local/share/emacs/30.0.50/lisp/transient

Features:
(shadow sort mail-extr autorevert filenotify ffap thingatpt url-parse
auth-source url-vars emacsbug message mailcap yank-media puny rfc822 mml
mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils elec-pair flyspell-correct
flyspell ispell company-semantic company-template company-capf company
flycheck ansi-color json map find-func dash pcase diff-hl-margin
diff-hl-dired citre-lang-fileref citre-tags citre-ctags citre-readtags
citre-readtags-tables citre-backend-interface citre-ui-peek color
citre-ui-jump citre-common-tag citre-common-util dired-x dired
dired-loaddefs diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher
diff-mode cape compat comp comp-cstr warnings icons rx gtags-mode subr-x
files-x xref project term/tmux term/xterm xterm init repeat xt-mouse
xclip edmacro kmacro use-package-bind-key bind-key simple-16-theme
winner ring saveplace delsel savehist easy-mmode
display-fill-column-indicator display-line-numbers diminish which-key
cl-extra help-mode use-package-diminish use-package-core disp-table info
dumb-jump-autoloads highlight-indent-guides-autoloads
company-lua-autoloads vundo-autoloads sudo-edit-autoloads
cuda-mode-autoloads nginx-mode-autoloads crdt-autoloads
company-auctex-autoloads groovy-mode-autoloads flycheck-rust-autoloads
string-inflection-autoloads company-c-headers-autoloads
tree-sitter-autoloads lice-autoloads lorem-ipsum-autoloads
julia-mode-autoloads auctex-autoloads tex-site nasm-mode-autoloads
popup-autoloads cape-autoloads company-nginx-autoloads
csv-mode-autoloads d-mode-autoloads tsc-autoloads
i3wm-config-mode-autoloads ssh-config-mode-autoloads move-dup-autoloads
clang-format-autoloads citre-autoloads esup-autoloads slime-autoloads
phi-search-autoloads better-shell-autoloads markdown-mode-autoloads
gnuplot-autoloads arduino-cli-mode-autoloads flycheck-julia-autoloads
which-key-autoloads multiple-cursors-autoloads ibuffer-sidebar-autoloads
systemd-autoloads pkgbuild-mode-autoloads neotree-autoloads
modern-cpp-font-lock-autoloads company-reftex-autoloads
company-autoloads google-c-style-autoloads protobuf-mode-autoloads
flymake-nasm-autoloads caml-autoloads arduino-mode-autoloads ede/auto
eieio-base cl-seq eieio byte-opt bytecomp byte-compile eieio-core
cl-macs gv cl-loaddefs cl-lib sphinx-mode-autoloads f-autoloads
lua-mode-autoloads gtags-mode-autoloads mutt-mode-autoloads
evil-collection-autoloads annalist-autoloads evil-autoloads
goto-chg-autoloads xclip-autoloads diminish-autoloads
imenu-list-autoloads paradox-autoloads magit-autoloads
git-commit-autoloads with-editor-autoloads avy-zap-autoloads
nftables-mode-autoloads deadgrep-autoloads spinner-autoloads s-autoloads
ibuffer-vc-autoloads shell-command+-autoloads objed-autoloads
iedit-autoloads languagetool-autoloads vterm-toggle-autoloads
vterm-autoloads magit-section-autoloads avy-autoloads
git-timemachine-autoloads transient-autoloads haskell-mode-autoloads
diff-hl-autoloads emamux-autoloads fancy-compilation-autoloads
flymake-quickdef-autoloads ibuffer-project-autoloads notmuch-autoloads
e2ansi-autoloads face-explorer-autoloads flx-autoloads
opencl-mode-autoloads ptemplate-templates-autoloads ptemplate-autoloads
git-modes-autoloads compat-autoloads flycheck-autoloads
pkg-info-autoloads ibuffer-tramp-autoloads debbugs-autoloads
cobol-mode-autoloads dired-sidebar-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads dash-autoloads macrostep-autoloads
flyspell-correct-autoloads yasnippet-snippets-autoloads
yasnippet-autoloads epl-autoloads vdiff-autoloads hydra-autoloads
lv-autoloads early-init rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 202682 72848)
 (symbols 48 16121 0)
 (strings 32 53465 8318)
 (string-bytes 1 1805657)
 (vectors 16 28955)
 (vector-slots 8 564157 50821)
 (floats 8 198 24495)
 (intervals 56 864 0)
 (buffers 984 12))