guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: emacs: Use space to separate package name and version in heading.


From: Alex Kost
Subject: 02/02: emacs: Use space to separate package name and version in heading.
Date: Wed, 23 Mar 2016 08:27:56 +0000

alezost pushed a commit to branch master
in repository guix.

commit c292a6f30410eb037120b056acb0a0a331a33283
Author: Alex Kost <address@hidden>
Date:   Mon Mar 21 10:58:29 2016 +0300

    emacs: Use space to separate package name and version in heading.
    
    Reported by Ludovic Courtès <address@hidden>.
    
    * 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 files 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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]