From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH 5/6] emacs: Remove 'generation' search type. Date: Sun, 10 Jan 2016 12:53:49 +0300 Message-ID: <1452419630-4399-6-git-send-email-alezost@gmail.com> References: <1452419630-4399-1-git-send-email-alezost@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aICha-0002PR-8Y for guix-devel@gnu.org; Sun, 10 Jan 2016 04:54:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIChZ-00028u-1O for guix-devel@gnu.org; Sun, 10 Jan 2016 04:54:22 -0500 Received: from mail-lb0-x244.google.com ([2a00:1450:4010:c04::244]:36102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIChY-00028f-Mn for guix-devel@gnu.org; Sun, 10 Jan 2016 04:54:20 -0500 Received: by mail-lb0-x244.google.com with SMTP id ti8so24071844lbb.3 for ; Sun, 10 Jan 2016 01:54:20 -0800 (PST) Received: from localhost.localdomain ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id h9sm19893746lbj.42.2016.01.10.01.54.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jan 2016 01:54:19 -0800 (PST) In-Reply-To: <1452419630-4399-1-git-send-email-alezost@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Use 'installed' search type instead. * emacs/guix-main.scm (%patterns-makers): Remove 'generation'. (package/output-sexps): Adjust accordingly. * emacs/guix-ui-generation.el (guix-generation-info-insert-number): Replace 'generation' search with 'installed'. (guix-generation-list-show-packages): Likewise. * emacs/guix-messages.el (guix-messages): Remove 'generation'. --- emacs/guix-main.scm | 7 +------ emacs/guix-messages.el | 16 +--------------- emacs/guix-ui-generation.el | 9 +++++---- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index dfa9cba..1199679 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -668,7 +668,6 @@ ENTRIES is a list of installed manifest entries." (id . ,(apply-to-rest ids->package-patterns)) (name . ,(apply-to-rest specifications->package-patterns)) (installed . ,manifest-package-proc) - (generation . ,manifest-package-proc) (obsolete . ,(apply-to-first obsolete-package-patterns)) (regexp . ,regexp-proc) (all-available . ,all-proc) @@ -677,7 +676,6 @@ ENTRIES is a list of installed manifest entries." (id . ,(apply-to-rest ids->output-patterns)) (name . ,(apply-to-rest specifications->output-patterns)) (installed . ,manifest-output-proc) - (generation . ,manifest-output-proc) (obsolete . ,(apply-to-first obsolete-output-patterns)) (regexp . ,regexp-proc) (all-available . ,all-proc) @@ -692,10 +690,7 @@ ENTRIES is a list of installed manifest entries." search-type search-vals) "Return information about packages or package outputs. See 'entry-sexps' for details." - (let* ((profile (if (eq? search-type 'generation) - (generation-file-name profile (car search-vals)) - profile)) - (manifest (profile-manifest profile)) + (let* ((manifest (profile-manifest profile)) (patterns (if (and (eq? entry-type 'output) (eq? search-type 'profile-diff)) (match search-vals diff --git a/emacs/guix-messages.el b/emacs/guix-messages.el index 234d3d1..9f6d833 100644 --- a/emacs/guix-messages.el +++ b/emacs/guix-messages.el @@ -55,14 +55,7 @@ (obsolete (0 "No obsolete packages in profile '%s'." profile) (1 "A single obsolete package in profile '%s'." profile) - (many "%d obsolete packages in profile '%s'." count profile)) - (generation - (0 "No packages installed in generation %d of profile '%s'." - val profile) - (1 "A single package installed in generation %d of profile '%s'." - val profile) - (many "%d packages installed in generation %d of profile '%s'." - count val profile))) + (many "%d obsolete packages in profile '%s'." count profile))) (output (id @@ -91,13 +84,6 @@ (0 "No obsolete package outputs in profile '%s'." profile) (1 "A single obsolete package output in profile '%s'." profile) (many "%d obsolete package outputs in profile '%s'." count profile)) - (generation - (0 "No package outputs installed in generation %d of profile '%s'." - val profile) - (1 "A single package output installed in generation %d of profile '%s'." - val profile) - (many "%d package outputs installed in generation %d of profile '%s'." - count val profile)) (profile-diff guix-message-outputs-by-diff)) diff --git a/emacs/guix-ui-generation.el b/emacs/guix-ui-generation.el index eebcedf..5d55c4c 100644 --- a/emacs/guix-ui-generation.el +++ b/emacs/guix-ui-generation.el @@ -127,8 +127,9 @@ current profile's GENERATION." (lambda (btn) (guix-buffer-get-display-entries 'list guix-package-list-type - (list (guix-ui-current-profile) - 'generation (button-get btn 'number)) + (list (guix-generation-current-packages-profile + (button-get btn 'number)) + 'installed) 'add)) "Show installed packages for this generation" 'number number) @@ -202,8 +203,8 @@ VAL is a boolean value." "List installed packages for the generation at point." (interactive) (guix-package-get-display - (guix-ui-current-profile) - 'generation (guix-list-current-id))) + (guix-generation-current-packages-profile (guix-list-current-id)) + 'installed)) (defun guix-generation-list-generations-to-compare () "Return a sorted list of 2 marked generations for comparing." -- 2.6.3