From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: emacs-devel@gnu.org
Cc: Jan Nieuwenhuizen <janneke@gnu.org>
Subject: [PATCH] Handle output from Emacs byte-compilation properly
Date: Mon, 14 Sep 2015 22:14:39 +0200 [thread overview]
Message-ID: <1442261679.3417325.383499481.7568CF24@webmail.messagingengine.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
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
[-- 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: 1734 bytes --]
From eec1a7951b0bfb85875ef09f1d78988068893c06 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 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index a6e9ed8..c936ec6 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -477,6 +477,12 @@ 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:"))
+ (add-to-list 'compilation-error-regexp-alist-alist '(elisp-info "\\(?:In \\(?:\\(?:end of data\\|toplevel form\\):\\)\\)" nil nil nil 0))
+ (add-to-list 'compilation-error-regexp-alist 'elisp-info)
+
(guile-file "^In \\(.+\\):\n" 1)
(guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2)
)
--
1.9.1
next reply other threads:[~2015-09-14 20:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 20:14 Jostein Kjønigsen [this message]
2015-09-14 20:24 ` [PATCH] Handle output from Emacs byte-compilation properly Jostein Kjønigsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442261679.3417325.383499481.7568CF24@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).