I have a large set of tagged tasks in an org file and I want to shift all their dates by one week. Dates could be scheduled, deadlines, or plain dates. What is the easiest way to do this?
I attempted this using bulk actions via the agenda tag view, but I get a warning message about bulk actions not supporting tag views when I attempt to apply my custom org-agenda-date-later 7
function. I don't know how to do this in agenda without a tag view.
Update 2017-06-19:
I have not solved this yet, but I made some headway. You can shift a date three days relative to its current value using ++3d
in the date prompt. Agenda bulk actions does not work with this because it relies on org-read-date
to prompt for a new date that will be applied to ALL selected items, meaning there is no chance of the currents dates of each item to be considered. So first, that must be fixed, which will require calculating a new date per selected item. Next, bulk actions need to be added to search results. I will try to take care of these one-by-one, but will take awhile.
org-complex-heading-regexp
while youre-search-backward
. When searching, if you go topoint-max
and search backward, you will already be at heading each timere-search-backward
stops as part of thewhile
loop.cl-loop
example that gathers all tags using concepts described in the previous comment. You can modify it to do action at each heading if certain criteria is met, and as it loops through each of the org-agenda-files:(loop for file in (org-agenda-files nil 'ifmode) append (let (result) (org-check-agenda-file file) (with-current-buffer (find-file-noselect file) (save-excursion (goto-char (point-max)) (while (re-search-backward org-complex-heading-regexp nil t) (push (match-string-no-properties 5) result))) result)))
If you don't already havecl
loaded, you can(require 'cl)
*Org Agenda*
buffer for a specific use-case. That being said, theorg-mode
library is a moving target as it is under constant development -- many people frequently upgrade to the latest stable release. Some people use the stock version that ships with Emacs, and some people have older versions of Emacs with older versions oforg-mode
. In short, if a feature was disabled with a warning message, it likely means there were problems enabling it -- to enable it again without knowing all the problems, invites trouble.