emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb 096e39a 209/449: Remove the capture-to-child/sibl


From: Stefan Monnier
Subject: [elpa] externals/gnorb 096e39a 209/449: Remove the capture-to-child/sibling actions for now
Date: Fri, 27 Nov 2020 23:15:40 -0500 (EST)

branch: externals/gnorb
commit 096e39ab12fee6e4129b9c43be380c6bc2fb5551
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Remove the capture-to-child/sibling actions for now
    
    This will take a little more work
    
    * lisp/gnorb-org.el (gnorb-org-trigger-actions): Comment out the
      capture-to-* stuff.
    * lisp/gnorb-utils.el (gnorb-trigger-todo-action): Don't look for the
      capture stuff.
---
 lisp/gnorb-org.el   |  9 +++++----
 lisp/gnorb-utils.el | 31 -------------------------------
 2 files changed, 5 insertions(+), 35 deletions(-)

diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index f403c24..52979e8 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -51,8 +51,9 @@ org-todo regardless of TODO type."
     ("take note" . note)
     ("don't associate" . no-associate)
     ("only associate" . associate)
-    ("capture to child" . cap-child)
-    ("capture to sibling" . cap-sib))
+;    ("capture to child" . cap-child)
+;    ("capture to sibling" . cap-sib)
+)
   "List of potential actions that can be taken on headings.
 
 When triggering an Org heading after receiving or sending a
@@ -63,8 +64,8 @@ todo state: Associate the message, and change TODO state.
 take note: Associate the message, and take a note.
 don't associate: Do nothing at all, don't connect the message and TODO.
 only associate: Associate the message with this heading, do nothing else.
-capture to child: Associate this message with a new child heading.
-capture to sibling: Associate this message with a new sibling heading.
+capture to child: [not yet implemented] Associate this message with a new 
child heading.
+capture to sibling: [not yet implemented] Associate this message with a new 
sibling heading.
 
 You can reorder this list or remove items as suits your workflow.
 The two \"capture\" options will use the value of
diff --git a/lisp/gnorb-utils.el b/lisp/gnorb-utils.el
index 29955e2..e6a3096 100644
--- a/lisp/gnorb-utils.el
+++ b/lisp/gnorb-utils.el
@@ -176,37 +176,6 @@ agenda. Then let the user choose an action from the value 
of
            ((eq action 'associate)
             (org-with-point-at root-marker
               (make-entry (org-id-get-create))))
-           ;; We're going to capture a new heading
-           ((memq action '(cap-child cap-sib))
-            (cl-labels
-                ;; Prepare a function for returning the template
-                ;; location. The function is supposed to leave point
-                ;; at the spot the new entry should be made.
-                ((capture-location
-                  ()
-                  (org-end-of-line)
-                  (if (eq action 'cap-child)
-                      (org-insert-subheading 1)
-                    (org-insert-heading-after-current))
-                  ;; Delete heading stars, the capture template
-                  ;; will insert them.
-                  (org-toggle-heading)))
-              (let ((entry
-                      ;; Use the capture template the user has
-                      ;; specified for new email-related TODOs.
-                      (or (copy-sequence
-                           (assoc gnorb-gnus-new-todo-capture-key
-                                  org-capture-templates))
-                          (user-error
-                           "Please customize 
gnorb-gnus-new-todo-capture-key"))))
-                ;; Do surgery on that template so that it finds
-                ;; its location using our `capture-location' function.
-                (setf (nth 3 entry) '(function capture-location))
-                (let ((org-capture-entry entry))
-                  ;; When org-capture-entry is let-bound, the capture
-                  ;; process will use that template instead of prompting
-                  ;; the user.
-                  (call-interactively 'org-capture)))))
            ((fboundp action)
             (org-with-point-at root-marker
               (make-entry (org-id-get-create))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]