summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-09-19 13:55:59 +0300
committerAlex Kost <alezost@gmail.com>2015-09-22 13:04:44 +0300
commit67ee7c9576ac9079a0fc3b17918824d1181327fd (patch)
tree240ceb0ad77df9665034a47c765ee8269e238a84 /emacs
parent667d90dfee10ee03dd14e0ef479355eed302adbf (diff)
downloadguix-67ee7c9576ac9079a0fc3b17918824d1181327fd.tar.gz
emacs: Improve 'guix-prettify-regexp'.
* emacs/guix-prettify.el (guix-prettify-regexp): Modify to handle "nar"
  and "log".
Diffstat (limited to 'emacs')
-rw-r--r--emacs/guix-prettify.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/emacs/guix-prettify.el b/emacs/guix-prettify.el
index 24dfbb33e2..38d72e860b 100644
--- a/emacs/guix-prettify.el
+++ b/emacs/guix-prettify.el
@@ -77,9 +77,14 @@ disabling `guix-prettify-mode' a little faster."
   :group 'guix-prettify)
 
 (defcustom guix-prettify-regexp
-  (rx "/"
-      (or "nix" "gnu")
-      "/store/"
+  ;; The following file names / URLs should be abbreviated:
+
+  ;; /gnu/store/…-foo-0.1
+  ;; /nix/store/…-foo-0.1
+  ;; http://hydra.gnu.org/nar/…-foo-0.1
+  ;; http://hydra.gnu.org/log/…-foo-0.1
+
+  (rx "/" (or "store" "nar" "log") "/"
       ;; Hash-parts do not include "e", "o", "u" and "t".  See base32Chars
       ;; at <https://github.com/NixOS/nix/blob/master/src/libutil/hash.cc>
       (group (= 32 (any "0-9" "a-d" "f-n" "p-s" "v-z"))))