From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hoffman Subject: Rescheduling timestamps on a headline (not the next line) Date: Sat, 19 Sep 2015 16:48:44 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdP43-0007le-Lh for emacs-orgmode@gnu.org; Sat, 19 Sep 2015 16:48:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdP40-00084f-FZ for emacs-orgmode@gnu.org; Sat, 19 Sep 2015 16:48:55 -0400 Received: from plane.gmane.org ([80.91.229.3]:58149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdP40-00084V-8u for emacs-orgmode@gnu.org; Sat, 19 Sep 2015 16:48:52 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZdP3x-0004AD-3d for emacs-orgmode@gnu.org; Sat, 19 Sep 2015 22:48:49 +0200 Received: from 135-23-214-163.cpe.pppoe.ca ([135.23.214.163]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Sep 2015 22:48:49 +0200 Received: from gmane3-hoffman by 135-23-214-163.cpe.pppoe.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Sep 2015 22:48:49 +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 I am using org-mode 8.2.10. I often like to keep SCHEDULED and DEADLINE timestamps on the headline so they are more compact and show up even when I have collapsed that tree. Unfortunately, in this case, (org-schedule) and (org-deadline) add a new timestamp on the second line instead of replacing the previous schedule. Steps to reproduce: 1. Visit new file `test.org` 2. Enter `* Task SCHEDULED: <2015-09-19>` in the buffer 3. C-c C-s for (org-schedule) 4. S-right to select 2015-09-20 5. RET Output: * Task SCHEDULED: <2015-09-19> SCHEDULED: <2015-09-20 Sun> What I expected: * Task SCHEDULED: <2015-09-20 Sun> Is there a way to get my expected output? (org-add-planning-info) seems to go to the end of the headline: (org-back-to-heading t) (looking-at (concat org-outline-regexp "\\( *\\)[^\r\n]*")) (goto-char (match-end 1)) (setq col (current-column)) (goto-char (match-end 0)) Before it starts looking for text to replace. Many thanks, Michael