all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: 57883@debbugs.gnu.org
Subject: bug#57883: compilation-get-file-structure mishandles buffers
Date: Sat, 17 Sep 2022 10:25:25 -0400	[thread overview]
Message-ID: <DBE4B6AE-272F-47FF-8623-C314C0E8FD32@gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2022-09-17 14:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17 14:25 JD Smith [this message]
2022-09-18 10:55 ` bug#57883: compilation-get-file-structure mishandles buffers 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBE4B6AE-272F-47FF-8623-C314C0E8FD32@gmail.com \
    --to=jdtsmith@gmail.com \
    --cc=57883@debbugs.gnu.org \
    /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 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.