unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Use space to separate package name and version in heading.
@ 2016-03-21  8:19 Alex Kost
  2016-03-21  9:36 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Kost @ 2016-03-21  8:19 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 117 bytes --]

This patch is for displaying "name version" instead of "name@version" in
the heading of *Guix Package Info* buffer.


[-- Attachment #2: 0001-emacs-Use-space-to-separate-package-name-and-version.patch --]
[-- Type: text/x-patch, Size: 2037 bytes --]

From d3cd02351042f8139aeff0302bcb921c8b520716 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Mon, 21 Mar 2016 10:58:29 +0300
Subject: [PATCH] emacs: Use space to separate package name and version in
 heading.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reported by Ludovic Courtès <ludo@gnu.org>.

* emacs/guix-ui-package.el (guix-package-name): Check 'spec' property.
(guix-package-info-insert-heading): Use "name version" for button label,
write name specification to 'spec' property.
---
 emacs/guix-ui-package.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 9d81c61..df5f8d1 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -357,7 +357,8 @@ formatted with this string, an action button is inserted.")
             (guix-buffer-get-display-entries-current
              'info guix-package-info-type
              (list (guix-ui-current-profile)
-                   'name (button-label btn))
+                   'name (or (button-get btn 'spec)
+                             (button-label btn)))
              'add)))
 
 (define-button-type 'guix-package-heading
@@ -374,10 +375,12 @@ formatted with this string, an action button is inserted.")
             (message "Yes, this is the source URL. What did you expect?")))
 
 (defun guix-package-info-insert-heading (entry)
-  "Insert package ENTRY heading (name specification) at point."
+  "Insert package ENTRY heading (name and version) at point."
   (guix-insert-button
-   (guix-package-entry->name-specification entry)
-   'guix-package-heading))
+   (concat (guix-entry-value entry 'name) " "
+           (guix-entry-value entry 'version))
+   'guix-package-heading
+   'spec (guix-package-entry->name-specification entry)))
 
 (defun guix-package-info-insert-systems (systems entry)
   "Insert supported package SYSTEMS at point."
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs: Use space to separate package name and version in heading.
  2016-03-21  8:19 [PATCH] emacs: Use space to separate package name and version in heading Alex Kost
@ 2016-03-21  9:36 ` Ludovic Courtès
  2016-03-23  8:28   ` Alex Kost
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2016-03-21  9:36 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> From d3cd02351042f8139aeff0302bcb921c8b520716 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Mon, 21 Mar 2016 10:58:29 +0300
> Subject: [PATCH] emacs: Use space to separate package name and version in
>  heading.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Reported by Ludovic Courtès <ludo@gnu.org>.
>
> * emacs/guix-ui-package.el (guix-package-name): Check 'spec' property.
> (guix-package-info-insert-heading): Use "name version" for button label,
> write name specification to 'spec' property.

Sure, go ahead!

Thank you,
Ludo'.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs: Use space to separate package name and version in heading.
  2016-03-21  9:36 ` Ludovic Courtès
@ 2016-03-23  8:28   ` Alex Kost
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Kost @ 2016-03-23  8:28 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès (2016-03-21 12:36 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> From d3cd02351042f8139aeff0302bcb921c8b520716 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@gmail.com>
>> Date: Mon, 21 Mar 2016 10:58:29 +0300
>> Subject: [PATCH] emacs: Use space to separate package name and version in
>>  heading.
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> Reported by Ludovic Courtès <ludo@gnu.org>.
>>
>> * emacs/guix-ui-package.el (guix-package-name): Check 'spec' property.
>> (guix-package-info-insert-heading): Use "name version" for button label,
>> write name specification to 'spec' property.
>
> Sure, go ahead!

Committed.

-- 
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-23  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-21  8:19 [PATCH] emacs: Use space to separate package name and version in heading Alex Kost
2016-03-21  9:36 ` Ludovic Courtès
2016-03-23  8:28   ` Alex Kost

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).