summaryrefslogtreecommitdiff
path: root/helm-apt.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2013-03-25 18:03:44 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2013-03-25 18:03:44 +0100
commitbbe5af24c71e88f75a9671e336ca22bf24742724 (patch)
tree77e81110923ece7543f4aba73bda56dddd3428b5 /helm-apt.el
parent7dbf01285ffebf2c903b1a159adabf634d2545db (diff)
* helm-apt.el (helm-apt-show-only-not-installed): Filter not installed.
* helm-help.el: Document it.
Diffstat (limited to 'helm-apt.el')
-rw-r--r--helm-apt.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/helm-apt.el b/helm-apt.el
index cd9a3d9e..6c8a990b 100644
--- a/helm-apt.el
+++ b/helm-apt.el
@@ -48,6 +48,7 @@
(set-keymap-parent map helm-map)
(define-key map (kbd "C-c ?") 'helm-apt-help)
(define-key map (kbd "M-I") 'helm-apt-show-only-installed)
+ (define-key map (kbd "M-U") 'helm-apt-show-only-not-installed)
(define-key map (kbd "M-D") 'helm-apt-show-only-deinstalled)
(define-key map (kbd "M-A") 'helm-apt-show-all)
map))
@@ -57,7 +58,7 @@
`((name . "APT")
(init . helm-apt-init)
(candidates-in-buffer)
- (filtered-candidate-transformer . helm-apt-candidate-transformer)
+ (candidate-transformer . helm-apt-candidate-transformer)
(display-to-real . helm-apt-display-to-real)
(requires-pattern . 2)
(update . helm-apt-refresh)
@@ -88,7 +89,7 @@
"Persistent action for APT source."
(helm-apt-cache-show candidate))
-(defun helm-apt-candidate-transformer (candidates source)
+(defun helm-apt-candidate-transformer (candidates)
"Show installed CANDIDATES and the ones to deinstall in a different color."
(loop for cand in candidates
for name = (helm-apt-display-to-real cand)
@@ -102,7 +103,7 @@
"install")
(memq helm-apt-show-only '(all installed)))
(propertize cand 'face 'helm-apt-installed))
- ((eq helm-apt-show-only 'all) cand))
+ ((memq helm-apt-show-only '(noinstalled all)) cand))
when show collect show))
;;;###autoload
@@ -112,6 +113,12 @@
(helm-update))
;;;###autoload
+(defun helm-apt-show-only-not-installed ()
+ (interactive)
+ (setq helm-apt-show-only 'noinstalled)
+ (helm-update))
+
+;;;###autoload
(defun helm-apt-show-only-deinstalled ()
(interactive)
(setq helm-apt-show-only 'deinstalled)