summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-09-02 00:48:56 +0100
committerjao <jao@gnu.org>2021-09-02 00:48:56 +0100
commit7babc823092f8d6dcf45f147b3457c5f770af527 (patch)
tree0106edc36157714e30b4a21c11a592f6a58a8163
parente2f71dd9a2a7fd503cba706278715dceeabb6670 (diff)
downloadelibs-7babc823092f8d6dcf45f147b3457c5f770af527.tar.gz
elibs-7babc823092f8d6dcf45f147b3457c5f770af527.tar.bz2
jenkins: refresh console output, brittlely
-rw-r--r--init.org13
1 files changed, 11 insertions, 2 deletions
diff --git a/init.org b/init.org
index baa1953..fbb826b 100644
--- a/init.org
+++ b/init.org
@@ -2066,12 +2066,21 @@
;; optionally: jenkins-colwidth-id, jenkins-colwidth-last-status
(setq jenkins-colwidth-name 35)
:config
- (defun jao-jenkins-first-job ()
+ (defun jao-jenkins-first-job (&rest _)
(interactive)
(goto-char (point-min))
(when (re-search-forward "^- Job" nil t)
(goto-char (match-beginning 0))))
(add-hook 'jenkins-job-view-mode-hook #'jao-jenkins-first-job)
+ (advice-add 'jenkins-job-render :after #'jao-jenkins-first-job)
+
+ (defun jenkins-refresh-console-output ()
+ (interactive)
+ (let ((n (buffer-name)))
+ (when (string-match "\\*jenkins-console-\\([^-]+\\)-\\(.+\\)\\*$" n)
+ (jenkins-get-console-output (match-string 1 n) (match-string 2 n))
+ (goto-char (point-max)))))
+
:bind (:map jenkins-job-view-mode-map
(("n" . next-line)
("p" . previous-line)
@@ -2080,7 +2089,7 @@
:map jenkins-console-output-mode-map
(("n" . next-line)
("p" . previous-line)
- ("g" . jenkins--refresh-console-output))))
+ ("g" . jenkins-refresh-console-output))))
#+END_SRC
* Programming
*** Automatic modes