From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH 1/3] emacs: Enable 'guix-build-log-mode' for build log files. Date: Thu, 29 Oct 2015 23:32:54 +0300 Message-ID: <878u6lza89.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrtsX-0007kY-5U for guix-devel@gnu.org; Thu, 29 Oct 2015 16:32:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrtsS-00061B-6D for guix-devel@gnu.org; Thu, 29 Oct 2015 16:32:57 -0400 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:34783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrtsR-000614-Un for guix-devel@gnu.org; Thu, 29 Oct 2015 16:32:52 -0400 Received: by lbbwb3 with SMTP id wb3so37200003lbb.1 for ; Thu, 29 Oct 2015 13:32:51 -0700 (PDT) Received: from leviafan ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id h7sm629683lbk.8.2015.10.29.13.32.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2015 13:32:50 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain As suggested by Ludovic on IRC, after this patch, build log files (from /var/log/guix/drvs) will be displayed in a 'guix-build-log-mode'. I'm not sure about regexp though: are these files always "bz2" and ".../XX/XXXXX-30-more-characters-XXXXX/..."? I didn't put "/var/log" in the beginning of the regexp to match, for example, /mnt/guix-from-sdc/var/log/guix/... files or alike. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-emacs-Enable-guix-build-log-mode-for-build-log-files.patch >From 5a2beec8d91334ea755b709e51492c44fd2d0773 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Thu, 29 Oct 2015 20:48:53 +0300 Subject: [PATCH 1/3] emacs: Enable 'guix-build-log-mode' for build log files. * emacs/guix-build-log.el (auto-mode-alist): Add 'guix-build-log-mode' to 'auto-mode-alist'. --- emacs/guix-build-log.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el index c0855b2..0e13213 100644 --- a/emacs/guix-build-log.el +++ b/emacs/guix-build-log.el @@ -329,6 +329,13 @@ programmatically using hooks: (when font-lock-mode (font-lock-fontify-buffer))) +;;;###autoload +(add-to-list 'auto-mode-alist + ;; Regexp for log files (usually placed in /var/log/guix/...) + (cons (rx "guix/drvs/" (= 2 alnum) "/" (= 30 alnum) + "-" (+ (any alnum "-.")) ".drv.bz2" string-end) + 'guix-build-log-mode)) + (provide 'guix-build-log) ;;; guix-build-log.el ends here -- 2.5.0 --=-=-=--