# HG changeset patch # User Augie Fackler # Date 1506768430 14400 # Node ID b0264224e2ec79785cd2ac65281d15cd6a16f667 # Parent 957632211aa3adc0908e2301a5aeb2c3ae803f88 compilation tweaks: tried and failed to fix hg compilation stuff I can't figure out why it's not working, but it's at least a little more hackable now. diff --git a/.elisp/settings/50.compilation-tweaks.el b/.elisp/settings/50.compilation-tweaks.el --- a/.elisp/settings/50.compilation-tweaks.el +++ b/.elisp/settings/50.compilation-tweaks.el @@ -1,22 +1,40 @@ (require 'compile) -(pushnew - '(mercurial-test-output-tb - "\+ File \".*/install/lib/python/\\([^\"]*\\)\", line \\([0-9]*\\)\\(, in .*\\)?$" - 1 2) compilation-error-regexp-alist-alist) -(pushnew - '(mercurial-check-code-output-tb - "\+\\(/[^:]+\\):\\([0-9]+\\):$" - 1 2) compilation-error-regexp-alist-alist) -;; add to the end so this gets priority -(setq compilation-error-regexp-alist - (append compilation-error-regexp-alist '(mercurial-test-output-tb))) -(setq compilation-error-regexp-alist - (append compilation-error-regexp-alist '(mercurial-check-code-output-tb))) +(setq af--hg-test-traceback + (rx + bol + "+ File \"" + (one-or-more not-newline) + "/install/lib/python/" + (group (one-or-more (not (any "\"")))) + ", line " + (group (one-or-more digit)) + ) + ) -;; Use the next s-exp to remove the last list element if you need to -;; live-edit this regex -;; (setq compilation-error-regexp-alist-alist -;; (cdr compilation-error-regexp-alist-alist)) -;; (setq compilation-error-regexp-alist -;; (reverse (cdr (reverse compilation-error-regexp-alist)))) +(setq compilation-error-regexp-alist-alist + (cons '(mercurial-test-output-tb af--hg-test-traceback 1 2) + (assq-delete-all 'mercurial-test-output-tb + compilation-error-regexp-alist-alist))) + +(setq af--hg-check-code-error-re + (rx + bol + "+ " + (group (one-or-more not-newline)) + ":" + (group (one-or-more digit)) + ":" + ) + ) + +(setq compilation-error-regexp-alist-alist + (cons '(mercurial-check-code-output af--hg-check-code-error-re 1 2) + (assq-delete-all 'mercurial-check-code-output + compilation-error-regexp-alist-alist))) + +(add-to-list 'compilation-error-regexp-alist 'mercurial-test-output-tb) +(add-to-list 'compilation-error-regexp-alist 'mercurial-check-code-output) + +;; to debug: +;;(setq compilation-error-regexp-alist '(mercurial-check-code-output))