From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64198: Feature request: compile.el's "Find this in" prompt should be hookable. Date: Thu, 22 Jun 2023 00:52:36 +0300 Message-ID: <87mt0so53v.fsf@thaodan.de> References: <837crx5a8x.fsf@gnu.org> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18006"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dave Abrahams , 64198@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 21 23:53:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qC5lT-0004Uw-9E for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Jun 2023 23:53:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qC5l9-0003YS-U3; Wed, 21 Jun 2023 17:53:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qC5l8-0003YH-87 for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2023 17:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qC5l7-0004LD-VQ for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2023 17:53:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qC5l7-0004jO-R5 for bug-gnu-emacs@gnu.org; Wed, 21 Jun 2023 17:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Jun 2023 21:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64198 X-GNU-PR-Package: emacs Original-Received: via spool by 64198-submit@debbugs.gnu.org id=B64198.168738436218161 (code B ref 64198); Wed, 21 Jun 2023 21:53:01 +0000 Original-Received: (at 64198) by debbugs.gnu.org; 21 Jun 2023 21:52:42 +0000 Original-Received: from localhost ([127.0.0.1]:34325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC5ko-0004ir-JG for submit@debbugs.gnu.org; Wed, 21 Jun 2023 17:52:42 -0400 Original-Received: from thaodan.de ([185.216.177.71]:46696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC5kl-0004ih-Pk for 64198@debbugs.gnu.org; Wed, 21 Jun 2023 17:52:41 -0400 Original-Received: from odin (dsl-trebng12-50dc76-249.dhcp.inet.fi [80.220.118.249]) by thaodan.de (Postfix) with ESMTPSA id E88E3D08DA2; Thu, 22 Jun 2023 00:52:37 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1687384358; bh=+nrYU3NtupEHyjTc10vCKpk279IXgGvc5BiojPpAa8o=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=0KavNCL4m3wxc7gmYp3OWbsm0A7ZV6g0fwbzz9NQbS3dVp17PbnDKUjrS1GeG8j3o 4Wo6hRGyo9FXv3bQf4hNVuONJKIq8h3nK3onBA1J12fzvXMB5K4o//9Q3wqO/ZpiJV FRRVkfziNSpRBRHAWXtPhxS9Tu6RBdInjwWPHXd1WVd/N9dlbk1yz+5V3Lo7eo/9sa NAMWFuTT81IR4tYngrtU2FpRISB+m91EguOhqHOwUobaOWewdrxURapBIQ4HJ3YYbP 5rrTaST058q06QIFATcTIrCEk9nrCtyCueQI1kFHMtx0P6R5FK6ZeDxOGOUrndaZqS JMIiN5WbtLkqfbL5XGbQdOYwMFjJ50OC6ZHRzl6rpi0YD4GHGTJrObohcYJql60JBs EIy1RqagXeLPOBV3URMXKSK7wDOy1N+iwOhrHiF1UFMrPB5KbfkOWevhGIY1Z/SNf+ MnxcLGczeQzxBEwfC23FjXnvP7mK3p7pEIM7uNLkqKZDNkupepwvf+VtfmLiKUy1OK 3t5Qq5d60Iq24Rzu+mKLjhu5/wYzeVRmBEmgflLbqMQirRuQkIP3szdDoIomI+rhjN HCOcGxO1gGI6KE8Bx0W3vRTUsqjR9pPvFubwUIFaKLXMZc6E0NtTxDkycp6qOu0XbK kpZmoeft9iTOmRal8zSxvOPQ= In-Reply-To: <837crx5a8x.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 21 Jun 2023 14:24:14 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263849 Archived-At: Eli Zaretskii writes: >> When a file can't be found via the path given in a diagnostic, I'd >> like to be able to override the prompt that emacs gives to locate >> the file. compilation-parse-errors-filename-function happens too >> early, while the buffer is being initially parsed. A similar >> compilation-locate-file-function would be great. If there's >> interest I could try to develop a patch. > > 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? I'm not the original requester but for cross compilation this could be useful. E.g I compile Sailfish OS RPM packages with mb2 which runs rpmbuild in scratchbox2. The patches in the output come from the command line output that is the same as if it was ran outside of the cross compilation target however it should resolve through the target rather than the host unless it is sourced from the very same package that I compile right now. E.g. /usr/include/stdio.h should be resolved to -> /srv/mer/sailfishos-devel-aarch64/usr/include. When building with open build service the situation is very similar.