GNU bug report logs - #33618
27.0.50; ada-mode breaks M-x grep

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Stefan Monnier <monnier@HIDDEN>; dated Tue, 4 Dec 2018 23:48:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 20 Apr 2019 17:25:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 13:25:02 2019
Received: from localhost ([127.0.0.1]:46697 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hHtjZ-0001WO-SU
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2019 13:25:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55098)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1hHtjY-0001W7-5h
 for 33618 <at> debbugs.gnu.org; Sat, 20 Apr 2019 13:25:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35131)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1hHtjQ-0007bW-Pv; Sat, 20 Apr 2019 13:24:53 -0400
Received: from [176.228.60.248] (port=2386 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1hHtjN-0004Hi-5r; Sat, 20 Apr 2019 13:24:50 -0400
Date: Sat, 20 Apr 2019 20:24:35 +0300
Message-Id: <83v9z8a8to.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stephen Leake <stephen_leake@HIDDEN>
In-reply-to: <86d0lg8vyk.fsf@HIDDEN> (message from Stephen Leake on
 Sat, 20 Apr 2019 08:47:47 -0800)
Subject: Re: bug#33618: better fix
References: <jwvbm60n9cg.fsf@HIDDEN>
 <86d0lg8vyk.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33618
Cc: 33618 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stephen Leake <stephen_leake@HIDDEN>
> Date: Sat, 20 Apr 2019 08:47:47 -0800
> 
> `grep-mode' is defined by `define-compilation-mode', which sets
> `compilation-search-path' to a buffer-local copy of `grep-search-path',
> if the latter is defined.
> 
> So there is precedent for making custom vars buffer-local, and it seems
> the proper fix for this bug is to define `grep-search-path':

Please don't forget :version tags of new defcustoms, and also they
should be called out in NEWS.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 20 Apr 2019 17:11:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 13:11:18 2019
Received: from localhost ([127.0.0.1]:46692 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hHtWI-000195-Jv
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2019 13:11:18 -0400
Received: from gproxy10-pub.mail.unifiedlayer.com ([69.89.20.226]:51500)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen_leake@HIDDEN>) id 1hHtWF-00018q-Th
 for 33618 <at> debbugs.gnu.org; Sat, 20 Apr 2019 13:11:17 -0400
Received: from cmgw11.unifiedlayer.com (unknown [10.9.0.11])
 by gproxy10.mail.unifiedlayer.com (Postfix) with ESMTP id 36412140B3E
 for <33618 <at> debbugs.gnu.org>; Sat, 20 Apr 2019 10:47:50 -0600 (MDT)
Received: from host114.hostmonster.com ([74.220.207.114]) by cmsmtp with ESMTP
 id Ht9ahjO1JVLCbHt9ahBDVt; Sat, 20 Apr 2019 10:47:50 -0600
X-Authority-Reason: nr=8
X-Authority-Analysis: $(_cmae_reason
Received: from [76.77.182.20] (port=52872 helo=Takver4)
 by host114.hostmonster.com with esmtpsa
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91)
 (envelope-from <stephen_leake@HIDDEN>) id 1hHt9Z-0029OZ-VS
 for 33618 <at> debbugs.gnu.org; Sat, 20 Apr 2019 10:47:50 -0600
From: Stephen Leake <stephen_leake@HIDDEN>
To: 33618 <at> debbugs.gnu.org
Subject: better fix
Date: Sat, 20 Apr 2019 08:47:47 -0800
Message-ID: <86d0lg8vyk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - host114.hostmonster.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - stephe-leake.org
X-BWhitelist: no
X-Source-IP: 76.77.182.20
X-Source-L: No
X-Exim-ID: 1hHt9Z-0029OZ-VS
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: (Takver4) [76.77.182.20]:52872
X-Source-Auth: stephen_leake@HIDDEN
X-Email-Count: 1
X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDExNC5ob3N0bW9uc3Rlci5jb20=
X-Local-Domain: yes
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33618
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

`grep-mode' is defined by `define-compilation-mode', which sets
`compilation-search-path' to a buffer-local copy of `grep-search-path',
if the latter is defined.

So there is precedent for making custom vars buffer-local, and it seems
the proper fix for this bug is to define `grep-search-path':

--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -441,6 +441,14 @@ grep-find-abbreviate
   :version "27.1"
   :group 'grep)
=20
+(defcustom grep-search-path '(nil)
+  "Search path for grep results.
+Elements should be directory names, not file names of directories.
+The value nil as an element means to try the default directory."
+  :group 'grep
+  :type '(repeat (choice (const :tag "Default" nil)
+			 (string :tag "Directory"))))
+
 (defvar grep-find-abbreviate-properties
   (let ((ellipsis (if (char-displayable-p ?=E2=80=A6) "[=E2=80=A6]" "[...]=
"))
         (map (make-sparse-keymap)))


`emacs-lisp-compilation-mode' needs a similar fix:

--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1022,6 +1022,14 @@ emacs-lisp-compilation-parse-errors-filename-function
   "The value for `compilation-parse-errors-filename-function' for when
 we go into emacs-lisp-compilation-mode.")
=20
+(defcustom emacs-lisp-compilation-search-path '(nil)
+  "Search path for byte-compile error messages.
+Elements should be directory names, not file names of directories.
+The value nil as an element means to try the default directory."
+  :group 'bytecomp
+  :type '(repeat (choice (const :tag "Default" nil)
+			 (string :tag "Directory"))))
+
 (define-compilation-mode emacs-lisp-compilation-mode "elisp-compile"
   "The variant of `compilation-mode' used for emacs-lisp error buffers")

