[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/04: emacs: Add 'guix-build-log-find-file'.
From: |
Alex Kost |
Subject: |
03/04: emacs: Add 'guix-build-log-find-file'. |
Date: |
Wed, 09 Dec 2015 17:04:02 +0000 |
alezost pushed a commit to branch master
in repository guix.
commit dcb00c0ad5f33d76dc4cac03ba6f7f8568ddfc57
Author: Alex Kost <address@hidden>
Date: Mon Dec 7 11:57:56 2015 +0300
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.
---
emacs/guix-build-log.el | 7 +++++++
emacs/guix-command.el | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el
index 3f78121..e08a88f 100644
--- a/emacs/guix-build-log.el
+++ b/emacs/guix-build-log.el
@@ -24,6 +24,8 @@
;;; Code:
+(require 'guix-utils)
+
(defgroup guix-build-log nil
"Settings for `guix-build-log-mode'."
:group 'guix)
@@ -359,6 +361,11 @@ programmatically using hooks:
(when guix-build-log-minor-mode-activate
(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
(add-to-list 'auto-mode-alist
;; Regexp for log files (usually placed in /var/log/guix/...)
diff --git a/emacs/guix-command.el b/emacs/guix-command.el
index 7e924d8..ddd3dd5 100644
--- a/emacs/guix-command.el
+++ b/emacs/guix-command.el
@@ -65,6 +65,7 @@
(require 'guix-help-vars)
(require 'guix-read)
(require 'guix-base)
+(require 'guix-build-log)
(require 'guix-guile)
(require 'guix-external)
@@ -692,8 +693,7 @@ open the log file(s)."
(output (guix-command-output args))
(files (split-string output "\n" t)))
(dolist (file files)
- (guix-find-file-or-url file)
- (guix-build-log-mode))))
+ (guix-build-log-find-file file))))
(defun guix-run-view-graph (args)
"Run 'guix ARGS ...' graph command, make the image and open it."