summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Wahl <marcowahlsoft@gmail.com>2016-09-12 11:44:49 +0200
committerMarco Wahl <marcowahlsoft@gmail.com>2016-09-12 11:44:49 +0200
commitb113d4e1e68e9b19eae065549f55d351ed2ccc28 (patch)
tree0b08a2af14e761c3f757e30be53a5f9fe004f87b
parentab7973684361d1267c78147fe72a6c17f404280b (diff)
downloadorg-mode-b113d4e1e68e9b19eae065549f55d351ed2ccc28.tar.gz
org-agenda: Skip invisible line at bulk marking
* lisp/org-agenda.el (org-agenda-bulk-mark-regexp): When point is on an invisible part move point ahead one line (and don't mark that line.)
-rw-r--r--lisp/org-agenda.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9a368f1..0f7d8fe 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9761,9 +9761,12 @@ This is a command that has to be installed in `calendar-mode-map'."
(goto-char (next-single-property-change (point) 'org-hd-marker))
(while (and (re-search-forward regexp nil t)
(setq txt-at-point (get-text-property (point) 'txt)))
- (when (string-match regexp txt-at-point)
- (setq entries-marked (1+ entries-marked))
- (call-interactively 'org-agenda-bulk-mark))))
+ (if (get-char-property (point) 'invisible)
+ (beginning-of-line 2)
+ (when (string-match regexp txt-at-point)
+ (setq entries-marked (1+ entries-marked))
+ (call-interactively 'org-agenda-bulk-mark)))))
+
(if (not entries-marked)
(message "No entry matching this regexp."))))