GNU bug report logs - #3418
Issue with compile.el and compilation-parse-errors-filename-function

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: Gary Oberbrunner <garyo@HIDDEN>; dated Fri, 29 May 2009 14:55:06 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 3418) by debbugs.gnu.org; 12 Aug 2017 15:40:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 12 11:40:39 2017
Received: from localhost ([127.0.0.1]:56844 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dgYWk-0002oW-S0
	for submit <at> debbugs.gnu.org; Sat, 12 Aug 2017 11:40:39 -0400
Received: from mail-it0-f66.google.com ([209.85.214.66]:36855)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1dgYWi-0002oQ-9j
 for 3418 <at> debbugs.gnu.org; Sat, 12 Aug 2017 11:40:36 -0400
Received: by mail-it0-f66.google.com with SMTP id o72so797427ita.3
 for <3418 <at> debbugs.gnu.org>; Sat, 12 Aug 2017 08:40:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=WOHD+DlDURg8Ri2qWCZZK6PBSaK5AtTy9hY1/pZECPI=;
 b=kdA7y9CoE0Zg9VeWwTyKx6ZJw2g8x1sCHayPRNpn6P7SLOThabAnfhfdYOlCYW/Wnv
 e//hR2O9/Ne6Yp/hOINpX74NGHmMfTiQXxF1YXCPnL40w4E2jPAtXt3bw7aKqaeMHUoE
 ouLuxso42pKcHxI+8g5DPH6z+uZEIU6yMasRyJLCCL2SdIVnrt8pWcmrTvPyN+KzZnD1
 Mlm1EYzv9QL43Pp2QQ+pNNJEEefPI3Bf3ILut8N2KwIS5NKo0xhoi9G4sCAptYSVGJCA
 HSDaf7x5eTOmoNPZNXSpIb4cf31YfIEYI9zHsHBgbTizWnSnz5fFMXgjxxh5msNsBGhK
 BsWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=WOHD+DlDURg8Ri2qWCZZK6PBSaK5AtTy9hY1/pZECPI=;
 b=Xp9pXh8WVD5n7wqPVvNSzimofS2rpCOqwM9F+wzKYS88ch6QkMbkcX1MvT2lqNoTIU
 0yP2T0O+PpkR9FGaMsG0b68rnFK7fkdsD1II1fvfruRJCzywXZW3lywAKic92T+ChGlE
 Da+lVhQ6PBQgeCL131clVBJpCF2qf1TykCD6e4szrKZ3A1nNvIY3f47T7O8zSuBq/Qmh
 MywyErGOa+Z4O9bX1AqrgRVJ0m6uEKVK6dxYYKc2wxWWiZR/z9khhTcMK8ZcJG51xbv3
 p3AQ5LSJsPUarA7lXZTwsrW/SvQezs/m9V5S23mKi9aoTbSGwyc9OKQu5tAHML+4AqSP
 jedA==
X-Gm-Message-State: AHYfb5g70QykM6xFcSBBJ56J/aCUhwM0jyjBluC7hCBqEEHA9J1hCWn6
 whyB1Lw7d+ldDw==
X-Received: by 10.36.238.202 with SMTP id b193mr1629326iti.135.1502552430566; 
 Sat, 12 Aug 2017 08:40:30 -0700 (PDT)
Received: from zony ([45.2.119.49])
 by smtp.googlemail.com with ESMTPSA id 200sm819046itm.7.2017.08.12.08.40.27
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 12 Aug 2017 08:40:28 -0700 (PDT)
From: npostavs@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.fsf@HIDDEN>
 <83vb6g1jwt.fsf@HIDDEN>
 <799658909.580977.1453821327904.JavaMail.zimbra@HIDDEN>
 <83fuxk1fxp.fsf@HIDDEN>
 <681830756.582148.1453825181223.JavaMail.zimbra@HIDDEN>
 <878tir2ai2.fsf@HIDDEN> <83378ysjcc.fsf@HIDDEN>
Date: Sat, 12 Aug 2017 11:42:05 -0400
In-Reply-To: <83378ysjcc.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 11 Aug
 2017 09:34:59 +0300")
Message-ID: <87efsg23oy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 3418
Cc: ahyatt@HIDDEN, 3418 <at> debbugs.gnu.org, garyo@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.7 (/)

Eli Zaretskii <eliz@HIDDEN> writes:

>> We could do something like
>> 
>>     (condition-case err
>>         (funcall compilation-parse-errors-filename-function filename spec-dir)
>>       (wrong-number-of-arguments
>>        ;; Try again with single arg for backwards compatibility.
>>        (funcall compilation-parse-errors-filename-function filename)))
>
> Or use func-arity?

I think func-arity could fail in case the function is advised or created
with `apply-partially'.  On the other hand the condition-case trick can
cause problems if there is an unrelated wrong arguments error inside the
function (perhaps this can be migitated by checking the error
information).  Doesn't really matter too much either way I guess, it's
all minor corner cases.





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

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


Received: (at 3418) by debbugs.gnu.org; 11 Aug 2017 06:35:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 11 02:35:26 2017
Received: from localhost ([127.0.0.1]:55048 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dg3Xa-0003Q5-4u
	for submit <at> debbugs.gnu.org; Fri, 11 Aug 2017 02:35:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53680)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1dg3XZ-0003Pr-6Y
 for 3418 <at> debbugs.gnu.org; Fri, 11 Aug 2017 02:35:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1dg3XT-0005xG-3Q
 for 3418 <at> debbugs.gnu.org; Fri, 11 Aug 2017 02:35:20 -0400
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,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50804)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1dg3XL-0005sV-Lx; Fri, 11 Aug 2017 02:35:11 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4143
 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 1dg3XK-0006Rq-Ts; Fri, 11 Aug 2017 02:35:11 -0400
Date: Fri, 11 Aug 2017 09:34:59 +0300
Message-Id: <83378ysjcc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: npostavs@HIDDEN
In-reply-to: <878tir2ai2.fsf@HIDDEN>
 (npostavs@HIDDEN)
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.fsf@HIDDEN>
 <83vb6g1jwt.fsf@HIDDEN>
 <799658909.580977.1453821327904.JavaMail.zimbra@HIDDEN>
 <83fuxk1fxp.fsf@HIDDEN>
 <681830756.582148.1453825181223.JavaMail.zimbra@HIDDEN>
 <878tir2ai2.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: 3418
Cc: ahyatt@HIDDEN, 3418 <at> debbugs.gnu.org, garyo@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>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: npostavs@HIDDEN
> Cc: Eli Zaretskii <eliz@HIDDEN>,  3418 <at> debbugs.gnu.org,  Andrew Hyatt <ahyatt@HIDDEN>
> Date: Thu, 10 Aug 2017 20:50:29 -0400
> 
> Gary Oberbrunner <garyo@HIDDEN> writes:
> 
> > If a user (such as myself) has an implementation of this function in his .emacs today, like so:
> >
> > (defun process-error-filename (filename)
> >   ;;; do stuff with filename
> >   filename)
> > (setq compilation-parse-errors-filename-function 'process-error-filename)
> >
> > and we add a new argument that gets passed to that function, it'll throw an error. *Users* will have to add 
> >   &optional spec-dir 
> > to their implementations of it to avoid the error.
> 
> We could do something like
> 
>     (condition-case err
>         (funcall compilation-parse-errors-filename-function filename spec-dir)
>       (wrong-number-of-arguments
>        ;; Try again with single arg for backwards compatibility.
>        (funcall compilation-parse-errors-filename-function filename)))

Or use func-arity?




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

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


Received: (at 3418) by debbugs.gnu.org; 11 Aug 2017 01:04:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 10 21:04:56 2017
Received: from localhost ([127.0.0.1]:54913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dfyNk-0006Y3-89
	for submit <at> debbugs.gnu.org; Thu, 10 Aug 2017 21:04:56 -0400
Received: from mail-vk0-f42.google.com ([209.85.213.42]:36051)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <garyo@HIDDEN>) id 1dfyNh-0006Xq-I8
 for 3418 <at> debbugs.gnu.org; Thu, 10 Aug 2017 21:04:55 -0400
Received: by mail-vk0-f42.google.com with SMTP id u133so8734530vke.3
 for <3418 <at> debbugs.gnu.org>; Thu, 10 Aug 2017 18:04:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=genarts-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=ctt/TRuaj5miev91r/GJkOYjpNEBOzM0+2IgP95ctaA=;
 b=V/rUukxRJSGkZUCuctTO1bqNjM7Bjg+wEyzmoRziodUSQIEpOGZAgFphQzipJc9Dqq
 f5EeUAlMzQPEraqvJ0udZabrARexX+6uTnMBPapPwMgwxLg7s8u5ASQN4tIkfSC6WmOU
 XU5AoXRjHQd/k8QpYiPV64Hg/YFxWrOqRcTStBaXfh6MxVrhIIXYdEuqxt5VUKgnQd/t
 Y+F14TiWakkXt2dZha2ZCWZWhIB4PZn25uCbEsKIo4md5Cg7QyXX6uVE1UB3KwxfDGJW
 Fp7QeZ6JLE3EJbbkdxonQJuhEdzB0hV6Mn8UOL2B73ZBoEHx/QXgdvSiqlkhI6Cce4EA
 trJQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=ctt/TRuaj5miev91r/GJkOYjpNEBOzM0+2IgP95ctaA=;
 b=fGVawpT7qN7t9ynrKGuhOqRI391aACAqT9xZIR+2cfaHDNGXDVOsxkh6FcfSGaYpLW
 L7RLD9eRy/zHAhGP8DZJ6F4NbsgWkVKhPTar2X9bOLe+BBbjhDUDEzajqsatq2g1yIeD
 LcbWGCMYk0OA0O2OcMWh7xz0a/zFu4E0pmMD5ZbJWlb1dXRvhfe7z6qtlUXSsoY5hp0w
 RVoMHuTnl0oeOhHP2V3cfU2k0aWs50mp8W3ZZKFQJ7safkEUf1A5gC1q/iXWGmHFc/X3
 LcPAVKVXTCdX8r0fKahaKI3Od35Eou9QySKm49pzfSzqKKQh3QxbRdmwO4wf8zUE6QcV
 YPFQ==
X-Gm-Message-State: AHYfb5hvXj4eIXuAN6708g5KQI04pjxBpFEOO8SHjlDwz16n7h0khEy3
 hJRxbxXp2yQBzTNiEPxZgWcCmjVl6YkW
X-Received: by 10.31.63.151 with SMTP id m145mr8788518vka.59.1502413487944;
 Thu, 10 Aug 2017 18:04:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.86.78 with HTTP; Thu, 10 Aug 2017 18:04:47 -0700 (PDT)
In-Reply-To: <878tir2ai2.fsf@HIDDEN>
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.fsf@HIDDEN>
 <83vb6g1jwt.fsf@HIDDEN>
 <799658909.580977.1453821327904.JavaMail.zimbra@HIDDEN>
 <83fuxk1fxp.fsf@HIDDEN>
 <681830756.582148.1453825181223.JavaMail.zimbra@HIDDEN>
 <878tir2ai2.fsf@HIDDEN>
From: Gary Oberbrunner <garyo@HIDDEN>
Date: Thu, 10 Aug 2017 21:04:47 -0400
Message-ID: <CAC9WR4rVMceVnUNZSaDRpj0w6kjQJiD1FVDC+=XoWyZb2S=5bg@HIDDEN>
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
To: npostavs@HIDDEN
Content-Type: multipart/alternative; boundary="001a114dbdf64156dd05566fe606"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 3418
Cc: Eli Zaretskii <eliz@HIDDEN>, 3418 <at> debbugs.gnu.org,
 Andrew Hyatt <ahyatt@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.0 (/)

--001a114dbdf64156dd05566fe606
Content-Type: text/plain; charset="UTF-8"

This sounds perfect to me.

On Thu, Aug 10, 2017 at 8:50 PM, <npostavs@HIDDEN> wrote:

> Gary Oberbrunner <garyo@HIDDEN> writes:
>
> > If a user (such as myself) has an implementation of this function in his
> .emacs today, like so:
> >
> > (defun process-error-filename (filename)
> >   ;;; do stuff with filename
> >   filename)
> > (setq compilation-parse-errors-filename-function
> 'process-error-filename)
> >
> > and we add a new argument that gets passed to that function, it'll throw
> an error. *Users* will have to add
> >   &optional spec-dir
> > to their implementations of it to avoid the error.
>
> We could do something like
>
>     (condition-case err
>         (funcall compilation-parse-errors-filename-function filename
> spec-dir)
>       (wrong-number-of-arguments
>        ;; Try again with single arg for backwards compatibility.
>        (funcall compilation-parse-errors-filename-function filename)))
>



-- 
Gary Oberbrunner *--* CTO *--* Boris FX

--001a114dbdf64156dd05566fe606
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">This sounds perfect to me.</div><div class=3D"gmail_extra"=
><br><div class=3D"gmail_quote">On Thu, Aug 10, 2017 at 8:50 PM,  <span dir=
=3D"ltr">&lt;<a href=3D"mailto:npostavs@HIDDEN" target=3D"_b=
lank">npostavs@HIDDEN</a>&gt;</span> wrote:<br><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex"><span class=3D"">Gary Oberbrunner &lt;<a href=3D"mailto:g=
aryo@HIDDEN">garyo@HIDDEN</a>&gt; writes:<br>
<br>
&gt; If a user (such as myself) has an implementation of this function in h=
is .emacs today, like so:<br>
&gt;<br>
&gt; (defun process-error-filename (filename)<br>
&gt;=C2=A0 =C2=A0;;; do stuff with filename<br>
&gt;=C2=A0 =C2=A0filename)<br>
&gt; (setq compilation-parse-errors-<wbr>filename-function &#39;process-err=
or-filename)<br>
&gt;<br>
&gt; and we add a new argument that gets passed to that function, it&#39;ll=
 throw an error. *Users* will have to add<br>
&gt;=C2=A0 =C2=A0&amp;optional spec-dir<br>
&gt; to their implementations of it to avoid the error.<br>
<br>
</span>We could do something like<br>
<br>
=C2=A0 =C2=A0 (condition-case err<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (funcall compilation-parse-errors-<wbr>filename=
-function filename spec-dir)<br>
=C2=A0 =C2=A0 =C2=A0 (wrong-number-of-arguments<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Try again with single arg for backwards compa=
tibility.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0(funcall compilation-parse-errors-<wbr>filename-=
function filename)))<br>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class=
=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">Ga=
ry Oberbrunner <b>--</b>=C2=A0CTO <b>--</b> Boris FX</div></div>
</div>

--001a114dbdf64156dd05566fe606--




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

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


Received: (at 3418) by debbugs.gnu.org; 11 Aug 2017 00:49:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 10 20:49:00 2017
Received: from localhost ([127.0.0.1]:54898 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dfy8J-0004Jy-4L
	for submit <at> debbugs.gnu.org; Thu, 10 Aug 2017 20:49:00 -0400
Received: from mail-it0-f53.google.com ([209.85.214.53]:35517)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1dfy8H-0004Jm-Ix
 for 3418 <at> debbugs.gnu.org; Thu, 10 Aug 2017 20:48:57 -0400
Received: by mail-it0-f53.google.com with SMTP id 76so21320462ith.0
 for <3418 <at> debbugs.gnu.org>; Thu, 10 Aug 2017 17:48:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=kyJFqcbdz/Gi2K4vswEOYTcfcgApYvtRHRF6q5hZ1i8=;
 b=n99ahar1jNZqSSiqj2YWs3R42kRzfhezAsiX7tvERC3hy1jUG49527cf8vflYKFwi7
 eM4d740+ZGBbQj04sVJfEVYtmIsHEtmsuDk0TnIh1dfJusKmuZ96W70CpR9EOHi94gC6
 1Aj7qFe8J9ubONeKmekOega/H+2A03VDrL7DejnFbfTpxZJYX4RM2TLiCnvqNMjWHouc
 qhWwFlW1MDyONDDgXUjannvf8grSFqZ3XCfASGa/rmZzSE/5pz/81nYFl2pHETwVY2Pc
 gogYMJXOH+WxvarJEEZBedKOcVRSoT++G9w1oq6PeO9ADE7g3bTNyzO7+Fqv1ueSqZVQ
 rT6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=kyJFqcbdz/Gi2K4vswEOYTcfcgApYvtRHRF6q5hZ1i8=;
 b=R9+N6alrYqa0fOiBoVSaxECWZEvKd/e+Xa4dbmr1afOvZuRB2W+ap9IN2L9rAYh/eQ
 z1ArgjApvvVjIeH83nrkqMgT5Nho+l9mFY+gwO2f2ny5t240LvhVaTXQ2khqspiyJlLj
 3KP75pu9RBNYdhS04ZbkEOFx8/+Iz/EokzCghw5++2slKQvx9cEKf2U5jbFyb1KC/FF4
 Ma5pMmB9iR6SpQQGHE0Q/UuP0I9zO4ZX6OQ5tyZqNdHBMFyzQCtKVcLEdkS0c4PMfC9i
 iaUCDqTyhArV7woOHO5Te3XpvmX05hPdIaMXfkh5ji0dH4gvCxHu5ftMtyJrRfBkAcjn
 Q0rQ==
X-Gm-Message-State: AHYfb5iNUEO2RwnL/NJo/L2kFjQWDHVOlzHgSbCTtJY+T2ea8p4LhnoM
 9rTumGTiugVxNQ==
X-Received: by 10.36.244.9 with SMTP id d9mr8421348iti.149.1502412532000;
 Thu, 10 Aug 2017 17:48:52 -0700 (PDT)
Received: from zony ([45.2.119.49])
 by smtp.googlemail.com with ESMTPSA id a70sm3678018ioe.88.2017.08.10.17.48.50
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Thu, 10 Aug 2017 17:48:51 -0700 (PDT)
From: npostavs@HIDDEN
To: Gary Oberbrunner <garyo@HIDDEN>
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.fsf@HIDDEN>
 <83vb6g1jwt.fsf@HIDDEN>
 <799658909.580977.1453821327904.JavaMail.zimbra@HIDDEN>
 <83fuxk1fxp.fsf@HIDDEN>
 <681830756.582148.1453825181223.JavaMail.zimbra@HIDDEN>
Date: Thu, 10 Aug 2017 20:50:29 -0400
In-Reply-To: <681830756.582148.1453825181223.JavaMail.zimbra@HIDDEN>
 (Gary Oberbrunner's message of "Tue, 26 Jan 2016 11:19:41 -0500 (EST)")
Message-ID: <878tir2ai2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 3418
Cc: Eli Zaretskii <eliz@HIDDEN>, 3418 <at> debbugs.gnu.org,
 Andrew Hyatt <ahyatt@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.0 (/)

Gary Oberbrunner <garyo@HIDDEN> writes:

> If a user (such as myself) has an implementation of this function in his .emacs today, like so:
>
> (defun process-error-filename (filename)
>   ;;; do stuff with filename
>   filename)
> (setq compilation-parse-errors-filename-function 'process-error-filename)
>
> and we add a new argument that gets passed to that function, it'll throw an error. *Users* will have to add 
>   &optional spec-dir 
> to their implementations of it to avoid the error.

We could do something like

    (condition-case err
        (funcall compilation-parse-errors-filename-function filename spec-dir)
      (wrong-number-of-arguments
       ;; Try again with single arg for backwards compatibility.
       (funcall compilation-parse-errors-filename-function filename)))




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

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


Received: (at 3418) by debbugs.gnu.org; 26 Jan 2016 16:30:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 26 11:30:47 2016
Received: from localhost ([127.0.0.1]:37837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aO6Vz-0002Vs-Dc
	for submit <at> debbugs.gnu.org; Tue, 26 Jan 2016 11:30:47 -0500
Received: from hq.genarts.com ([173.9.65.1]:52968 helo=mail.hq.genarts.com)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <garyo@HIDDEN>) id 1aO6LK-0002Eq-KA
 for 3418 <at> debbugs.gnu.org; Tue, 26 Jan 2016 11:19:46 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id 28130BE021A;
 Tue, 26 Jan 2016 11:19:46 -0500 (EST)
Received: from mail.hq.genarts.com ([127.0.0.1])
 by localhost (mail.hq.genarts.com [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id bAuWhzTQ8Qhr; Tue, 26 Jan 2016 11:19:41 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id 830CABE10D8;
 Tue, 26 Jan 2016 11:19:41 -0500 (EST)
X-Virus-Scanned: amavisd-new at mail.hq.genarts.com
Received: from mail.hq.genarts.com ([127.0.0.1])
 by localhost (mail.hq.genarts.com [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id cZLkwUoIsb9O; Tue, 26 Jan 2016 11:19:41 -0500 (EST)
Received: from mail.hq.genarts.com (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id 53BC7BE10B7;
 Tue, 26 Jan 2016 11:19:41 -0500 (EST)
Date: Tue, 26 Jan 2016 11:19:41 -0500 (EST)
From: Gary Oberbrunner <garyo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Message-ID: <681830756.582148.1453825181223.JavaMail.zimbra@HIDDEN>
In-Reply-To: <83fuxk1fxp.fsf@HIDDEN>
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.fsf@HIDDEN>
 <83vb6g1jwt.fsf@HIDDEN>
 <799658909.580977.1453821327904.JavaMail.zimbra@HIDDEN>
 <83fuxk1fxp.fsf@HIDDEN>
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.6.0_GA_1182 (ZimbraWebClient - GC47 (Win)/8.6.0_GA_1182)
Thread-Topic: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
Thread-Index: SL2L+9QUBfhd71/sNi0sVdOw2rthGg==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 3418
X-Mailman-Approved-At: Tue, 26 Jan 2016 11:30:45 -0500
Cc: Andrew Hyatt <ahyatt@HIDDEN>, 3418 <3418 <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: -0.0 (/)

Hi, Eli. 
If a user (such as myself) has an implementation of this function in his .emacs today, like so:

(defun process-error-filename (filename)
  ;;; do stuff with filename
  filename)
(setq compilation-parse-errors-filename-function 'process-error-filename)

and we add a new argument that gets passed to that function, it'll throw an error. *Users* will have to add 
  &optional spec-dir 
to their implementations of it to avoid the error.

(And btw, I've already done that in mine, so I'm future-proof. :-))

-- Gary

----- Original Message -----
> From: "Eli Zaretskii" <eliz@HIDDEN>
> To: "Gary Oberbrunner" <garyo@HIDDEN>
> Cc: "Andrew Hyatt" <ahyatt@HIDDEN>, "3418" <3418 <at> debbugs.gnu.org>
> Sent: Tuesday, January 26, 2016 11:08:50 AM
> Subject: Re: bug#3418: Issue with compile.el and	compilation-parse-errors-filename-function

>> Date: Tue, 26 Jan 2016 10:15:27 -0500 (EST)
>> From: Gary Oberbrunner <garyo@HIDDEN>
>> Cc: Andrew Hyatt <ahyatt@HIDDEN>, 3418 <at> debbugs.gnu.org
>> 
>> Wow, a blast from the past!
> 
> Better late than never, right?
> 
>> I am totally happy with soln 1. For all I know, since I added that hook I might
>> be the only one using it. :-) But I'm also usually a stickler for backward
>> compatibility, so that's why I brought it up.
> 
> But if we make the additional argument optional, the backward
> compatibility is preserved, right?  Or did I miss something?

-- 
Gary Oberbrunner




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

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


Received: (at 3418) by debbugs.gnu.org; 26 Jan 2016 16:30:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 26 11:30:47 2016
Received: from localhost ([127.0.0.1]:37835 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aO6Vz-0002Vq-0J
	for submit <at> debbugs.gnu.org; Tue, 26 Jan 2016 11:30:47 -0500
Received: from hq.genarts.com ([173.9.65.1]:35118 helo=mail.hq.genarts.com)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <garyo@HIDDEN>) id 1aO5LB-0000g1-Bd
 for 3418 <at> debbugs.gnu.org; Tue, 26 Jan 2016 10:15:33 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id 2151EBE03E2;
 Tue, 26 Jan 2016 10:15:33 -0500 (EST)
Received: from mail.hq.genarts.com ([127.0.0.1])
 by localhost (mail.hq.genarts.com [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id JOqAqCUwHH1m; Tue, 26 Jan 2016 10:15:28 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id 48F59BE0C6C;
 Tue, 26 Jan 2016 10:15:28 -0500 (EST)
X-Virus-Scanned: amavisd-new at mail.hq.genarts.com
Received: from mail.hq.genarts.com ([127.0.0.1])
 by localhost (mail.hq.genarts.com [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 6ehzH3rI2yc0; Tue, 26 Jan 2016 10:15:28 -0500 (EST)
Received: from mail.hq.genarts.com (localhost [127.0.0.1])
 by mail.hq.genarts.com (Postfix) with ESMTP id 1A3ABBE03E2;
 Tue, 26 Jan 2016 10:15:28 -0500 (EST)
Date: Tue, 26 Jan 2016 10:15:27 -0500 (EST)
From: Gary Oberbrunner <garyo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Message-ID: <799658909.580977.1453821327904.JavaMail.zimbra@HIDDEN>
In-Reply-To: <83vb6g1jwt.fsf@HIDDEN>
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.fsf@HIDDEN>
 <83vb6g1jwt.fsf@HIDDEN>
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.6.0_GA_1182 (ZimbraWebClient - GC47 (Win)/8.6.0_GA_1182)
Thread-Topic: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
Thread-Index: dW+0q8UHvR3Odqxg0txhf8l/h6VQfg==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 3418
X-Mailman-Approved-At: Tue, 26 Jan 2016 11:30:45 -0500
Cc: Andrew Hyatt <ahyatt@HIDDEN>, 3418 <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: -0.0 (/)

Wow, a blast from the past! 

I am totally happy with soln 1. For all I know, since I added that hook I might be the only one using it. :-) But I'm also usually a stickler for backward compatibility, so that's why I brought it up.

As for how to make it happen, I'm not sure what triggers the absolute vs. relative names getting passed around in compilation-parse-errors; it probably depends on what it finds in the *compilation* buffer. But Andrew, in order for this to matter at all, the emacs user has to have added their own compilation-parse-errors-filename-function, so "normal" users wouldn't be affected by this at all.

The use case is a build system that copies/symlinks the sources to a build dir and compiles them there rather than in their original location. Compilation errors will be given relative to that build dir, not the original source. A user with such a build system would make a compilation-parse-errors-filename-function that would string-replace the build dir to the source dir, so next-error would jump to the proper source file (not the build dir copy).

----- Original Message -----
> From: "Eli Zaretskii" <eliz@HIDDEN>
> To: "Andrew Hyatt" <ahyatt@HIDDEN>
> Cc: "Gary Oberbrunner" <garyo@HIDDEN>, 3418 <at> debbugs.gnu.org
> Sent: Tuesday, January 26, 2016 9:42:58 AM
> Subject: Re: bug#3418: Issue with compile.el and	compilation-parse-errors-filename-function

>> From: Andrew Hyatt <ahyatt@HIDDEN>
>> Date: Tue, 26 Jan 2016 00:21:51 -0500
>> Cc: 3418 <at> debbugs.gnu.org
>> 
>> Gary Oberbrunner <garyo@HIDDEN> writes:
>> 
>> > Hi emacs folks.  I submitted a patch to compilation-get-file-structure in
>> > compile.el in 2001, introducing this stanza:
>> >
>> > 	;; If compilation-parse-errors-filename-function is
>> > 	;; defined, use it to process the filename.
>> > 	(when compilation-parse-errors-filename-function
>> > 	  (setq filename
>> > 		(funcall
>> > 			 filename)))
>> >
>> > At some point since then, the filename was changed to not always be absolute;
>> > there's now a variable spec-directory in that function.  This means that
>> > implementations of compilation-parse-errors-filename-function can't always work
>> > correctly since it doesn't know the full path of the file.
>> >
>> > I'm happy to work on a fix, but I see a few issues.
>> >
>> > Solution 1: add 2nd arg SPEC-DIRECTORY to
>> > compilation-parse-errors-filename-function.
>> > Problem: existing implementations will get an incorrect number of args error and
>> > will have to change.
>> >
>> > Solution 2: make filename absolute before passing to
>> > compilation-parse-errors-filename-function.
>> > Problem: the rest of the code is pretty careful not to absolutize the filename;
>> > this would change the behavior in ways I don't completely understand.
>> >
>> > Of course I am personally happy with solution 1, but since it affects
>> > compatibility I thought I should bring it up on this list.  I am not on the
>> > list, so please cc me with any replies, thanks!
>> 
>> Sadly, this bug hasn't been responded to.  Your description is pretty
>> code-intensive, for those of us not familiar with the internals, can you
>> give instructions on how to reproduce a user-visible issue?
> 
> FWIW, I don't see why not adopt Soution 1, just make the second
> argument optional.  That would be backward-compatible, IIUC.

-- 
Gary Oberbrunner




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

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


Received: (at 3418) by debbugs.gnu.org; 26 Jan 2016 16:08:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 26 11:08:33 2016
Received: from localhost ([127.0.0.1]:37819 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aO6AT-0001yl-1L
	for submit <at> debbugs.gnu.org; Tue, 26 Jan 2016 11:08:33 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42073)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <eliz@HIDDEN>) id 1aO6AR-0001yY-8S
 for 3418 <at> debbugs.gnu.org; Tue, 26 Jan 2016 11:08:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aO6AH-0004bv-Vm
 for 3418 <at> debbugs.gnu.org; Tue, 26 Jan 2016 11:08:26 -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_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38795)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aO6AH-0004br-Sz; Tue, 26 Jan 2016 11:08:21 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1359
 helo=HOME-C4E4A596F7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1aO6AH-0007qh-6e; Tue, 26 Jan 2016 11:08:21 -0500
Date: Tue, 26 Jan 2016 18:08:50 +0200
Message-Id: <83fuxk1fxp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gary Oberbrunner <garyo@HIDDEN>
In-reply-to: <799658909.580977.1453821327904.JavaMail.zimbra@HIDDEN>
 (message from Gary Oberbrunner on Tue, 26 Jan 2016 10:15:27 -0500
 (EST))
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.fsf@HIDDEN>
 <83vb6g1jwt.fsf@HIDDEN>
 <799658909.580977.1453821327904.JavaMail.zimbra@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: 3418
Cc: ahyatt@HIDDEN, 3418 <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>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> Date: Tue, 26 Jan 2016 10:15:27 -0500 (EST)
> From: Gary Oberbrunner <garyo@HIDDEN>
> Cc: Andrew Hyatt <ahyatt@HIDDEN>, 3418 <at> debbugs.gnu.org
> 
> Wow, a blast from the past! 

Better late than never, right?

> I am totally happy with soln 1. For all I know, since I added that hook I might be the only one using it. :-) But I'm also usually a stickler for backward compatibility, so that's why I brought it up.

But if we make the additional argument optional, the backward
compatibility is preserved, right?  Or did I miss something?




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

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


Received: (at 3418) by debbugs.gnu.org; 26 Jan 2016 14:42:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 26 09:42:41 2016
Received: from localhost ([127.0.0.1]:36736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aO4pM-00084B-Ql
	for submit <at> debbugs.gnu.org; Tue, 26 Jan 2016 09:42:41 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58461)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <eliz@HIDDEN>) id 1aO4pL-00083y-TO
 for 3418 <at> debbugs.gnu.org; Tue, 26 Jan 2016 09:42:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aO4pC-00058F-T8
 for 3418 <at> debbugs.gnu.org; Tue, 26 Jan 2016 09:42:34 -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.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37295)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aO4pC-00058B-PW; Tue, 26 Jan 2016 09:42:30 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1326
 helo=HOME-C4E4A596F7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1aO4pC-0007I3-3F; Tue, 26 Jan 2016 09:42:30 -0500
Date: Tue, 26 Jan 2016 16:42:58 +0200
Message-Id: <83vb6g1jwt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrew Hyatt <ahyatt@HIDDEN>
In-reply-to: <m2y4bczzio.fsf@HIDDEN> (message from Andrew Hyatt on Tue, 26
 Jan 2016 00:21:51 -0500)
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
References: <4A1FF55B.4040202@HIDDEN> <m2y4bczzio.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: 3418
Cc: 3418 <at> debbugs.gnu.org, garyo@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>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Andrew Hyatt <ahyatt@HIDDEN>
> Date: Tue, 26 Jan 2016 00:21:51 -0500
> Cc: 3418 <at> debbugs.gnu.org
> 
> Gary Oberbrunner <garyo@HIDDEN> writes:
> 
> > Hi emacs folks.  I submitted a patch to compilation-get-file-structure in
> > compile.el in 2001, introducing this stanza:
> >
> > 	;; If compilation-parse-errors-filename-function is
> > 	;; defined, use it to process the filename.
> > 	(when compilation-parse-errors-filename-function
> > 	  (setq filename
> > 		(funcall
> > 			 filename)))
> >
> > At some point since then, the filename was changed to not always be absolute;
> > there's now a variable spec-directory in that function.  This means that
> > implementations of compilation-parse-errors-filename-function can't always work
> > correctly since it doesn't know the full path of the file.
> >
> > I'm happy to work on a fix, but I see a few issues.
> >
> > Solution 1: add 2nd arg SPEC-DIRECTORY to
> > compilation-parse-errors-filename-function.
> > Problem: existing implementations will get an incorrect number of args error and
> > will have to change.
> >
> > Solution 2: make filename absolute before passing to
> > compilation-parse-errors-filename-function.
> > Problem: the rest of the code is pretty careful not to absolutize the filename;
> > this would change the behavior in ways I don't completely understand.
> >
> > Of course I am personally happy with solution 1, but since it affects
> > compatibility I thought I should bring it up on this list.  I am not on the
> > list, so please cc me with any replies, thanks!
> 
> Sadly, this bug hasn't been responded to.  Your description is pretty
> code-intensive, for those of us not familiar with the internals, can you
> give instructions on how to reproduce a user-visible issue?

FWIW, I don't see why not adopt Soution 1, just make the second
argument optional.  That would be backward-compatible, IIUC.




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

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


Received: (at 3418) by debbugs.gnu.org; 26 Jan 2016 05:22:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 26 00:22:01 2016
Received: from localhost ([127.0.0.1]:36534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aNw4n-0001od-DR
	for submit <at> debbugs.gnu.org; Tue, 26 Jan 2016 00:22:01 -0500
Received: from mail-qg0-f51.google.com ([209.85.192.51]:34975)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <ahyatt@HIDDEN>) id 1aNw4l-0001oQ-Cw
 for 3418 <at> debbugs.gnu.org; Tue, 26 Jan 2016 00:21:59 -0500
Received: by mail-qg0-f51.google.com with SMTP id o11so127368405qge.2
 for <3418 <at> debbugs.gnu.org>; Mon, 25 Jan 2016 21:21:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-type;
 bh=GwIuC70tPWeLowSfPnpXBD+rNPjEtMgt8KIy/SCDn8M=;
 b=TywwXHpWzyi58mmaxd81xcaEc5/l0cPNwq/v/NGio53f+3LSjamUW3hkFnGNGEVv66
 Nb/K6sh7j8iF8v+6do758PrZS1BBO5f4YqQ+uIMM58HrMplgxuzGmO+eSRP2tie8bCV7
 cgVxczECGdhVxPHvMM4d/HjhiXFuQkhOgaq4KneXCr4xBkfjMjxB31rfPf3jUWpMuRZA
 WqNIOsF0YaQPtZrJO8sFSwODZg9hq2YZQduMvNVEGUDk2XOweHv6Pqm5m8yYdjAmIh8d
 Btk8D6v1phUi56V1GCI6J4B4pirA+1WJFWOTefBMTYBf7Q/w2bKzV4i/tSBKvPoMKhdX
 bE7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-type;
 bh=GwIuC70tPWeLowSfPnpXBD+rNPjEtMgt8KIy/SCDn8M=;
 b=C7GKn5tQ/mZRl1RU9yGlJT66G9zHd5T1tBayQcS0b8+DPaw+HBjOeVAq+DZptEfUz3
 JoGBQ1P+AD/Gqfan5PiSx0tx+0ufLVB2B9KxXiFnGhdB8rQAlz6Z8VqAD9sia3jd6KxE
 97HmXcFKQ1dQPw/6LhMLwHQQHZXq/pfNyYSAf1sdOSAF8a1Zs/n15jPSFEBIwm5ZhPyf
 sBH4rqCn0xWWt9PisZopJM46jTzdA4H12SeVntVrmwvqPZXV7G2sjRV2/QDN4ZejqLnF
 OvGFeI2H4L7TRriqMPfuTpubcpON1x/xaUdgjMrQowBZ5xSuLwGEIKbwA4b+/PCpcJk3
 VRmw==
X-Gm-Message-State: AG10YOQP3V9i2/5DBaPU6us7biJlyAAo2YKMf2mWfUE8o8bQ69evGS/BdS0tR7tsHn+0tw==
X-Received: by 10.55.204.80 with SMTP id r77mr26910780qki.25.1453785714067;
 Mon, 25 Jan 2016 21:21:54 -0800 (PST)
Received: from Andrews-MacBook-Pro.local.ahyatt-laptop
 (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199])
 by smtp.gmail.com with ESMTPSA id y129sm10199773qka.33.2016.01.25.21.21.53
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 25 Jan 2016 21:21:53 -0800 (PST)
From: Andrew Hyatt <ahyatt@HIDDEN>
To: Gary Oberbrunner <garyo@HIDDEN>
Subject: Re: bug#3418: Issue with compile.el and
 compilation-parse-errors-filename-function
References: <4A1FF55B.4040202@HIDDEN>
Date: Tue, 26 Jan 2016 00:21:51 -0500
In-Reply-To: <4A1FF55B.4040202@HIDDEN> (Gary Oberbrunner's message of
 "Fri, 29 May 2009 10:46:51 -0400")
Message-ID: <m2y4bczzio.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 3418
Cc: 3418 <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: -0.7 (/)


Gary Oberbrunner <garyo@HIDDEN> writes:

> Hi emacs folks.  I submitted a patch to compilation-get-file-structure in
> compile.el in 2001, introducing this stanza:
>
> 	;; If compilation-parse-errors-filename-function is
> 	;; defined, use it to process the filename.
> 	(when compilation-parse-errors-filename-function
> 	  (setq filename
> 		(funcall
> 			 filename)))
>
> At some point since then, the filename was changed to not always be absolute;
> there's now a variable spec-directory in that function.  This means that
> implementations of compilation-parse-errors-filename-function can't always work
> correctly since it doesn't know the full path of the file.
>
> I'm happy to work on a fix, but I see a few issues.
>
> Solution 1: add 2nd arg SPEC-DIRECTORY to
> compilation-parse-errors-filename-function.
> Problem: existing implementations will get an incorrect number of args error and
> will have to change.
>
> Solution 2: make filename absolute before passing to
> compilation-parse-errors-filename-function.
> Problem: the rest of the code is pretty careful not to absolutize the filename;
> this would change the behavior in ways I don't completely understand.
>
> Of course I am personally happy with solution 1, but since it affects
> compatibility I thought I should bring it up on this list.  I am not on the
> list, so please cc me with any replies, thanks!

Sadly, this bug hasn't been responded to.  Your description is pretty
code-intensive, for those of us not familiar with the internals, can you
give instructions on how to reproduce a user-visible issue?




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

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 29 May 2009 14:47:05 +0000
From garyo@HIDDEN Fri May 29 07:47:05 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,MURPHY_DRUGS_REL8
	autolearn=no version=3.2.5-bugs.debian.org_2005_01_02
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4TEkxah005172
	for <submit@HIDDEN>; Fri, 29 May 2009 07:47:01 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MA3MJ-0003dK-Ag
	for bug-gnu-emacs@HIDDEN; Fri, 29 May 2009 10:46:59 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MA3MG-0003cL-Gz
	for bug-gnu-emacs@HIDDEN; Fri, 29 May 2009 10:46:57 -0400
Received: from [199.232.76.173] (port=33876 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1MA3ME-0003be-D3
	for bug-gnu-emacs@HIDDEN; Fri, 29 May 2009 10:46:54 -0400
Received: from hq.genarts.com ([173.9.65.1]:43386 helo=mail.hq.genarts.com)
	by monty-python.gnu.org with smtp (Exim 4.60)
	(envelope-from <garyo@HIDDEN>)
	id 1MA3MD-0001Nj-Ns
	for bug-gnu-emacs@HIDDEN; Fri, 29 May 2009 10:46:54 -0400
Received: from mail.hq.genarts.com (mail.hq.genarts.com [10.102.202.62])
	by penguin (Postfix) with SMTP id 8846712D861B
	for <bug-gnu-emacs@HIDDEN>; Fri, 29 May 2009 10:46:52 -0400 (EDT)
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mail.hq.genarts.com (Postfix) with ESMTP id 7C3E514B4002
	for <bug-gnu-emacs@HIDDEN>; Fri, 29 May 2009 10:46:52 -0400 (EDT)
X-Virus-Scanned: amavisd-new at mail.hq.genarts.com
Received: from mail.hq.genarts.com ([127.0.0.1])
	by localhost (mail.hq.genarts.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id QuvOBusoyIaA for <bug-gnu-emacs@HIDDEN>;
	Fri, 29 May 2009 10:46:51 -0400 (EDT)
Received: from [10.101.201.42] (noise.hq.genarts.com [10.101.201.42])
	by mail.hq.genarts.com (Postfix) with ESMTP id 1077C14B4001
	for <bug-gnu-emacs@HIDDEN>; Fri, 29 May 2009 10:46:51 -0400 (EDT)
Message-ID: <4A1FF55B.4040202@HIDDEN>
Date: Fri, 29 May 2009 10:46:51 -0400
From: Gary Oberbrunner <garyo@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20081218 Lightning/1.0pre Shredder/3.0b2pre Mnenhy/0.7.6.0
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: Issue with compile.el and compilation-parse-errors-filename-function
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized.

Hi emacs folks.  I submitted a patch to compilation-get-file-structure 
in compile.el in 2001, introducing this stanza:

	;; If compilation-parse-errors-filename-function is
	;; defined, use it to process the filename.
	(when compilation-parse-errors-filename-function
	  (setq filename
		(funcall
			 filename)))

At some point since then, the filename was changed to not always be 
absolute; there's now a variable spec-directory in that function.  This 
means that implementations of compilation-parse-errors-filename-function 
can't always work correctly since it doesn't know the full path of the file.

I'm happy to work on a fix, but I see a few issues.

Solution 1: add 2nd arg SPEC-DIRECTORY to 
compilation-parse-errors-filename-function.
Problem: existing implementations will get an incorrect number of args 
error and will have to change.

Solution 2: make filename absolute before passing to 
compilation-parse-errors-filename-function.
Problem: the rest of the code is pretty careful not to absolutize the 
filename; this would change the behavior in ways I don't completely 
understand.

Of course I am personally happy with solution 1, but since it affects 
compatibility I thought I should bring it up on this list.  I am not on 
the list, so please cc me with any replies, thanks!

-- 
. . . . . . . . . . . . . . . . . . . . . . . . .
Gary Oberbrunner                garyo@HIDDEN
GenArts, Inc.                   Tel: 617-492-2888
955 Mass. Ave                   Fax: 617-492-2852
Cambridge, MA 02139 USA         www.genarts.com




Acknowledgement sent to Gary Oberbrunner <garyo@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3418; 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: Mon, 25 Nov 2019 12:00:02 UTC

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