aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-utils.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-09-13 21:30:05 +0300
committerAlex Kost <alezost@gmail.com>2015-09-15 15:19:31 +0300
commit83d95c7b3686a57f5c871372051203a1b2182d99 (patch)
tree599521a91c29b858e1264c7272792f2fe85ff22c /emacs/guix-utils.el
parent34850cd59d00d060c1821503ca8fb2c3b0c46162 (diff)
downloadguix-83d95c7b3686a57f5c871372051203a1b2182d99.tar
guix-83d95c7b3686a57f5c871372051203a1b2182d99.tar.gz
emacs: Add "View build log" action to build popup.
* emacs/guix-command.el (guix-run-view-build-log): New function. (guix-command-additional-execute-arguments, guix-command-special-executors): Add entries for "View build log" action. * emacs/guix-utils.el (guix-find-file-or-url): New function.
Diffstat (limited to 'emacs/guix-utils.el')
-rw-r--r--emacs/guix-utils.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el
index c1ce954f8f..682609d907 100644
--- a/emacs/guix-utils.el
+++ b/emacs/guix-utils.el
@@ -208,6 +208,16 @@ single argument."
(funcall guix-find-file-function file)
(message "File '%s' does not exist." file)))
+(defvar url-handler-regexp)
+
+(defun guix-find-file-or-url (file-or-url)
+ "Find FILE-OR-URL."
+ (require 'url-handlers)
+ (let ((file-name-handler-alist
+ (cons (cons url-handler-regexp 'url-file-handler)
+ file-name-handler-alist)))
+ (find-file file-or-url)))
+
(defmacro guix-while-search (regexp &rest body)
"Evaluate BODY after each search for REGEXP in the current buffer."
(declare (indent 1) (debug t))