all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Alex Kost <alezost@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] emacs: Add a name/version/synopsis heading in package-info buffers
Date: Thu, 30 Oct 2014 14:16:58 +0100	[thread overview]
Message-ID: <87fve5u27p.fsf@gnu.org> (raw)
In-Reply-To: <87y4ryle1l.fsf@gmail.com> (Alex Kost's message of "Thu, 30 Oct 2014 01:13:58 +0300")

Alex Kost <alezost@gmail.com> 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’.

  reply	other threads:[~2014-10-31 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 16:25 [PATCH] emacs: Add a name/version/synopsis heading in package-info buffers Ludovic Courtès
2014-10-29 22:13 ` Alex Kost
2014-10-30 13:16   ` Ludovic Courtès [this message]
2014-10-30 21:38     ` Alex Kost
2014-10-30 23:20       ` Ludovic Courtès
2014-11-01 10:58         ` Alex Kost
2014-11-02 17:23           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fve5u27p.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.