From mboxrd@z Thu Jan 1 00:00:00 1970 From: torys.anderson@gmail.com (Tory S. Anderson) Subject: Re: feature request: agenda time stamp manipulation Date: Sun, 09 Mar 2014 22:46:06 -0400 Message-ID: <87y50ihitt.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMqEO-0007CG-HL for emacs-orgmode@gnu.org; Sun, 09 Mar 2014 22:46:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMqEE-0002Md-TO for emacs-orgmode@gnu.org; Sun, 09 Mar 2014 22:46:20 -0400 Received: from mail-yh0-x229.google.com ([2607:f8b0:4002:c01::229]:65402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMqEE-0002MJ-OF for emacs-orgmode@gnu.org; Sun, 09 Mar 2014 22:46:10 -0400 Received: by mail-yh0-f41.google.com with SMTP id v1so1883544yhn.28 for ; Sun, 09 Mar 2014 19:46:09 -0700 (PDT) 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've written the following code/function which seems to fulfill my needs in the agenda to be able to manipulate plain time stamps in the same way we can manipulate deadlines and schedules, so that entries added with "i" can then be customized to a particular hour, or be otherwise altered. Hopefully it will be of use to others. (defun org-agenda-time-stamp (arg &optional time) "Schedule the item at point. ARG is passed through to `org-time-stamp'." (interactive "P") (org-agenda-check-type t 'agenda 'timeline 'todo 'tags 'search) (org-agenda-check-no-diary) (let* ((marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker)) (org-insert-labeled-timestamps-at-point nil) ts) (org-with-remote-undo buffer (with-current-buffer buffer (widen) (goto-char pos) (setq ts (org-time-stamp arg))) (org-agenda-show-new-time marker ts " Ts")) (message "%s" ts))) (org-defkey org-agenda-mode-map "\C-c\." 'org-agenda-time-stamp)