[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 96afd01 084/449: Skip Note items when scanning st
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 96afd01 084/449: Skip Note items when scanning state changes |
Date: |
Fri, 27 Nov 2020 23:15:13 -0500 (EST) |
branch: externals/gnorb
commit 96afd01ef0336151f5758de06c8105fa31cb5a14
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Skip Note items when scanning state changes
lisp/gnorb-org.el: gnorb-org-scan-state-notes will now skip any leading
- Note items in the logbook, and start checking with
the first - State item.
This is a temporary measure. If gnorb-org-mail-scan-state-changes is set
to 'all, this will only skip the leading - Note items, not those later
in the drawer. But really, who would want to scan all the state-change
notes? This needs to be much more flexible and customizable, so people
can make gnorb-org-handle-mail do just what they want.
---
lisp/gnorb-org.el | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index f7970d7..73cc672 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -182,12 +182,24 @@ message link found will be replied to."
(setq state-list (org-list-context))))
(t nil))
(when state-list
- (let* ((origin (if org-log-states-order-reversed
- (car state-list)
- (second state-list)))
- (item (org-in-item-p))
- (struct (org-list-struct))
+ (let* ((struct (org-list-struct))
(prevs (org-list-prevs-alist struct))
+ (origin (progn (goto-char
+ (if org-log-states-order-reversed
+ (car state-list)
+ (second state-list)))
+ (while (not (looking-at
+ (concat
+ (nth 2 (car (org-list-struct)))
+ "State ")))
+ (goto-char
+ (funcall
+ (if org-log-states-order-reversed
+ 'org-list-get-next-item
+ 'org-list-get-prev-item)
+ (org-in-item-p) struct prevs)))
+ (point)))
+ (item (org-in-item-p))
(bound (if (eq gnorb-org-mail-scan-state-changes 'first)
(save-excursion
(goto-char
- [elpa] externals/gnorb f3e56d2 042/449: gnorb-org-mail-todos -- new docstring and default, (continued)
- [elpa] externals/gnorb f3e56d2 042/449: gnorb-org-mail-todos -- new docstring and default, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8f598e1 044/449: Delete previous commented function, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b5d3731 046/449: What on earth was that still doing there?, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0db3991 051/449: Move mail search backend stuff to gnorb-gnus, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9fff78a 057/449: Changing email TODO handling to operate by org ID, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 30afb67 068/449: Various docstring and comment edits., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7052248 069/449: New generalized function gnorb-trigger-todo-action, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 70b5534 070/449: Make TODOs from outgoing messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bda9cfe 079/449: More complete docs: How to use Gnorb for email tracking, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c0e03b2 081/449: Actually add the sent message ID to the TODO, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 96afd01 084/449: Skip Note items when scanning state changes,
Stefan Monnier <=
- [elpa] externals/gnorb 0c247d4 085/449: Remember to put :group and :type on defcustoms, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5876834 088/449: BBDB posting styles, first draft, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 69c3312 089/449: Refactoring of gnorb-org link scanning, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6a66e21 093/449: Got the arguments to org-get-heading backwards, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a64f652 094/449: Have gnorb-org-popup-bbdb scan the whole subtree, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 68f1473 096/449: More robust check for an open nngnorb server, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9fbd947 105/449: Collect attachments on incoming trigger action, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb adba76d 117/449: Rewrite of link-scanning routine, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 522f653 121/449: Declare some function, possibly unneccesary, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1a40d11 130/449: Checking wishlist items off, Stefan Monnier, 2020/11/27