all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#57883: compilation-get-file-structure mishandles buffers
@ 2022-09-17 14:25 JD Smith
  2022-09-18 10:55 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: JD Smith @ 2022-09-17 14:25 UTC (permalink / raw)
  To: 57883

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]


As reported <https://lists.gnu.org/archive/html/emacs-devel/2022-02/msg00496.html> on emacs-devel, a bug is present in `compilation-get-file-structure’ when the “file” matched by the `compilation-parse-errors’ is not a file, but a buffer name.  Both filenames and buffer names are explicitly allowed in errors.  From the `compilation-error-regexp-alist’ docstring (emphasis added):

Or FILE can also be a function that returns (FILENAME) or (RELATIVE-FILENAME . DIRNAME). In the former case, FILENAME may be relative or absolute, or it may be a buffer.

Note that this is useful for modes which report errors in text from open buffers, which may have no associated file.   The issue is this line in `compilation-get-file-structure’:

	(if (file-name-absolute-p filename)
	    (setq filename (concat comint-file-name-prefix filename)))

which signals an 

[-- Attachment #2: Type: text/html, Size: 3361 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-10 23:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17 14:25 bug#57883: compilation-get-file-structure mishandles buffers JD Smith
2022-09-18 10:55 ` Lars Ingebrigtsen
2023-09-03  9:18   ` Stefan Kangas
2023-09-03 13:36     ` JD Smith
2023-09-03 18:27       ` Stefan Kangas
2024-01-10 10:55         ` Stefan Kangas
2024-01-10 22:14           ` JD Smith
2024-01-10 23:20             ` Stefan Kangas

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.