[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 13d0c50 56/63: counsel.el (counsel-org-tag-agenda): New co
From: |
Oleh Krehel |
Subject: |
[elpa] master 13d0c50 56/63: counsel.el (counsel-org-tag-agenda): New command |
Date: |
Fri, 21 Aug 2015 12:08:47 +0000 |
branch: master
commit 13d0c5096cd67d8398f145fbd30838858ce6f632
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-org-tag-agenda): New command
* counsel.el (counsel-org-tag-agenda): It's just a flet wrapper around
`org-agenda-set-tags', changing `org-set-tags' to `counsel-org-tag'.
(counsel-org-tag-action): Don't use `with-selected-window', since
`org-agenda-set-tags' will change the buffer for us.
Re #177
---
counsel.el | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/counsel.el b/counsel.el
index ce4087d..f771ab7 100644
--- a/counsel.el
+++ b/counsel.el
@@ -794,12 +794,11 @@ Usable with `ivy-resume', `ivy-next-line-and-call' and
(setf (ivy-state-prompt ivy-last) prompt)
(setq ivy--prompt (concat "%-4d " prompt)))
(cond ((memq this-command '(ivy-done ivy-alt-done))
- (with-selected-window (ivy-state-window ivy-last)
- (counsel-org-change-tags
- (if counsel-org-tags
- (format ":%s:"
- (mapconcat #'identity counsel-org-tags ":"))
- ""))))
+ (counsel-org-change-tags
+ (if counsel-org-tags
+ (format ":%s:"
+ (mapconcat #'identity counsel-org-tags ":"))
+ "")))
((eq this-command 'ivy-call)
(delete-minibuffer-contents))))
@@ -842,6 +841,18 @@ Usable with `ivy-resume', `ivy-next-line-and-call' and
:history 'org-tags-history
:action 'counsel-org-tag-action))))
+;;;###autoload
+(defun counsel-org-tag-agenda ()
+ "Set tags for the current agenda item."
+ (interactive)
+ (let ((store (symbol-function 'org-set-tags)))
+ (unwind-protect
+ (progn
+ (fset 'org-set-tags
+ (symbol-function 'counsel-org-tag))
+ (org-agenda-set-tags nil nil))
+ (fset 'org-set-tags store))))
+
(defun counsel-ag-function (string &optional _pred &rest _unused)
"Grep in the current directory for STRING."
(if (< (length string) 3)
- [elpa] master 8a06271 43/63: Update :dynamic-collection to be a boolean, (continued)
- [elpa] master 8a06271 43/63: Update :dynamic-collection to be a boolean, Oleh Krehel, 2015/08/21
- [elpa] master 2bd9118 44/63: counsel.el (counsel-ag): New command, Oleh Krehel, 2015/08/21
- [elpa] master 8152577 45/63: counsel.el (counsel-recoll): New command, Oleh Krehel, 2015/08/21
- [elpa] master 6ab519f 48/63: counsel.el (counsel-org-tag): Delete dups, Oleh Krehel, 2015/08/21
- [elpa] master e7d778b 47/63: counsel.el (counsel-recoll): Simplify, Oleh Krehel, 2015/08/21
- [elpa] master 5b61577 49/63: Use recoll -t instead of recollq, Oleh Krehel, 2015/08/21
- [elpa] master 8d82b98 51/63: swiper.el (swiper-from-isearch): New command, Oleh Krehel, 2015/08/21
- [elpa] master dba4e47 50/63: counsel.el (org-bound-and-true-p): Update declare, Oleh Krehel, 2015/08/21
- [elpa] master 1f0c79b 52/63: counsel.el (org-setting-tags): Declare dynamic var, Oleh Krehel, 2015/08/21
- [elpa] master 40c17b4 54/63: Add a few more Org declarations, Oleh Krehel, 2015/08/21
- [elpa] master 13d0c50 56/63: counsel.el (counsel-org-tag-agenda): New command,
Oleh Krehel <=
- [elpa] master b8b951b 59/63: Allow ivy-count-format to be set as nil, Oleh Krehel, 2015/08/21
- [elpa] master a33af29 55/63: counsel.el (org-bound-and-true-p): Use bound-and-true-p, Oleh Krehel, 2015/08/21
- [elpa] master 6b57efe 57/63: Bind "C-M-j" to ivy-immediate-done, Oleh Krehel, 2015/08/21
- [elpa] master be989fe 60/63: Preselect perfect matches with a leading ^, Oleh Krehel, 2015/08/21
- [elpa] master 476fc5d 58/63: Add with-ivy-window macro, Oleh Krehel, 2015/08/21
- [elpa] master 4443a8b 53/63: counsel.el (org-last-tags-completion-table): Declare, Oleh Krehel, 2015/08/21
- [elpa] master 098bec0 61/63: counsel.el (counsel-find-file): Fix window focus issue, Oleh Krehel, 2015/08/21
- [elpa] master 09f86fc 62/63: doc/Changelog.org: Add, Oleh Krehel, 2015/08/21
- [elpa] master f5dac47 63/63: Merge commit '09f86fca437f1b2e168093824e9d4ee0aea5130a' from swiper, Oleh Krehel, 2015/08/21