guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] emacs: Enable 'guix-build-log-mode' for build log files.


From: Alex Kost
Subject: Re: [PATCH 1/3] emacs: Enable 'guix-build-log-mode' for build log files.
Date: Mon, 02 Nov 2015 16:01:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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

> Alex Kost <address@hidden> skribis:
>
>> From 11fea59d41063b3511a84a0d783cfa2016ed68c4 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <address@hidden>
>> 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

[Prev in Thread] Current Thread [Next in Thread]