branch: master
commit 61fd0f550ab4cc29dc432f01ec18e5e2339070a6
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-org-capture): Use delq
    
    Also remove tabs.
    
    Re #1320
---
 counsel.el | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/counsel.el b/counsel.el
index 19f505f..1160651 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2871,31 +2871,32 @@ The face can be customized through 
`counsel-org-goto-face-style'."
   (interactive)
   (require 'org-capture)
   (ivy-read "Capture template: "
-           (remove nil
-                   (mapcar (lambda (x)
-                             (when (> (length x) 2)
-                               (format "%-5s %s" (nth 0 x) (nth 1 x))))
-                           (or org-capture-templates
-                                '(("t" "Task" entry (file+headline "" "Tasks")
-                                   "* TODO %?\n  %u\n  %a")))))
-           :require-match t
-           :action (lambda (x)
-                     (org-capture nil (car (split-string x))))
-           :caller 'counsel-org-capture))
+            (delq nil
+                  (mapcar
+                   (lambda (x)
+                     (when (> (length x) 2)
+                       (format "%-5s %s" (nth 0 x) (nth 1 x))))
+                   (or org-capture-templates
+                       '(("t" "Task" entry (file+headline "" "Tasks")
+                          "* TODO %?\n  %u\n  %a")))))
+            :require-match t
+            :action (lambda (x)
+                      (org-capture nil (car (split-string x))))
+            :caller 'counsel-org-capture))
 
 (ivy-set-actions
  'counsel-org-capture
  '(("t" (lambda (x)
-         (org-capture-goto-target (car (split-string x))))
+          (org-capture-goto-target (car (split-string x))))
     "go to target")
    ("l" (lambda (_x)
-         (org-capture-goto-last-stored))
+          (org-capture-goto-last-stored))
     "go to last stored")
    ("p" (lambda (x)
-         (org-capture 0 (car (split-string x))))
+          (org-capture 0 (car (split-string x))))
     "insert template at point")
    ("c" (lambda (_x)
-         (customize-variable 'org-capture-templates))
+          (customize-variable 'org-capture-templates))
     "customize org-capture-templates")))
 
 ;;** `counsel-mark-ring'

Reply via email to