all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] eliminate false positive in compile.el
@ 2010-03-25  4:07 Daniel Colascione
  2010-03-25 19:24 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Colascione @ 2010-03-25  4:07 UTC (permalink / raw)
  To: Emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

=== modified file 'lisp/progmodes/compile.el'
- --- lisp/progmodes/compile.el	2010-03-24 13:41:07 +0000
+++ lisp/progmodes/compile.el	2010-03-25 03:22:22 +0000
@@ -262,7 +262,7 @@
 \\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\
 \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
  *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated
from\\|[Nn]ote\\)\\|\
- -\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
+\[0-9]?\\(?:[^0-9\n]\\)\\|[0-9][0-9][0-9]\\)"
      1 (2 . 5) (4 . 6) (7 . 8))

     ;; The `gnu' style above can incorrectly match gcc's "In file

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkuq4ZsACgkQ17c2LVA10VvzmwCfZ/SDqMc4EkLjwdiDuxARiWLV
LuAAoNYkH3yw0VtDaPNpczxQ1xMAUaa0
=27+E
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] eliminate false positive in compile.el
  2010-03-25  4:07 [PATCH] eliminate false positive in compile.el Daniel Colascione
@ 2010-03-25 19:24 ` Stefan Monnier
  2010-03-25 19:49   ` Daniel Colascione
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-03-25 19:24 UTC (permalink / raw)
  To: Daniel Colascione; +Cc: Emacs-devel

> === modified file 'lisp/progmodes/compile.el'
> - --- lisp/progmodes/compile.el	2010-03-24 13:41:07 +0000
> +++ lisp/progmodes/compile.el	2010-03-25 03:22:22 +0000
> @@ -262,7 +262,7 @@
>  \\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\
>  \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
>   *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated
> from\\|[Nn]ote\\)\\|\
> -\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
> +\[0-9]?\\(?:[^0-9\n]\\)\\|[0-9][0-9][0-9]\\)"

which simplifies to

\[0-9]?[^0-9\n]\\|[0-9][0-9][0-9]\\)"

Could you give some rationale for this change other than just "eliminate
false positive"?  I mean, someone went to the trouble to add the
\\(?:...\\|$\\), so there should be a good reason to remove it,


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] eliminate false positive in compile.el
  2010-03-25 19:24 ` Stefan Monnier
@ 2010-03-25 19:49   ` Daniel Colascione
       [not found]     ` <201003252103.o2PL3PuE006566@godzilla.ics.uci.edu>
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Colascione @ 2010-03-25 19:49 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/25/10 3:24 PM, Stefan Monnier wrote:
>> -\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
>> +\[0-9]?\\(?:[^0-9\n]\\)\\|[0-9][0-9][0-9]\\)"
> 
> which simplifies to
> 
> \[0-9]?[^0-9\n]\\|[0-9][0-9][0-9]\\)"

Right; I just figured I'd make the change minimal.

> 
> Could you give some rationale for this change other than just "eliminate
> false positive"?  I mean, someone went to the trouble to add the
> \\(?:...\\|$\\), so there should be a good reason to remove it,

Well, I prefer to not match "included from" lines from gcc, but with the
current gnu compile matcher, it's impossible not to do that. What these
lines all have in common is that they end with ":" or ":,". gnu doesn't
match the latter, but it does match the former, which is always the last
line before the real error message.

By removing |$, we prevent the gnu matcher from matching compile error
lines that appear to have an empty message, which fixes the above issue.
The gcc-include matcher does catch the "included from" lines if people
want to use it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkurvj8ACgkQ17c2LVA10VtzqwCdH70b7c4C8PI16DNNBCh1fIm/
j9UAn365appc78wzgCaPB324IltUUk57
=U7eK
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] eliminate false positive in compile.el
       [not found]     ` <201003252103.o2PL3PuE006566@godzilla.ics.uci.edu>
@ 2010-03-25 21:05       ` Daniel Colascione
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Colascione @ 2010-03-25 21:05 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Stefan Monnier, Emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/25/10 5:03 PM, Dan Nicolaescu wrote:
> So what should happen with those lines?
> I hop this does not mean that they are not highlighted at all, I use
> them all the time to look at all inclusion points looking for
> problems.

'gnu' never matched all those lines reliably anyway. 'gcc-include' does
what you want, and it's still enabled by default.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkur0AgACgkQ17c2LVA10VuJnwCdGWwS9yyflLkM2ctvcZX/arm2
1EgAoOZKSNxUyPL0aJqyyP1YDyRlHlup
=qtNN
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-25 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25  4:07 [PATCH] eliminate false positive in compile.el Daniel Colascione
2010-03-25 19:24 ` Stefan Monnier
2010-03-25 19:49   ` Daniel Colascione
     [not found]     ` <201003252103.o2PL3PuE006566@godzilla.ics.uci.edu>
2010-03-25 21:05       ` Daniel Colascione

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.