Ludovic Courtès (2015-11-01 20:20 +0300) wrote:

> Alex Kost <alez...@gmail.com> skribis:
>
>> From 11fea59d41063b3511a84a0d783cfa2016ed68c4 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alez...@gmail.com>
>> Date: Sat, 31 Oct 2015 21:36:41 +0300
>> Subject: [PATCH 1/2] emacs: Add 'guix-hash-char-regexp'.
>>
>> * emacs/guix-utils.el (guix-hash-char-regexp): New constant.
>> * emacs/guix-prettify.el (guix-prettify-regexp): Use it.

I dropped this commit as ‘guix-hash-char-regexp’ is not really needed
(see below).

> LGTM.  The only possible downside is if it noticeably slows things down,
> which may be the case.  Have you seen any difference?
>
> If it happens to be slower, I’m fine with the current (sloppier)
> variant.

In my understanding it is not noticeably slower.  I think it would be
significant if regexp consisted only of [0-9a-df-np-sv-z] characters,
but since there are easy-to-search parts (like "/guix/drvs" or
"/store"), it shouldn't be slow (though I must admit I don't have deep
knowledge of how regexps work).

Anyway, after all I decided to stay on a simple variant (that uses
[[:alnum:]] instead of [0-9a-df-np-sv-z]), because using
‘guix-hash-char-regexp’ in a regexp for 'auto-mode-alist' would lead to
requiring another module (guix-utils.el) on start.

Don't read this ↑.  In short, /var/log/guix/drvs/... files should be
opened in 'guix-build-log-mode' automatically now.

-- 
Alex

Reply via email to