Pārlūkot izejas kodu

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.
Bastien 7 gadi atpakaļ
vecāks
revīzija
877617d467
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      lisp/org-agenda.el

+ 3 - 2
lisp/org-agenda.el

@@ -9844,8 +9844,9 @@ bulk action."
   "Execute an remote-editing action on all marked entries.
   "Execute an remote-editing action on all marked entries.
 The prefix arg is passed through to the command if possible."
 The prefix arg is passed through to the command if possible."
   (interactive "P")
   (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)
   (dolist (m org-agenda-bulk-marked-entries)
     (unless (and (markerp m)
     (unless (and (markerp m)
 		 (marker-buffer m)
 		 (marker-buffer m)