From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: guix.el: Key bindings for a "package list"
Date: Sat, 06 Sep 2014 12:17:03 +0400 [thread overview]
Message-ID: <87oaut5fk0.fsf@gmail.com> (raw)
In-Reply-To: <87y4txu86l.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 05 Sep 2014 22:24:50 +0200")
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
Ludovic Courtès (2014-09-06 00:24 +0400) wrote:
> BTW, M-x list-packages lists installed packages at the bottom, and with
> a different face.
>
> What about doing something similar for guix-newest-available-packages & co.?
No objection for a face, but I don't think such sorting should be the
default one. I think it is done in "package.el" just because there is
no way to display only installed or obsolete packages there.
But as in "guix.el" we have "M-x guix-installed-packages" and "M-x
guix-obsolete-packages", in my opinion it would be better to leave the
current sorting by name.
Besides a user can easily sort a list by "Installed" column if he wants.
But of course if most people find such sort preferable, I will comply.
Here is the patch for a new face. OK to push? (I'm never sure in a
commit message).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-Add-a-face-for-installed-packages.patch --]
[-- Type: text/x-diff, Size: 1768 bytes --]
From eafaf96cf86eb353aa414da6773254aca648e260 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Sat, 6 Sep 2014 12:08:42 +0400
Subject: [PATCH] emacs: Add a face for installed packages.
* emacs/guix-list.el (guix-package-list-installed): New face.
(guix-package-list-get-name): Use it.
---
emacs/guix-list.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/emacs/guix-list.el b/emacs/guix-list.el
index 0460d20..08fb3cb 100644
--- a/emacs/guix-list.el
+++ b/emacs/guix-list.el
@@ -448,6 +448,11 @@ This macro defines the following functions:
(upgrade . ?U)
(delete . ?D)))
+(defface guix-package-list-installed
+ '((t :inherit guix-package-info-installed-outputs))
+ "Face used if there are installed outputs for the current package."
+ :group 'guix-package-list)
+
(defface guix-package-list-obsolete
'((t :inherit guix-package-info-obsolete))
"Face used if a package is obsolete."
@@ -478,10 +483,13 @@ likely)."
(defun guix-package-list-get-name (name entry)
"Return NAME of the package ENTRY.
-Colorize it with `guix-package-list-obsolete' if needed."
+Colorize it with `guix-package-list-installed' or
+`guix-package-list-obsolete' if needed."
(guix-get-string name
- (when (guix-get-key-val entry 'obsolete)
- 'guix-package-list-obsolete)))
+ (cond ((guix-get-key-val entry 'obsolete)
+ 'guix-package-list-obsolete)
+ ((guix-get-key-val entry 'installed)
+ 'guix-package-list-installed))))
(defun guix-package-list-get-installed-outputs (installed &optional _)
"Return string with outputs from INSTALLED entries."
--
2.1.0
next prev parent reply other threads:[~2014-09-06 8:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 7:42 guix.el: Key bindings for a "package list" Alex Kost
2014-09-05 8:26 ` Ludovic Courtès
2014-09-05 12:37 ` Alex Kost
2014-09-05 20:22 ` Ludovic Courtès
2014-09-06 16:45 ` Alex Kost
2014-09-06 17:28 ` Taylan Ulrich Bayirli/Kammer
2014-09-06 21:11 ` guix.el & multiple outputs Ludovic Courtès
2014-09-06 22:39 ` Taylan Ulrich Bayirli/Kammer
2014-09-08 6:50 ` Ludovic Courtès
2014-09-07 16:14 ` Alex Kost
2014-09-19 6:58 ` Alex Kost
2014-09-20 14:11 ` [PATCH] emacs: Rewrite scheme side in a functional manner Ludovic Courtès
2014-09-21 10:51 ` Alex Kost
2014-09-21 19:27 ` Ludovic Courtès
2014-09-23 20:14 ` Alex Kost
2014-09-24 7:48 ` Ludovic Courtès
2014-09-21 19:28 ` ‘profile-generations’ Ludovic Courtès
2014-09-21 19:37 ` guix.el & multiple outputs Ludovic Courtès
2014-09-23 20:14 ` Alex Kost
2014-09-24 7:50 ` Ludovic Courtès
2014-09-06 21:15 ` guix.el: Key bindings for a "package list" Ludovic Courtès
2014-09-07 16:14 ` Alex Kost
2014-09-08 6:51 ` Ludovic Courtès
2014-09-05 9:11 ` Taylan Ulrich Bayirli/Kammer
2014-09-05 12:37 ` Alex Kost
2014-09-05 20:24 ` Ludovic Courtès
2014-09-06 8:17 ` Alex Kost [this message]
2014-09-06 10:55 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oaut5fk0.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).