Browse Source

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.)
Marco Wahl 8 years ago
parent
commit
b113d4e1e6
1 changed files with 6 additions and 3 deletions
  1. 6 3
      lisp/org-agenda.el

+ 6 - 3
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."))))