aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni-core.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/oni-core.el b/oni-core.el
index 029d51d..9f76fbb 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -527,5 +527,17 @@ which normally have their errors suppressed."
(when (treesit-available-p)
(add-to-list 'interpreter-mode-alist '("bash" . bash-ts-mode)))
+(defun oni-core-copy-guix-build-hash ()
+ "Try and find the last actual hash in the compilation buffer and insert it."
+ (interactive)
+ (insert
+ (with-current-buffer compilation-last-buffer
+ (save-excursion
+ (save-match-data
+ (goto-char (point-max))
+ (re-search-backward (rx bol (zero-or-more whitespace) "actual hash:" (one-or-more whitespace)))
+ (goto-char (match-end 0))
+ (buffer-substring-no-properties (point) (line-end-position)))))))
+
(provide 'oni-core)
;;; oni-core.el ends here