[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] emacs: Add a name/version/synopsis heading in package-info b
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] emacs: Add a name/version/synopsis heading in package-info buffers |
Date: |
Thu, 30 Oct 2014 14:16:58 +0100 |
User-agent: |
Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux) |
Alex Kost <address@hidden> skribis:
> Ludovic Courtès (2014-10-29 19:25 +0300) wrote:
>
>> Hello,
>>
>> What would think of a patch like this:
>
> [...]
>
>> (defun guix-info-insert-entry (entry entry-type &optional indent-level)
>> "Insert ENTRY of ENTRY-TYPE into the current info buffer.
>> If INDENT-LEVEL is non-nil, indent displayed information by this
>> number of `guix-info-indent' spaces."
>> (let ((region-beg (point)))
>> + (guix-info-insert-heading entry)
>> (mapc (lambda (param)
>> - (guix-info-insert-param param entry entry-type))
>> + ;; The name, version, and synopsis are already displayed.
>> + (unless (memq param '(name version synopsis))
>> + (guix-info-insert-param param entry entry-type)))
>> (guix-info-get-displayed-params entry-type))
>> (when indent-level
>> (indent-rigidly region-beg (point)
>
> ‘guix-info-insert-entry’ is used to insert any type of information, not
> only packages, so you can see artifacts (empty lines and "–") in other
> "views".
Ah, OK.
> I'm attaching the modified version of your patch. I added there several
> variables that allow a user to specify functions for displaying info
> (perhaps there will be several variants of displaying info in the
> future). So if someone would like to return to the previous variant of
> displaying a package, he could do it with:
>
> (setq guix-info-insert-package-function nil)
Sounds good!
> Thanks again, I really like your suggestion, I just prefer to keep
> previous possibilities instead of replacing them with the new ones.
Yes, why not. I’m a bit concerned about the cost of keeping several
variants of different things, esp. because in practice almost only one
variant would be tested. WDYT?
> Are you going to make a commit or should I do it? (of course if you
> don't have comments on my patch)
Please go ahead!
I’m thinking perhaps we should do something similar for the description
itself, like display it right below the synopsis. Thoughts?
Thanks,
Ludo’.