[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: emacs: Use '@' to separate package names and version numbers.
From: |
Alex Kost |
Subject: |
02/02: emacs: Use '@' to separate package names and version numbers. |
Date: |
Fri, 04 Mar 2016 10:17:39 +0000 |
alezost pushed a commit to branch master
in repository guix.
commit db0c709b9aa75b44cdc6a5c0e0b9c9a1ab5212ec
Author: Alex Kost <address@hidden>
Date: Thu Mar 3 12:53:03 2016 +0300
emacs: Use '@' to separate package names and version numbers.
This is a followup to commit 1b846da8c372bee78851439fd9e72b2499115e5a.
* emacs/guix-base.el (guix-package-name-specification): Use "@" instead
of "-".
* emacs/guix-main.scm (name+version->full-name): Likewise.
(package-inputs-names): Use 'make-package-specification' instead of
'package-full-name'.
(full-name->name+version): Update the docstring.
* emacs/guix-ui-package.el (guix-packages-by-name): Likewise.
---
emacs/guix-base.el | 2 +-
emacs/guix-main.scm | 7 ++++---
emacs/guix-ui-package.el | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/emacs/guix-base.el b/emacs/guix-base.el
index 1248ecb..75d19cb 100644
--- a/emacs/guix-base.el
+++ b/emacs/guix-base.el
@@ -44,7 +44,7 @@
(defun guix-package-name-specification (name version &optional output)
"Return Guix package specification by its NAME, VERSION and OUTPUT."
- (concat name "-" version
+ (concat name "@" version
(when output (concat ":" output))))
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index 11b9c77..34da6ac 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -86,13 +86,13 @@
(define (full-name->name+version spec)
"Given package specification SPEC with or without output,
return two values: name and version. For example, for SPEC
-\"foo-0.9.1b:lib\", return \"foo\" and \"0.9.1b\"."
+\"address@hidden:lib\", return \"foo\" and \"0.9.1b\"."
(let-values (((name version output)
(package-specification->name+version+output spec)))
(values name version)))
(define (name+version->full-name name version)
- (string-append name "-" version))
+ (string-append name "@" version))
(define* (make-package-specification name #:optional version output)
(let ((full-name (if version
@@ -263,7 +263,8 @@ Example:
"Return a list of full names of the packages from package INPUTS."
(filter-map (match-lambda
((_ (? package? package))
- (package-full-name package))
+ (make-package-specification (package-name package)
+ (package-version package)))
((_ (? package? package) output)
(make-package-specification (package-name package)
(package-version package)
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 8635c73..9d81c61 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -946,7 +946,7 @@ See `guix-find-location' for the meaning of DIRECTORY."
(defun guix-packages-by-name (name &optional profile)
"Display Guix packages with NAME.
NAME is a string with name specification. It may optionally contain
-a version number. Examples: \"guile\", \"guile-2.0.11\".
+a version number. Examples: \"guile\", \"address@hidden".
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."