Re: [PATCH] emacs: Improve 'guix-prettify-regexp'.
Ludovic Courtès (2015-09-21 19:01 +0300) wrote: > Alex Kost skribis: > >> Ludovic Courtès (2015-09-20 19:43 +0300) wrote: >> >>> Alex Kost skribis: >> [...] (defcustom guix-prettify-regexp - (rx "/" - (or "nix" "gnu") - "/store/" + (rx "/" (or "store" "nar" "log") "/" >>> >>> Maybe explicitly show in a comment the URLs and file names that we >>> intend to match. >> >> OK, I'll add this comment. BTW, are there any other places where we can >> meet these hashes? > > Hmm no, at least not yet. OK, thanks, pushed. -- Alex
Re: [PATCH] emacs: Improve 'guix-prettify-regexp'.
Alex Kost skribis: > Ludovic Courtès (2015-09-20 19:43 +0300) wrote: > >> Alex Kost skribis: > [...] >>> (defcustom guix-prettify-regexp >>> - (rx "/" >>> - (or "nix" "gnu") >>> - "/store/" >>> + (rx "/" (or "store" "nar" "log") "/" >> >> Maybe explicitly show in a comment the URLs and file names that we >> intend to match. > > OK, I'll add this comment. BTW, are there any other places where we can > meet these hashes? Hmm no, at least not yet. Ludo’.
Re: [PATCH] emacs: Improve 'guix-prettify-regexp'.
Ludovic Courtès (2015-09-20 19:43 +0300) wrote: > Alex Kost skribis: [...] >> (defcustom guix-prettify-regexp >> - (rx "/" >> - (or "nix" "gnu") >> - "/store/" >> + (rx "/" (or "store" "nar" "log") "/" > > Maybe explicitly show in a comment the URLs and file names that we > intend to match. OK, I'll add this comment. BTW, are there any other places where we can meet these hashes? -- Alex
Re: [PATCH] emacs: Improve 'guix-prettify-regexp'.
Alex Kost skribis: > Hello, along with: > > /gnu/store/…-foo-0.1 > > we have: > > http://hydra.gnu.org/nar/…-foo-0.1 > http://hydra.gnu.org/log/…-foo-0.1 > > I think it would be good to "prettify" such things as well, so what > about the attached patch? Makes sense. > From 5914f7007d1b27c0fa8594df4c1cff5fdd35e359 Mon Sep 17 00:00:00 2001 > From: Alex Kost > Date: Sat, 19 Sep 2015 13:55:59 +0300 > Subject: [PATCH] emacs: Improve 'guix-prettify-regexp'. > > * emacs/guix-prettify.el (guix-prettify-regexp): Modify to handle "nar" > and "log". [...] > (defcustom guix-prettify-regexp > - (rx "/" > - (or "nix" "gnu") > - "/store/" > + (rx "/" (or "store" "nar" "log") "/" Maybe explicitly show in a comment the URLs and file names that we intend to match. Otherwise LGTM, thanks! Ludo’.
[PATCH] emacs: Improve 'guix-prettify-regexp'.
Hello, along with: /gnu/store/…-foo-0.1 we have: http://hydra.gnu.org/nar/…-foo-0.1 http://hydra.gnu.org/log/…-foo-0.1 I think it would be good to "prettify" such things as well, so what about the attached patch? >From 5914f7007d1b27c0fa8594df4c1cff5fdd35e359 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sat, 19 Sep 2015 13:55:59 +0300 Subject: [PATCH] emacs: Improve 'guix-prettify-regexp'. * emacs/guix-prettify.el (guix-prettify-regexp): Modify to handle "nar" and "log". --- emacs/guix-prettify.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/emacs/guix-prettify.el b/emacs/guix-prettify.el index 24dfbb3..5d1ce9e 100644 --- a/emacs/guix-prettify.el +++ b/emacs/guix-prettify.el @@ -77,9 +77,7 @@ disabling `guix-prettify-mode' a little faster." :group 'guix-prettify) (defcustom guix-prettify-regexp - (rx "/" - (or "nix" "gnu") - "/store/" + (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" -- 2.5.0