Skip to content
Snippets Groups Projects
Commit c292a6f3 authored by Alex Kost's avatar Alex Kost
Browse files

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

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.
parent 4c68c538
No related branches found
No related tags found
No related merge requests found
...@@ -357,7 +357,8 @@ formatted with this string, an action button is inserted.") ...@@ -357,7 +357,8 @@ formatted with this string, an action button is inserted.")
(guix-buffer-get-display-entries-current (guix-buffer-get-display-entries-current
'info guix-package-info-type 'info guix-package-info-type
(list (guix-ui-current-profile) (list (guix-ui-current-profile)
'name (button-label btn)) 'name (or (button-get btn 'spec)
(button-label btn)))
'add))) 'add)))
(define-button-type 'guix-package-heading (define-button-type 'guix-package-heading
...@@ -374,10 +375,12 @@ formatted with this string, an action button is inserted.") ...@@ -374,10 +375,12 @@ formatted with this string, an action button is inserted.")
(message "Yes, this is the source URL. What did you expect?"))) (message "Yes, this is the source URL. What did you expect?")))
(defun guix-package-info-insert-heading (entry) (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-insert-button
(guix-package-entry->name-specification entry) (concat (guix-entry-value entry 'name) " "
'guix-package-heading)) (guix-entry-value entry 'version))
'guix-package-heading
'spec (guix-package-entry->name-specification entry)))
(defun guix-package-info-insert-systems (systems entry) (defun guix-package-info-insert-systems (systems entry)
"Insert supported package SYSTEMS at point." "Insert supported package SYSTEMS at point."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment