summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2018-04-26 21:12:20 +0200
committerBastien <bzg@gnu.org>2018-04-26 21:12:20 +0200
commit877617d4673b41c72e923788a3b66e0bfe600f0f (patch)
tree9c9425e5e836fc52dc8cc1de49362553444da8ed
parentf80f7ed98bf489da0fbc3b3df4df1aaf5c3290e7 (diff)
downloadorg-mode-877617d4673b41c72e923788a3b66e0bfe600f0f.tar.gz
org-agenda: Act on the current entry if there is no mark
* lisp/org-agenda.el (org-agenda-bulk-action): When there is no mark, act on the agenda entry at point. Thanks to Marco Wahl for suggesting this.
-rw-r--r--lisp/org-agenda.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 5503cb6..3b187dd 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9844,8 +9844,9 @@ bulk action."
"Execute an remote-editing action on all marked entries.
The prefix arg is passed through to the command if possible."
(interactive "P")
- ;; Make sure we have markers, and only valid ones.
- (unless org-agenda-bulk-marked-entries (user-error "No entries are marked"))
+ ;; When there is no mark, act on the agenda entry at point.
+ (if (not org-agenda-bulk-marked-entries)
+ (save-excursion (org-agenda-bulk-mark)))
(dolist (m org-agenda-bulk-marked-entries)
(unless (and (markerp m)
(marker-buffer m)