From: Eli Zaretskii <eliz@gnu.org>
To: Dave Abrahams <dave@boostpro.com>
Cc: 64198@debbugs.gnu.org
Subject: bug#64198: Feature request: compile.el's "Find this in" prompt should be hookable.
Date: Thu, 22 Jun 2023 20:23:45 +0300 [thread overview]
Message-ID: <83fs6j2yxq.fsf@gnu.org> (raw)
In-Reply-To: <3D7A63CD-5B7B-412A-8C55-90EFFA294F09@boostpro.com> (message from Dave Abrahams on Thu, 22 Jun 2023 10:11:29 -0700)
> From: Dave Abrahams <dave@boostpro.com>
> Date: Thu, 22 Jun 2023 10:11:29 -0700
> Cc: 64198@debbugs.gnu.org
>
> > On Jun 22, 2023, at 10:02 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >> From: Dave Abrahams <dave@boostpro.com>
> >> Date: Wed, 21 Jun 2023 09:09:08 -0700
> >> Cc: 64198@debbugs.gnu.org
> >>
> >> Before discussing patches, could you please describe your situation?
> >> Specifically, how does it happen that neither the compilation
> >> directory plus the file name shown by the diagnostics nor the search
> >> of compilation-search-path succeed to locate the file? And what would
> >> the hook function you suggest adding do to resolve this, i.e. how
> >> would it know where to look for the file?
> >>
> >> When Swift asserts, it doesn't write the path to the file into the output, because… reasons I grudgingly
> >> accept. So one needs to guess at the file. https://github.com/apple/swift/issues/66777 contains all the
> >> details, but if you want additional info, please ask.
> >
> > I don't know what Swift is, and that issue talks about something
> > called #fileID, which I again have no idea about. So yes, please do
> > elaborate, and TIA.
>
> Swift is a programming language. When its assertions (like C's assert() macro) fail, a diagnostic is output with a file ID and line. The file ID looks like a path, but it's really not. If it's a path in the filesystem, that's coincidental but it's likely to point to the right file. I don't want to manually hunt down the file every time an assertion fails; I'd rather emacs made an educated guess based on the current project. It's obviously not the right answer for everyone, but I'd like to have the hooks needed to implement that without too much hackery.
I'm okay with adding a hook function which will be called from
compilation-find-file if compilation-find-file-1 fails to find the
file. But I must say that you are trying to use compilation-mode in a
situation for which it was never been designed to be used.
next prev parent reply other threads:[~2023-06-22 17:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 22:30 bug#64198: Feature request: compile.el's "Find this in" prompt should be hookable Dave Abrahams
2023-06-21 11:24 ` Eli Zaretskii
2023-06-21 16:09 ` Dave Abrahams
2023-06-22 17:02 ` Eli Zaretskii
2023-06-22 17:11 ` Dave Abrahams
2023-06-22 17:23 ` Eli Zaretskii [this message]
2023-06-22 21:56 ` Dave Abrahams
2023-06-23 5:41 ` Eli Zaretskii
2023-06-22 17:58 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 21:49 ` Dave Abrahams
2023-06-22 22:49 ` Dave Abrahams
2023-06-21 21:52 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 4:54 ` Eli Zaretskii
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=83fs6j2yxq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=64198@debbugs.gnu.org \
--cc=dave@boostpro.com \
/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.