From mboxrd@z Thu Jan 1 00:00:00 1970 From: Memnon Anon Subject: Re: bulk relative time shift (in org file)? Date: Thu, 28 Jul 2011 15:47:04 +0000 (UTC) Message-ID: <87r55aifzs.fsf@mean.albasani.net> References: <871uyaogg9.fsf@mean.albasani.net> <87k4bn8a5p.fsf@mean.albasani.net> <87sjq6up5y.fsf@gnu.org> <87y5zynmda.fsf@mean.albasani.net> <8739hvv6ce.fsf@altern.org> <87wrf44yp7.fsf@mean.albasani.net> <0FE41F87-81FA-4F4B-8262-447A58B4FC56@gilbert.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmSnz-0007gi-5p for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 11:47:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmSnx-0006f9-Iq for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 11:47:22 -0400 Received: from lo.gmane.org ([80.91.229.12]:44250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmSnx-0006eT-9Q for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 11:47:21 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QmSns-0005n6-Hh for emacs-orgmode@gnu.org; Thu, 28 Jul 2011 17:47:16 +0200 Received: from e178220239.adsl.alicedsl.de ([85.178.220.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jul 2011 17:47:16 +0200 Received: from gegendosenfleisch by e178220239.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jul 2011 17:47:16 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Michael C Gilbert writes: > Ideally, something like this should be available in the org file, > rather than in the agenda. [...] > > But if I shift back and forth to the agenda, then I can make this > work. I'm assuming that the 'Cc C-s' and 'C-c C-d' commands don't work > on regions or on everything under a heading? It may be feasible to make scheduling and deadlining act on region; lets wait what Bastien thinks when he is back from well deserved vacation. I have been experimenting to get this done with a simple function one could bind to e.g. `C-s M-s'. (Or one could defadvice the proper functions (?), I have to read up on that ...) In my first tests, it somewhat works, but the logbook is updated only on the last item, not sure why that is, yet. I will investigate later if no one jumps in and improves/replaces this prototype: --8<---------------cut here---------------start------------->8--- (defun my-org-schedule-shift () (interactive) (let* ((acton (if (org-region-active-p) "region" "tree")) (val (read-string (concat "shift "acton" by: ")))) (if (equal acton "region") (org-map-region '(lambda () (org-schedule nil val)) (region-beginning) (region-end)) (org-map-tree '(lambda () (org-schedule nil val)))))) (defun my-org-schedule-shift-region () (interactive) (let ((val (read-string "Shift region by: "))) (org-map-region '(lambda () (org-schedule nil val)) (region-beginning) (region-end)))) (defun my-org-schedule-shift-tree () (interactive) (let ((val (read-string "Shift region by: "))) (org-map-tree '(lambda () (org-schedule nil val))))) --8<---------------cut here---------------end--------------->8--- Memnon