From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] emacs: Add 'pretty-sha-path'. Date: Tue, 04 Nov 2014 22:37:14 +0100 Message-ID: <87h9ye8x6d.fsf@gnu.org> References: <87d2926he1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xllme-0006cF-MV for guix-devel@gnu.org; Tue, 04 Nov 2014 16:37:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XllmX-0005mv-QC for guix-devel@gnu.org; Tue, 04 Nov 2014 16:37:00 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:47178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XllmX-0005mM-IX for guix-devel@gnu.org; Tue, 04 Nov 2014 16:36:53 -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 Alex Kost skribis: > Also I forgot to mention =E2=80=9Cemacs/guix-messages.el=E2=80=9D in =E2= =80=9Cemacs.am=E2=80=9D in > commit 62f261d, so I did it in this patch (I hope it's not too evil :-)) Maybe =E2=80=9Cevil=E2=80=9D is too strong a word ;-), but please keep the emacs/guix-messages.el addition in a separate commit. Commits are cheap and easy, so let=E2=80=99s favor clarity. > From e7ca6550d7f33d894e0023e3305938fce365fdba Mon Sep 17 00:00:00 2001 > From: Alex Kost > Date: Tue, 4 Nov 2014 19:38:27 +0300 > Subject: [PATCH] emacs: Add 'pretty-sha-path'. > > * emacs/pretty-sha-path.el: New file. > * emacs.am (ELFILES): Add it. > * doc/emacs.texi (Emacs Pretty Path): New node. [...] > +@node Emacs Pretty Path > +@subsection Pretty SHA Path Mode What about adding, at the end of the first paragraph of the =E2=80=9CFeatur= es=E2=80=9D section, something like: ... where @code{xxx} is a base32 string (note that Guix comes with an Emacs extension to shorten those file names, @ref{Emacs Pretty Path}.) > +Along with ``guix.el'', GNU@tie{}Guix comes with ``pretty-sha-path.el''. > +It provides a minor mode for abbreviating store paths by replacing > +SHA-sequences of symbols with ``@dots{}'': > + > +@example > +/gnu/store/onecansee32lettersandnumbershere-foo-0.1 @result{} /gnu/sto= re/=E2=80=A6-foo-0.1 Perhaps insert a line break before @result{}, otherwise the PDF output may be truncated. > +@item M-x pretty-sha-path-global-mode > +Enable/disable prettifying globally. It seemed to me that the convention would be to call it global-pretty-sha-path-mode rather, no? Other than that, LGTM! Mark is right about refining the regexp, but OTOH false positives are very unlikely, and it might make things slightly slower, no? So either way is fine with me. Thanks! Ludo=E2=80=99.