[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/09: emacs: Add location "Packages" button to Package Info buffer.
From: |
Alex Kost |
Subject: |
08/09: emacs: Add location "Packages" button to Package Info buffer. |
Date: |
Mon, 18 Apr 2016 07:13:37 +0000 |
alezost pushed a commit to branch master
in repository guix.
commit 690c055b0816608e4bf740d4e931f3810e6ed120
Author: Alex Kost <address@hidden>
Date: Sat Apr 2 11:04:59 2016 +0300
emacs: Add location "Packages" button to Package Info buffer.
* emacs/guix-ui-package.el (guix-package-info-insert-location): New
procedure.
(guix-package-info-format): Use it.
(guix-output-info-format): Likewise.
---
emacs/guix-ui-package.el | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 966fc9c..7e20b32 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -223,7 +223,7 @@ ENTRIES is a list of package entries to get info about
packages."
ignore
(outputs simple guix-package-info-insert-outputs)
(source simple guix-package-info-insert-source)
- (location format (format guix-package-location))
+ (location simple guix-package-info-insert-location)
(home-url format (format guix-url))
(license format (format guix-package-license))
(systems format guix-package-info-insert-systems)
@@ -383,6 +383,22 @@ formatted with this string, an action button is inserted.")
'guix-package-heading
'spec (guix-package-entry->name-specification entry)))
+(defun guix-package-info-insert-location (location &optional _)
+ "Insert package LOCATION at point."
+ (if (null location)
+ (guix-format-insert nil)
+ (let ((location-file (car (split-string location ":"))))
+ (guix-info-insert-value-indent location 'guix-package-location)
+ (guix-info-insert-indent)
+ (guix-info-insert-action-button
+ "Packages"
+ (lambda (btn)
+ (guix-package-get-display (guix-ui-current-profile)
+ 'location
+ (button-get btn 'location)))
+ (format "Display packages from location '%s'" location-file)
+ 'location location-file))))
+
(defun guix-package-info-insert-systems (systems entry)
"Insert supported package SYSTEMS at point."
(guix-info-insert-value-format
@@ -798,7 +814,7 @@ for all ARGS."
(source simple guix-package-info-insert-source)
(path simple (indent guix-file))
(dependencies simple (indent guix-file))
- (location format (format guix-package-location))
+ (location simple guix-package-info-insert-location)
(home-url format (format guix-url))
(license format (format guix-package-license))
(systems format guix-package-info-insert-systems)
- branch master updated (9bb46c1 -> a7c6178), Alex Kost, 2016/04/18
- 05/09: emacs: Make 'guix-find-location' interactive., Alex Kost, 2016/04/18
- 03/09: emacs: Separate package license code., Alex Kost, 2016/04/18
- 09/09: emacs: Display license info on button press in Package Info buffer., Alex Kost, 2016/04/18
- 01/09: emacs: Add 'guix-packages-by-location' command., Alex Kost, 2016/04/18
- 06/09: doc: emacs: Add "Package Source Locations" section., Alex Kost, 2016/04/18
- 08/09: emacs: Add location "Packages" button to Package Info buffer.,
Alex Kost <=
- 07/09: emacs: Add interface for package locations., Alex Kost, 2016/04/18
- 02/09: emacs: Separate package location code., Alex Kost, 2016/04/18
- 04/09: emacs: Display message if license not found., Alex Kost, 2016/04/18