From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#33618: 27.0.50; ada-mode breaks M-x grep Date: Wed, 05 Dec 2018 11:10:21 -0500 Message-ID: References: <83wooo8ogl.fsf@gnu.org> <83d0qg82fr.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544026149 31733 195.159.176.226 (5 Dec 2018 16:09:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2018 16:09:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: stephen_leake@member.fsf.org, 33618@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 05 17:09:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUZjU-0008Bb-KE for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Dec 2018 17:09:04 +0100 Original-Received: from localhost ([::1]:35371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUZlb-0002xj-7r for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Dec 2018 11:11:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUZlS-0002wU-47 for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 11:11:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUZlP-0003Rb-1R for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 11:11:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUZlO-0003R0-Th for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 11:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gUZlO-0000O7-Gn for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2018 11:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Dec 2018 16:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33618 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33618-submit@debbugs.gnu.org id=B33618.15440262261450 (code B ref 33618); Wed, 05 Dec 2018 16:11:02 +0000 Original-Received: (at 33618) by debbugs.gnu.org; 5 Dec 2018 16:10:26 +0000 Original-Received: from localhost ([127.0.0.1]:34449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUZkn-0000NJ-Px for submit@debbugs.gnu.org; Wed, 05 Dec 2018 11:10:26 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:35352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUZkl-0000NA-11 for 33618@debbugs.gnu.org; Wed, 05 Dec 2018 11:10:24 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id wB5GALmc005165; Wed, 5 Dec 2018 11:10:21 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 2CB866AA38; Wed, 5 Dec 2018 11:10:21 -0500 (EST) In-Reply-To: <83d0qg82fr.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Dec 2018 16:37:28 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6433=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6433> : inlines <6978> : streams <1806257> : uri <2760552> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153115 Archived-At: >> Because I think the problem in ada-mode is linked to a design problem >> with that variable: it is defined to be a global variable, and >> compile.el looks it up from inside the compilation buffer, so there's no >> convenient way for a major mode like ada-mode to tell compile.el which >> search-path to use for which file/project: all they can do is change the >> global value. > > So how did we survive with this design problem until now? I don't know. I think by and large no package/user used it (After all, in most cases compiler messages include the absolute file name IME), or they used it only in Emacs sessions that are used for a single project. >> The patch I use changes compile.el so the var is looked up from the >> buffer from which the compilation is launched (e.g. an ada-mode buffer) >> and then stashed into the compilation buffer (for later use). > What will that do if I invoke, e.g., "M-x recompile" from a source > buffer other than the one from which I invoked the previous "M-x compile"? Good question. I guess M-x recompile should first switch to the compilation buffer and then cause the recompile from there (hence reusing the value that was stashed into the compilation buffer). [ Note: I haven't checked to see if my patch does that or not. ] > And what if we have multiple compilation buffers? Not sure why that would make a difference. > And, btw, isn't it wrong for a mode to set the value of a defcustom? Yes. > Maybe we should have a separate variable for this purpose, one that > isn't a defcustom. A buffer-local value of a defcustom is going to > surprise users, I think. Sounds like a good idea, tho we'd have to figure out how to combine the two variable's values. Stefan