From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: emacs-devel@gnu.org
Cc: Jan Nieuwenhuizen <janneke@gnu.org>
Subject: Re: [PATCH] Handle output from Emacs byte-compilation properly
Date: Mon, 14 Sep 2015 22:24:56 +0200 [thread overview]
Message-ID: <1442262296.3420042.383512865.0F926D5F@webmail.messagingengine.com> (raw)
In-Reply-To: <1442261679.3417325.383499481.7568CF24@webmail.messagingengine.com>
[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]
The previous patch is not a good one and there's an error in it. Please
disregard
the previous patch and consider the attached patch instead.
You'll have to take my word for it when I say I -did- test it before
submitting. :)
--
Jostein Kjønigsen
jostein@kjonigsen.net / jostein@secure.kjonigsen.net
On Mon, Sep 14, 2015, at 10:14 PM, Jostein Kjønigsen wrote:
> It's common for module-developers to run Emacs byte-compilation in
> separate build-scripts.
>
> When invoking byte-compile on Emacs-lisp files you often get the
> following headers:
>
> - In toplevel form:
> - In end of data:
>
> When these errors show up in the output of a build-script initiated
> through M-x compile and show up in a compilation-mode buffer, these
> lines gets treated as guile-errors for files which doesn't exist.
>
> This is due to the following regexp, which is quite frankly extremely
> wide:
>
> (guile-file "^In \\(.+\\):\n" 1)
>
> This breaks prev-error and next-error based navigation because the
> files "toplevel form" and "end of data" doesn't exist.
>
> This patch ensures those lines are treated as information only before
> getting to the guile-file regexp.
>
> --
> Jostein Kjønigsen
> jostein@kjonigsen.net / jostein@secure.kjonigsen.net
> Email had 1 attachment:
> * compilation-mode-emacs-lisp.patch
> 2k (text/x-patch)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: compilation-mode-emacs-lisp.patch --]
[-- Type: text/x-patch; name="compilation-mode-emacs-lisp.patch", Size: 1619 bytes --]
From 8a2c39dcd3d2609f571eae9fa1a16d34dba91f3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Mon, 14 Sep 2015 21:43:57 +0200
Subject: [PATCH] Handle output from Emacs byte-compilation properly
It's common for module-developers to run Emacs byte-compilation in
separate build-scripts.
When invoking byte-compile on Emacs-lisp files you often get the
following headers:
- In toplevel form:
- In end of data:
When these errors show up in the output of a build-script initiated
through M-x compile and show up in a compilation-mode buffer, these
lines gets treated as guile-errors for files with the respective names
"toplevel form" and "end of data".
This breaks prev-error and next-error based navigation.
This patch ensures those lines are treated as information only before
getting to the guile-files regexp.
---
lisp/progmodes/compile.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index a6e9ed8..cb5c884 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -477,6 +477,11 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?"
;;
"^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) "
1 2 3)
+
+ ;; ensure emacs-info headers are not treated as guile-errors.
+ ;; created using (rx (or "In toplevel form:" "In end of data:"))
+ (elisp-info "\\(?:In \\(?:\\(?:end of data\\|toplevel form\\):\\)\\)" nil nil nil 0)
+
(guile-file "^In \\(.+\\):\n" 1)
(guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2)
)
--
1.9.1
next prev parent reply other threads:[~2015-09-14 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 20:14 [PATCH] Handle output from Emacs byte-compilation properly Jostein Kjønigsen
2015-09-14 20:24 ` Jostein Kjønigsen [this message]
2015-09-15 9:57 ` Jostein Kjønigsen
2015-09-15 16:03 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442262296.3420042.383512865.0F926D5F@webmail.messagingengine.com \
--to=jostein@secure.kjonigsen.net \
--cc=emacs-devel@gnu.org \
--cc=janneke@gnu.org \
--cc=jostein@kjonigsen.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.