From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] emacs: Add 'pretty-sha-path'. Date: Tue, 04 Nov 2014 14:39:20 -0500 Message-ID: <87389ybvrr.fsf@netris.org> References: <87d2926he1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XljxG-0007hj-Fw for guix-devel@gnu.org; Tue, 04 Nov 2014 14:39:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xljx9-0005JG-CS for guix-devel@gnu.org; Tue, 04 Nov 2014 14:39:50 -0500 Received: from world.peace.net ([96.39.62.75]:34946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xljx9-0005Co-9B for guix-devel@gnu.org; Tue, 04 Nov 2014 14:39:43 -0500 In-Reply-To: <87d2926he1.fsf@gmail.com> (Alex Kost's message of "Tue, 04 Nov 2014 19:48:54 +0300") 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: Alex Kost Cc: guix-devel@gnu.org Hi Alex, Alex Kost writes: > +(defcustom pretty-sha-path-regexp > + (rx "/" > + (or "nix" "gnu") > + "/store/" > + (group (= 32 alnum))) I'm not sure if it's worth it, but you could make this regexp more restrictive. Nix hashes can only contain the following 32 characters: "0123456789abcdfghijklmnpqrsvwxyz" i.e. digits and lowercase ASCII letters excluding (e o u t). See 'base32Chars' in nix/libutil/hash.cc. Mark