--=20
-- Stephe




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 4 Jan 2019 17:27:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 04 12:27:20 2019
Received: from localhost ([127.0.0.1]:47032 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gfTFg-0004NC-3v
	for submit <at> debbugs.gnu.org; Fri, 04 Jan 2019 12:27:20 -0500
Received: from webmail.bookmyname.com ([88.191.249.153]:12486
 helo=webmail.free.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludovic@HIDDEN>) id 1gfTFe-0004N1-2y
 for 33618 <at> debbugs.gnu.org; Fri, 04 Jan 2019 12:27:19 -0500
Received: from 153.98.68.208 (unknown [127.0.1.3])
 by webmail.free.org (Postfix) with ESMTP id 4E0C8296BD
 for <33618 <at> debbugs.gnu.org>; Fri,  4 Jan 2019 18:27:16 +0100 (CET)
Received: from [153.98.68.208] by webmail.ludovic-brenta.org
 with HTTP (HTTP/1.1 POST); Fri, 04 Jan 2019 18:27:16 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 04 Jan 2019 18:27:16 +0100
From: Ludovic Brenta <ludovic@HIDDEN>
To: 33618 <at> debbugs.gnu.org
Subject: Re: 27.0.50; ada-mode breaks M-x grep
Message-ID: <a2fe461c1d926efcbc1016c590e9ab12@HIDDEN>
X-Sender: ludovic@HIDDEN
X-Complaints-To: abuse_at_bookmyname.com
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Origin-Web-Site: webmail.ludovic-brenta.org
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33618
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

I'd like to chime in as one of a team of 25 people using emacs ada-mode
on a large software project for the past 20+ years.  We usually use one
"project" per emacs process only, so we're not concerned about 
supporting
multiple "projects" in an emacs process.  However we are very concerned
about compilation buffers containing absolute paths.  Our source files 
are
spread in about 50 directories, the full paths of which are routinely
longer than 120 characters.  Inside each directory are hundreds of 
source
files, the names of which can be another 40 characters each.  We use 
etags
and gnatfind to navigate quickly and efficiently between these files,
without ever needing to remember, type or see the full directory name.
This is especially true in a compilation buffer; RET simply jumps to the
correct file even if only its name is displayed.

So, we've also been hit by this bug when running grep but quickly worked
around it in our ~/.emacs like so:

(add-hook 'grep-mode-hook
           (lambda ()
             "In grep buffers, do not use the compilation-search-path to 
look for source files.  Make a local binding
to the variable that overrides the one from any Ada mode or other 
language project files."
             (set (make-local-variable 'compilation-search-path) 
'(nil))))

and we left it at that until now.

I do agree that the idea of a single, global, defcustom
compilation-search-path seems to make too many assumptions about the
various tools that can run in a compilation buffer, their current 
working
directory, which source file (if any) they were called from, etc.. so
maybe this idea should be revisited.  I do like the ideas so far:

- make a new, buffer-local, non-defcustom variable;
- copy its value into a buffer-local variable when creating a new
   compilation buffer;
- reuse the buffer-local variable of a compilation buffer when reusing 
the
   buffer (i.e. recompile).

-- 
Ludovic Brenta.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 21 Dec 2018 23:19:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 21 18:19:46 2018
Received: from localhost ([127.0.0.1]:58980 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gaU53-0005Uk-N0
	for submit <at> debbugs.gnu.org; Fri, 21 Dec 2018 18:19:45 -0500
Received: from smtp103.ord1d.emailsrvr.com ([184.106.54.103]:57238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen_leake@HIDDEN>) id 1gaU51-0005UZ-Ol
 for 33618 <at> debbugs.gnu.org; Fri, 21 Dec 2018 18:19:44 -0500
Received: from smtp13.relay.ord1d.emailsrvr.com (localhost [127.0.0.1])
 by smtp13.relay.ord1d.emailsrvr.com (SMTP Server) with ESMTP id 88E91C01DA
 for <33618 <at> debbugs.gnu.org>; Fri, 21 Dec 2018 18:19:38 -0500 (EST)
X-Auth-ID: board-president@HIDDEN
Received: by smtp13.relay.ord1d.emailsrvr.com (Authenticated sender:
 board-president-AT-tomahawk-creek-hoa.com) with ESMTPSA id 353BCC016A
 for <33618 <at> debbugs.gnu.org>; Fri, 21 Dec 2018 18:19:38 -0500 (EST)
X-Sender-Id: board-president@HIDDEN
Received: from Takver4 ([UNAVAILABLE]. [76.77.182.20])
 (using TLSv1.2 with cipher AES256-GCM-SHA384)
 by 0.0.0.0:25 (trex/5.7.12); Fri, 21 Dec 2018 18:19:38 -0500
From: Stephen Leake <stephen_leake@HIDDEN>
To: 33618 <at> debbugs.gnu.org
Subject: bug#33618 update
Date: Fri, 21 Dec 2018 15:19:35 -0800
Message-ID: <865zvm4ge0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 33618
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

I did not see this bug until now; apparently my fsf email forwarding is
not working (I'm looking into that).

Stefan writes:

> Opening a file in ada-mode using the new ada-mode from GNU ELPA globally
> sets compilation-search-path (for me, it got set to `("~/tmp")`
> probably because the Ada file was in ~/tmp), which in
> turn breaks M-x grep in the sense that clicking on a match doesn't jump
> to the file but prompts you to find the file (unless you happened to
> grep from one of the directories mentioned in the
> compilation-search-path, of course).

Yes; 'compilation-search-path' is an attribute of a "project" (a very
poorly defined concept in Emacs, unfortunately). Opening an ada-mode
file defines a default project, which has the current directory as the
value for 'compilation-search-path'.

> 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.

Yes.

> 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).

This is one approach. I'll install it in my working emacs and see if it
causes me any problems. I suspect it will break my project code, which
assumes the global value of 'compilation-search-path' is used.

Another approach would be to use the 'project' package; if
(current-project) returns non-nil, use (project-path (current-project)).
But there is no 'project-path' (despite my efforts to define one), so
that doesn't work. There is only 'project-roots' and
'project-library-roots', which return values not suitable for
'compilation-search-path'. Perhaps this bug provides a context to reopen
that discussion.

ada-mode does provide an explicit notion of projects, which include the
list of source directories, which is used to set
compilation-search-path. When the user has specified such a project, it
would be surprising to see some other value of compilation-search-path
be used, based on what buffer happens to be current; I view the choice
of 'project' as global, affecting all files/buffers, because a
real-world project involves many kinds of files, not just Ada ones.

It would make sense to factor out the project-related code in ada-mode,
and turn it into a project-<something> package.

The original problem in this bug was caused by ada-mode providing a
default project when you had not specified one. The goal there is to
make it easy for Emacs/ada-mode newbies to invoke the various
ada-related tools (mainly the compiler), before learning about ada-mode
projects. Perhaps that design choice should be reconsidered.

Eli writes:

> And, btw, isn't it wrong for a mode to set the value of a defcustom?

Good point.

> 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.

Yes.

(project-source-path (project-current)) seems to be the right choice
here, if we can define that in a reasonable way.

I didn't use that in ada-mode before, because I was trying to maintain
compatibility with Emacs 24. Now that I've given up on that, ada-mode
can integrate with project.el

Stefan writes:

> I think by and large no package/user used it (After all,
> in most cases compiler messages include the absolute file name IME),

The GNAT Ada compiler options can be set to provide the full path, but I
prefer not to waste that screen space, since Emacs is perfectly capable
of finding the right file.

> or they used it only in Emacs sessions that are used for a single
> project.

Yes, there seems to be a strong preference (bias?) towards only allowing
a single project per Emacs process. Which means you have to exit Emacs
to change projects. I've never liked that behaviour in other IDEs, and
I've been using multiple projects in Emacs for years.

-- 
-- Stephe




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 21 Dec 2018 00:09:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 20 19:09:03 2018
Received: from localhost ([127.0.0.1]:56915 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ga8ND-0000b8-Jx
	for submit <at> debbugs.gnu.org; Thu, 20 Dec 2018 19:09:03 -0500
Received: from mail-wm1-f44.google.com ([209.85.128.44]:32916)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1ga8NB-0000ae-NO
 for 33618 <at> debbugs.gnu.org; Thu, 20 Dec 2018 19:09:02 -0500
Received: by mail-wm1-f44.google.com with SMTP id r24so13070596wmh.0
 for <33618 <at> debbugs.gnu.org>; Thu, 20 Dec 2018 16:09:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=3wgmc9YBEmWOTDePV8g2ik3jtTsWukijWWtLW+OLKd4=;
 b=ssp3wkrwuSi2L6d6OyLY2IsHHJLuC4x7dTt34S7E+Kp4hni8xviL4tVgDUAjRjQLKd
 pFMDTXS1UZVYeD+rHvHfvJBuZqSbTe6Bl8W6/5aT65nRtXt8vClCBlXIIlUp6WcluBFM
 D7RK1BBHH4MomcIiyxQyOdUrOFN+laPljIEDMeQ9a4LK8CYw/375A7JPq6yRf3g/NpnA
 0d3Pfio8T5T5JLTNWE70lGaF8bCZKl/n0KDW6/LaFJH3DyZFYzSKfMmHnSaG3AmESydP
 a8iOvIjNC8CPitx/uJ+PzDFE46+d/EKK0E5Ycg0NAt5W3/UccMkz+3Mvisx0ogHB2U7W
 wW+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=3wgmc9YBEmWOTDePV8g2ik3jtTsWukijWWtLW+OLKd4=;
 b=fRWaePzOm1+pgrHrnKBhdETJBOr3ILkXKWZHrfodor4GH5EjhZ3c0GTjDz3ruUSA9Z
 r/HjmBF8FKQeq8r7jqZoIa8YnmovniNy1x4Ee3pdVDr29l7hZc804H3NqwMr+zUhp7vS
 Y4R7Jeu30sxmahbZQ3H9yQoyBatLaKkue53UEzOQZjFnVipx2lAhKX5yNb+EyiDvO1cr
 SXXvA4iKp2D05SaJdhkCGQ6wnkxFQbYRZo7ypHzLVKvSakr6D5k8ZElwyiHGs0oGuFM5
 WipfrT6g7yAjL1kfVkom7MGXHL+VzPLXLK6K+AK+sQChwIC/jMgQfDTTnVduTaWznKIx
 fahQ==
X-Gm-Message-State: AJcUukdIXjCYe+/Pvj0q778lRN95a125+3fkIdkTZAU0Lrkmdz428FDv
 /GjU9XVYVasb02mt54xtDpM=
X-Google-Smtp-Source: AFSGD/WP+vp03gw7SRncKdx62FrFARoM4z6o8ElT4vc6qHTyOoBaNcGvouT8NuN+fxFI3/VmEBXb/g==
X-Received: by 2002:a1c:6489:: with SMTP id y131mr588779wmb.34.1545350935914; 
 Thu, 20 Dec 2018 16:08:55 -0800 (PST)
Received: from [192.168.1.3] ([185.105.174.23])
 by smtp.googlemail.com with ESMTPSA id z7sm8122406wrw.22.2018.12.20.16.08.53
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 20 Dec 2018 16:08:54 -0800 (PST)
Subject: Re: bug#33618: emacs ada-mode bug 33618
To: Stephen Leake <stephen_leake@HIDDEN>, 33618 <at> debbugs.gnu.org
References: <jwvbm60n9cg.fsf@HIDDEN>
 <86bm5g3qcp.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <58514d4e-12ba-3939-ea40-cfad8c1d44c7@HIDDEN>
Date: Fri, 21 Dec 2018 02:08:52 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101
 Thunderbird/64.0
MIME-Version: 1.0
In-Reply-To: <86bm5g3qcp.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33618
Cc: monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 20.12.2018 22:17, Stephen Leake wrote:
> Perhaps this bug provides a context to reopen
> that discussion.

Perhaps.

> (project-source-path (project-current)) seems to be the right choice
> here, if we can define that in a reasonable way.

 From what I'm seeing of this variable, it doesn't like like a 
fundamental property of the project to me personally (*), so I still 
think it was the right choice to omit it back then, or at least not base 
the file-enumeration logic on it.

(*) None of the environments I work in show error location relative to 
some path entries, as opposed to providing either absolute file name, or 
file names relative to the current directory.

So I'd like to see more voices from people who do work in such environments.

> Yes, there seems to be a strong preference (bias?) towards only allowing
> a single project per Emacs process.

I'm not sure we should encourage it either. I do know that some users, 
at least, open several projects in one Emacs session at the same time.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 20 Dec 2018 20:17:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 20 15:17:38 2018
Received: from localhost ([127.0.0.1]:56765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ga4lG-0001Hd-Is
	for submit <at> debbugs.gnu.org; Thu, 20 Dec 2018 15:17:38 -0500
Received: from smtp95.iad3b.emailsrvr.com ([146.20.161.95]:33674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen_leake@HIDDEN>) id 1ga4lE-0001HQ-Cx
 for 33618 <at> debbugs.gnu.org; Thu, 20 Dec 2018 15:17:37 -0500
Received: from smtp12.relay.iad3b.emailsrvr.com (localhost [127.0.0.1])
 by smtp12.relay.iad3b.emailsrvr.com (SMTP Server) with ESMTP id D5974C0327;
 Thu, 20 Dec 2018 15:17:30 -0500 (EST)
X-Auth-ID: board-president@HIDDEN
Received: by smtp12.relay.iad3b.emailsrvr.com (Authenticated sender:
 board-president-AT-tomahawk-creek-hoa.com) with ESMTPSA id 5052AC0268; 
 Thu, 20 Dec 2018 15:17:30 -0500 (EST)
X-Sender-Id: board-president@HIDDEN
Received: from Takver4 ([UNAVAILABLE]. [76.77.182.20])
 (using TLSv1.2 with cipher AES256-GCM-SHA384)
 by 0.0.0.0:25 (trex/5.7.12); Thu, 20 Dec 2018 15:17:30 -0500
From: Stephen Leake <stephen_leake@HIDDEN>
To: 33618 <at> debbugs.gnu.org
Subject: emacs ada-mode bug 33618
Date: Thu, 20 Dec 2018 12:17:26 -0800
Message-ID: <86bm5g3qcp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 33618
Cc: Eli Zaretskii <eliz@HIDDEN>, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

I did not see this bug until now; apparently my fsf email forwarding is
not working (I'm looking into that).

Stefan writes:

> Opening a file in ada-mode using the new ada-mode from GNU ELPA globally
> sets compilation-search-path (for me, it got set to `("~/tmp")`
> probably because the Ada file was in ~/tmp), which in
> turn breaks M-x grep in the sense that clicking on a match doesn't jump
> to the file but prompts you to find the file (unless you happened to
> grep from one of the directories mentioned in the
> compilation-search-path, of course).

Yes; 'compilation-search-path' is an attribute of a "project" (a very
poorly defined concept in Emacs, unfortunately). Opening an ada-mode
file defines a default project, which has the current directory as the
value for 'compilation-search-path'.

> 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.

Yes.

> 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).

This is one approach. I'll install it in my working emacs and see if it
causes me any problems. I suspect it will break my project code, which
assumes the global value of 'compilation-search-path' is used.

Another approach would be to use the 'project' package; if
(current-project) returns non-nil, use (project-path (current-project)).
But there is no 'project-path' (despite my efforts to define one), so
that doesn't work. There is only 'project-roots' and
'project-library-roots', which return values not suitable for
'compilation-search-path'. Perhaps this bug provides a context to reopen
that discussion.

ada-mode does provide an explicit notion of projects, which include the
list of source directories, which is used to set
compilation-search-path. When the user has specified such a project, it
would be surprising to see some other value of compilation-search-path
be used, based on what buffer happens to be current; I view the choice
of 'project' as global, affecting all files/buffers, because a
real-world project involves many kinds of files, not just Ada ones.

It would make sense to factor out the project-related code in ada-mode,
and turn it into a project-<something> package.

The original problem in this bug was caused by ada-mode providing a
default project when you had not specified one. The goal there is to
make it easy for Emacs/ada-mode newbies to invoke the various
ada-related tools (mainly the compiler), before learning about ada-mode
projects. Perhaps that design choice should be reconsidered.

Eli writes:

> And, btw, isn't it wrong for a mode to set the value of a defcustom?

Good point.

> 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.

Yes.

(project-source-path (project-current)) seems to be the right choice
here, if we can define that in a reasonable way.

I didn't use that in ada-mode before, because I was trying to maintain
compatibility with Emacs 24. Now that I've given up on that, ada-mode
can integrate with project.el

Stefan writes:

> I think by and large no package/user used it (After all,
> in most cases compiler messages include the absolute file name IME),

The GNAT Ada compiler options can be set to provide the full path, but I
prefer not to waste that screen space, since Emacs is perfectly capable
of finding the right file.

> or they used it only in Emacs sessions that are used for a single
> project.

Yes, there seems to be a strong preference (bias?) towards only allowing
a single project per Emacs process. Which means you have to exit Emacs
to change projects. I've never liked that behaviour in other IDEs, and
I've been using multiple projects in Emacs for years.

-- 
-- Stephe




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 5 Dec 2018 16:10:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 05 11:10:26 2018
Received: from localhost ([127.0.0.1]:34449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUZkn-0000NJ-Px
	for submit <at> debbugs.gnu.org; Wed, 05 Dec 2018 11:10:26 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:35352)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gUZkl-0000NA-11
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 11:10:24 -0500
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
Received: by pastel.home (Postfix, from userid 20848)
 id 2CB866AA38; Wed,  5 Dec 2018 11:10:21 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#33618: 27.0.50; ada-mode breaks M-x grep
Message-ID: <jwvwooo9cxo.fsf-monnier+emacs@HIDDEN>
References: <jwvbm60n9cg.fsf@HIDDEN>
 <jwvy394c06q.fsf-monnier+bug#33618@HIDDEN> <83wooo8ogl.fsf@HIDDEN>
 <jwvsgzcawd5.fsf-monnier+emacs@HIDDEN> <83d0qg82fr.fsf@HIDDEN>
Date: Wed, 05 Dec 2018 11:10:21 -0500
In-Reply-To: <83d0qg82fr.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 05 Dec
 2018 16:37:28 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33618
Cc: stephen_leake@HIDDEN, 33618 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 5 Dec 2018 14:42:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 05 09:42:02 2018
Received: from localhost ([127.0.0.1]:33286 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUYNG-0004NG-1i
	for submit <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:42:02 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34024)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gUYND-0004Mm-Nq
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:41:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gUYN4-0005cC-Gt
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:41:54 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55303)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gUYN4-0005bw-CC; Wed, 05 Dec 2018 09:41:50 -0500
Received: from [176.228.60.248] (port=1593 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gUYN3-0007XH-V5; Wed, 05 Dec 2018 09:41:50 -0500
Date: Wed, 05 Dec 2018 16:41:46 +0200
Message-Id: <83bm60828l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: monnier@HIDDEN
In-reply-to: <83d0qg82fr.fsf@HIDDEN> (message from Eli Zaretskii on Wed, 05
 Dec 2018 16:37:28 +0200)
Subject: Re: bug#33618: 27.0.50; ada-mode breaks M-x grep
References: <jwvbm60n9cg.fsf@HIDDEN>
 <jwvy394c06q.fsf-monnier+bug#33618@HIDDEN> <83wooo8ogl.fsf@HIDDEN>
 <jwvsgzcawd5.fsf-monnier+emacs@HIDDEN> <83d0qg82fr.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33618
Cc: stephen_leake@HIDDEN, 33618 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> Date: Wed, 05 Dec 2018 16:37:28 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: stephen_leake@HIDDEN, 33618 <at> debbugs.gnu.org
> 
> > 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"?
> And what if we have multiple compilation buffers?

And, btw, isn't it wrong for a mode to set the value of a defcustom?

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 5 Dec 2018 14:37:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 05 09:37:44 2018
Received: from localhost ([127.0.0.1]:33282 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUYJ6-0004Gr-G6
	for submit <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:37:44 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60966)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gUYJ4-0004Gf-04
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:37:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gUYIy-00025Y-1e
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:37:36 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55212)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gUYIu-00021x-Jz; Wed, 05 Dec 2018 09:37:32 -0500
Received: from [176.228.60.248] (port=1306 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gUYIu-00076V-6y; Wed, 05 Dec 2018 09:37:32 -0500
Date: Wed, 05 Dec 2018 16:37:28 +0200
Message-Id: <83d0qg82fr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvsgzcawd5.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 05 Dec 2018 09:26:45 -0500)
Subject: Re: bug#33618: 27.0.50; ada-mode breaks M-x grep
References: <jwvbm60n9cg.fsf@HIDDEN>
 <jwvy394c06q.fsf-monnier+bug#33618@HIDDEN> <83wooo8ogl.fsf@HIDDEN>
 <jwvsgzcawd5.fsf-monnier+emacs@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33618
Cc: stephen_leake@HIDDEN, 33618 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: 33618 <at> debbugs.gnu.org, stephen_leake@HIDDEN
> Date: Wed, 05 Dec 2018 09:26:45 -0500
> 
> > Why do we need to change our code to cater to problems in packages,
> > even if those packages are on ELPA?  It sounds wrong to me, FWIW.
> 
> 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?

> 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"?
And what if we have multiple compilation buffers?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 5 Dec 2018 14:26:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 05 09:26:49 2018
Received: from localhost ([127.0.0.1]:33277 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUY8X-00040t-Bo
	for submit <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:26:49 -0500
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40337)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gUY8U-00040k-Pu
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 09:26:48 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id wB5EQjaJ013725;
 Wed, 5 Dec 2018 09:26:45 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 06F316AA38; Wed,  5 Dec 2018 09:26:45 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#33618: 27.0.50; ada-mode breaks M-x grep
Message-ID: <jwvsgzcawd5.fsf-monnier+emacs@HIDDEN>
References: <jwvbm60n9cg.fsf@HIDDEN>
 <jwvy394c06q.fsf-monnier+bug#33618@HIDDEN> <83wooo8ogl.fsf@HIDDEN>
Date: Wed, 05 Dec 2018 09:26:45 -0500
In-Reply-To: <83wooo8ogl.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 05 Dec
 2018 08:41:46 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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 <6977> : streams
 <1806250> : uri <2760508>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33618
Cc: stephen_leake@HIDDEN, 33618 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> > Opening a file in ada-mode using the new ada-mode from GNU ELPA globally
>> > sets compilation-search-path (for me, it got set to `("~/tmp")`
>> > probably because the Ada file was in ~/tmp), which in
>> > turn breaks M-x grep in the sense that clicking on a match doesn't jump
>> > to the file but prompts you to find the file (unless you happened to
>> > grep from one of the directories mentioned in the
>> > compilation-search-path, of course).
>> 
>> I use the patch below currently to work around this problem.
>> Should I install it into `master` (with a few more comments and
>> probably etc/NEWS or even manual updates)?
>
> If the problem is in ada-mode in ELPA, it should be fixed there, IMO.
> Why do we need to change our code to cater to problems in packages,
> even if those packages are on ELPA?  It sounds wrong to me, FWIW.

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.

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).

Note that the hunk below (which is part of the patch I sent) is
sufficient to unbreak grep, but other tools that (like grep) build on
`compilation-start` would still be affected.


        Stefan


--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -834,7 +834,8 @@ grep-mode
   (set (make-local-variable 'compilation-disable-input) t)
   (set (make-local-variable 'compilation-error-screen-columns)
        grep-error-screen-columns)
-  (add-hook 'compilation-filter-hook 'grep-filter nil t))
+  (setq-local compilation-search-path '(nil))
+  (add-hook 'compilation-filter-hook #'grep-filter nil t))
 
 (defun grep--save-buffers ()
   (when grep-save-buffers




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 5 Dec 2018 06:42:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 05 01:42:12 2018
Received: from localhost ([127.0.0.1]:33026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUQst-0003Mi-Pg
	for submit <at> debbugs.gnu.org; Wed, 05 Dec 2018 01:42:12 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34650)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gUQss-0003MW-E2
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 01:42:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gUQsl-0007rT-7B
 for 33618 <at> debbugs.gnu.org; Wed, 05 Dec 2018 01:42:05 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46802)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gUQsa-0007ki-VR; Wed, 05 Dec 2018 01:41:53 -0500
Received: from [176.228.60.248] (port=3153 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gUQsZ-00064T-7z; Wed, 05 Dec 2018 01:41:52 -0500
Date: Wed, 05 Dec 2018 08:41:46 +0200
Message-Id: <83wooo8ogl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvy394c06q.fsf-monnier+bug#33618@HIDDEN> (message from Stefan
 Monnier on Tue, 04 Dec 2018 19:02:35 -0500)
Subject: Re: bug#33618: 27.0.50; ada-mode breaks M-x grep
References: <jwvbm60n9cg.fsf@HIDDEN>
 <jwvy394c06q.fsf-monnier+bug#33618@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33618
Cc: stephen_leake@HIDDEN, 33618 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Stefan Monnier <monnier@HIDDEN>
> Date: Tue, 04 Dec 2018 19:02:35 -0500
> Cc: Stephen Leake <stephen_leake@HIDDEN>
> 
> > Opening a file in ada-mode using the new ada-mode from GNU ELPA globally
> > sets compilation-search-path (for me, it got set to `("~/tmp")`
> > probably because the Ada file was in ~/tmp), which in
> > turn breaks M-x grep in the sense that clicking on a match doesn't jump
> > to the file but prompts you to find the file (unless you happened to
> > grep from one of the directories mentioned in the
> > compilation-search-path, of course).
> 
> I use the patch below currently to work around this problem.
> Should I install it into `master` (with a few more comments and
> probably etc/NEWS or even manual updates)?

If the problem is in ada-mode in ELPA, it should be fixed there, IMO.
Why do we need to change our code to cater to problems in packages,
even if those packages are on ELPA?  It sounds wrong to me, FWIW.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at 33618 <at> debbugs.gnu.org:


Received: (at 33618) by debbugs.gnu.org; 5 Dec 2018 00:02:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 04 19:02:39 2018
Received: from localhost ([127.0.0.1]:32906 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUKeF-0001ZK-FK
	for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 19:02:39 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:36953)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gUKeD-0001ZA-3y
 for 33618 <at> debbugs.gnu.org; Tue, 04 Dec 2018 19:02:37 -0500
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 wB502ZqW006200;
 Tue, 4 Dec 2018 19:02:35 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 4AFD56A9FF; Tue,  4 Dec 2018 19:02:35 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: 33618 <at> debbugs.gnu.org
Subject: Re: bug#33618: 27.0.50; ada-mode breaks M-x grep
Message-ID: <jwvy394c06q.fsf-monnier+bug#33618@HIDDEN>
References: <jwvbm60n9cg.fsf@HIDDEN>
Date: Tue, 04 Dec 2018 19:02:35 -0500
In-Reply-To: <jwvbm60n9cg.fsf@HIDDEN> (Stefan Monnier's message of
 "Tue, 04 Dec 2018 18:46:55 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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, RV6432=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6432> : inlines <6976> : streams
 <1806193> : uri <2760213>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33618
Cc: Stephen Leake <stephen_leake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Opening a file in ada-mode using the new ada-mode from GNU ELPA globally
> sets compilation-search-path (for me, it got set to `("~/tmp")`
> probably because the Ada file was in ~/tmp), which in
> turn breaks M-x grep in the sense that clicking on a match doesn't jump
> to the file but prompts you to find the file (unless you happened to
> grep from one of the directories mentioned in the
> compilation-search-path, of course).

I use the patch below currently to work around this problem.
Should I install it into `master` (with a few more comments and
probably etc/NEWS or even manual updates)?


        Stefan


diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index 359c187d85..d31e614f14 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -943,7 +943,7 @@ ada-select-prj-file
 	;; FIXME: use ada-get-absolute-dir, mapconcat here
 	(setenv "ADA_PROJECT_PATH" ada_project_path)))
 
-  (setq compilation-search-path (ada-xref-get-src-dir-field))
+  (setq-local compilation-search-path (ada-xref-get-src-dir-field))
 
   (setq ada-search-directories-internal
 	;; FIXME: why do we need directory-file-name here?
@@ -1208,9 +1208,8 @@ ada-compile-application
   (ada-require-project-file)
   (let ((cmd (ada-xref-get-project-field 'make_cmd))
 	(process-environment (ada-set-environment))
-	(compilation-scroll-output t))
-
-    (setq compilation-search-path (ada-xref-get-src-dir-field))
+	(compilation-scroll-output t)
+        (compilation-search-path (ada-xref-get-src-dir-field)))
 
     ;;  If no project file was found, ask the user
     (unless cmd
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index c7c510f7a3..f5627e10ce 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1614,7 +1614,7 @@ recompile
       (setq command (compilation-read-command (or (car compilation-arguments)
 						  command)))
       (if compilation-arguments (setcar compilation-arguments command)))
-    (apply 'compilation-start (or compilation-arguments (list command)))))
+    (apply #'compilation-start (or compilation-arguments (list command)))))
 
 (defcustom compilation-scroll-output nil
   "Non-nil to scroll the *compilation* buffer window as output appears.
@@ -1682,6 +1682,7 @@ compilation-start
 	    (replace-regexp-in-string "-mode\\'" "" (symbol-name mode))))
 	 (thisdir default-directory)
 	 (thisenv compilation-environment)
+         (this-search-path compilation-search-path)
 	 outwin outbuf)
     (with-current-buffer
 	(setq outbuf
@@ -1749,6 +1750,8 @@ compilation-start
         ;; NB: must be done after (funcall mode) as that resets local variables
         (set (make-local-variable 'compilation-directory) thisdir)
 	(set (make-local-variable 'compilation-environment) thisenv)
+        (unless (local-variable-p 'compilation-search-path)
+          (setq-local compilation-search-path this-search-path))
 	(if highlight-regexp
 	    (set (make-local-variable 'compilation-highlight-regexp)
 		 highlight-regexp))
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 331eeec01b..16b54081ae 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -834,7 +834,8 @@ grep-mode
   (set (make-local-variable 'compilation-disable-input) t)
   (set (make-local-variable 'compilation-error-screen-columns)
        grep-error-screen-columns)
-  (add-hook 'compilation-filter-hook 'grep-filter nil t))
+  (setq-local compilation-search-path '(nil))
+  (add-hook 'compilation-filter-hook #'grep-filter nil t))
 
 (defun grep--save-buffers ()
   (when grep-save-buffers




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Dec 2018 23:47:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 04 18:47:30 2018
Received: from localhost ([127.0.0.1]:32901 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUKPa-0001B3-19
	for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 18:47:30 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60745)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gUKPX-0001Aq-5j
 for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 18:47:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <monnier@HIDDEN>) id 1gUKPQ-0000Ba-06
 for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 18:47:21 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:41598)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <monnier@HIDDEN>)
 id 1gUKPP-0000Ap-4Q
 for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 18:47:19 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42066)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <monnier@HIDDEN>) id 1gUKPN-0001AD-GH
 for bug-gnu-emacs@HIDDEN; Tue, 04 Dec 2018 18:47:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <monnier@HIDDEN>) id 1gUKPJ-0008Pn-7K
 for bug-gnu-emacs@HIDDEN; Tue, 04 Dec 2018 18:47:17 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:54990)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <monnier@HIDDEN>) id 1gUKPF-0007qy-Rg
 for bug-gnu-emacs@HIDDEN; Tue, 04 Dec 2018 18:47:11 -0500
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 wB4Nktrr003955
 for <bug-gnu-emacs@HIDDEN>; Tue, 4 Dec 2018 18:46:55 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 73AC86A9FF; Tue,  4 Dec 2018 18:46:55 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; ada-mode breaks M-x grep
Date: Tue, 04 Dec 2018 18:46:55 -0500
Message-ID: <jwvbm60n9cg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Level: 
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0.9
X-NAI-Spam-Rules: 5 Rules triggered
 BEC_TRC1=0.4, BEC_TRC1_W_GEN_SPAM_FEATRE=0.4, GEN_SPAM_FEATRE=0.1, 
 EDT_SA_DN_PASS=0, RV6432=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6432> : inlines <6976> : streams
 <1806192> : uri <2760207>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Package: Emacs
Version: 27.0.50


Opening a file in ada-mode using the new ada-mode from GNU ELPA globally
sets compilation-search-path (for me, it got set to `("~/tmp")`
probably because the Ada file was in ~/tmp), which in
turn breaks M-x grep in the sense that clicking on a match doesn't jump
to the file but prompts you to find the file (unless you happened to
grep from one of the directories mentioned in the
compilation-search-path, of course).


        Stefan



In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-11-24 built on pastel
Repository revision: 3f58f7c0289bf3fbd2e73c45561691b94cb1f6b1
Repository branch: work
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 9 (stretch)

Recent messages:
previous-line: Beginning of buffer [2 times]
next-line: End of buffer [2 times]
Mark saved where search started
Mark set
Mark saved where search started
Auto-saving... [2 times]
Mark set
Undo!
Saving file /home/monnier/src/emacs/work/lisp/progmodes/grep.el...
Wrote /home/monnier/src/emacs/work/lisp/progmodes/grep.el




Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#33618; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 20 Apr 2019 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.