diff options
author | John Wiegley <johnw@newartisans.com> | 2010-12-03 17:38:35 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-12-03 17:52:46 -0500 |
commit | beedff9a49397d40f712c706b911c8ff039811e6 (patch) | |
tree | 8b2f809e9ce9216d13270b20cb43e3556558472d | |
parent | e10e6197e77ca77953f04785ddc4493df6b96fef (diff) | |
download | org-mode-beedff9a49397d40f712c706b911c8ff039811e6.tar.gz |
`org-agenda-bulk-mark' now accepts a numerical prefix arg
-rw-r--r-- | lisp/org-agenda.el | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 6ae6c02..3549483 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7741,25 +7741,26 @@ This is a command that has to be installed in `calendar-mode-map'." (eq (get-char-property (point-at-bol) 'type) 'org-marked-entry-overlay)) -(defun org-agenda-bulk-mark () +(defun org-agenda-bulk-mark (&optional arg) "Mark the entry at point for future bulk action." - (interactive) - (org-agenda-check-no-diary) - (let* ((m (org-get-at-bol 'org-hd-marker)) - ov) - (unless (org-agenda-bulk-marked-p) - (unless m (error "Nothing to mark at point")) - (push m org-agenda-bulk-marked-entries) - (setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol)))) - (org-overlay-display ov "> " - (org-get-todo-face "TODO") - 'evaporate) - (overlay-put ov 'type 'org-marked-entry-overlay)) - (beginning-of-line 2) - (while (and (get-char-property (point) 'invisible) (not (eobp))) - (beginning-of-line 2)) - (message "%d entries marked for bulk action" - (length org-agenda-bulk-marked-entries)))) + (interactive "p") + (dotimes (i (max arg 1)) + (unless (org-get-at-bol 'org-agenda-diary-link) + (let* ((m (org-get-at-bol 'org-hd-marker)) + ov) + (unless (org-agenda-bulk-marked-p) + (unless m (error "Nothing to mark at point")) + (push m org-agenda-bulk-marked-entries) + (setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol)))) + (org-overlay-display ov "> " + (org-get-todo-face "TODO") + 'evaporate) + (overlay-put ov 'type 'org-marked-entry-overlay)) + (beginning-of-line 2) + (while (and (get-char-property (point) 'invisible) (not (eobp))) + (beginning-of-line 2)) + (message "%d entries marked for bulk action" + (length org-agenda-bulk-marked-entries)))))) (defun org-agenda-bulk-unmark () "Unmark the entry at point for future bulk action." |