Browse Source

org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug

* lisp/org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug
when matching the text at the end of the line.

Thanks to Nathan Neff for reporting and investigating this bug.
Bastien 5 years ago
parent
commit
c0d08b7efe
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lisp/org-agenda.el

+ 3 - 3
lisp/org-agenda.el

@@ -10098,13 +10098,13 @@ When ARG is greater than one mark ARG lines."
       (goto-char (point-min))
       (goto-char (point-min))
       (goto-char (next-single-property-change (point) 'org-hd-marker))
       (goto-char (next-single-property-change (point) 'org-hd-marker))
       (while (and (re-search-forward regexp nil t)
       (while (and (re-search-forward regexp nil t)
-		  (setq txt-at-point (get-text-property (point) 'txt)))
+		  (setq txt-at-point
+			(get-text-property (match-beginning 0) 'txt)))
 	(if (get-char-property (point) 'invisible)
 	(if (get-char-property (point) 'invisible)
 	    (beginning-of-line 2)
 	    (beginning-of-line 2)
-	  (when (string-match regexp txt-at-point)
+	  (when (string-match-p regexp txt-at-point)
 	    (setq entries-marked (1+ entries-marked))
 	    (setq entries-marked (1+ entries-marked))
 	    (call-interactively 'org-agenda-bulk-mark)))))
 	    (call-interactively 'org-agenda-bulk-mark)))))
-
     (unless entries-marked
     (unless entries-marked
       (message "No entry matching this regexp."))))
       (message "No entry matching this regexp."))))