emacs: Add 'guix-build-log-find-file'.
* emacs/guix-build-log.el (guix-build-log-find-file): New procedure. * emacs/guix-command.el (guix-run-view-build-log): Use it.
This commit is contained in:
parent
d7a58c60d6
commit
dcb00c0ad5
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'guix-utils)
|
||||||
|
|
||||||
(defgroup guix-build-log nil
|
(defgroup guix-build-log nil
|
||||||
"Settings for `guix-build-log-mode'."
|
"Settings for `guix-build-log-mode'."
|
||||||
:group 'guix)
|
:group 'guix)
|
||||||
|
@ -359,6 +361,11 @@ programmatically using hooks:
|
||||||
(when guix-build-log-minor-mode-activate
|
(when guix-build-log-minor-mode-activate
|
||||||
(guix-build-log-minor-mode)))
|
(guix-build-log-minor-mode)))
|
||||||
|
|
||||||
|
(defun guix-build-log-find-file (file-or-url)
|
||||||
|
"Open FILE-OR-URL in `guix-build-log-mode'."
|
||||||
|
(guix-find-file-or-url file-or-url)
|
||||||
|
(guix-build-log-mode))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-to-list 'auto-mode-alist
|
(add-to-list 'auto-mode-alist
|
||||||
;; Regexp for log files (usually placed in /var/log/guix/...)
|
;; Regexp for log files (usually placed in /var/log/guix/...)
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
(require 'guix-help-vars)
|
(require 'guix-help-vars)
|
||||||
(require 'guix-read)
|
(require 'guix-read)
|
||||||
(require 'guix-base)
|
(require 'guix-base)
|
||||||
|
(require 'guix-build-log)
|
||||||
(require 'guix-guile)
|
(require 'guix-guile)
|
||||||
(require 'guix-external)
|
(require 'guix-external)
|
||||||
|
|
||||||
|
@ -692,8 +693,7 @@ open the log file(s)."
|
||||||
(output (guix-command-output args))
|
(output (guix-command-output args))
|
||||||
(files (split-string output "\n" t)))
|
(files (split-string output "\n" t)))
|
||||||
(dolist (file files)
|
(dolist (file files)
|
||||||
(guix-find-file-or-url file)
|
(guix-build-log-find-file file))))
|
||||||
(guix-build-log-mode))))
|
|
||||||
|
|
||||||
(defun guix-run-view-graph (args)
|
(defun guix-run-view-graph (args)
|
||||||
"Run 'guix ARGS ...' graph command, make the image and open it."
|
"Run 'guix ARGS ...' graph command, make the image and open it."
|
||||||
|
|
Loading…
Reference in New Issue