From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: What is the best way to set #+DATE to today's date? Date: Thu, 06 Aug 2015 19:41:33 +0200 Message-ID: <87si7wl3g2.fsf@gmx.us> References: <87bnekmknk.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNPAu-0006VC-Qy for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 13:41:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNPAl-0007y7-IF for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 13:41:52 -0400 Received: from plane.gmane.org ([80.91.229.3]:45452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNPAl-0007vn-Aw for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 13:41:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZNPAj-0006Z3-LJ for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 19:41:41 +0200 Received: from ip5b4025d5.dynamic.kabel-deutschland.de ([91.64.37.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Aug 2015 19:41:41 +0200 Received: from rasmus by ip5b4025d5.dynamic.kabel-deutschland.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Aug 2015 19:41:41 +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 Kaushal writes: >> Why don't you just use a timestamp? > > But that would need me to insert the timestamp manually each time before > exports If you *always* want the current date you don't need to set date. >> You can update whenever you want or using >> (org-insert-time-stamp (current-time)) >> at the right spot. > > Wouldn't that too need manual navigation to #+date: and then eval that > elisp form? Sure, but that's easy to find (untested): (defun rasmus/update-date () "update #+date keyword" (org-with-wide-buffer (let ((case-fold-search t)) (goto-char (point-min)) (search-forward-regexp "^#+date: ?") (delete-region (point) (line-end-position)) (org-insert-time-stamp (current-time))))) My point was that I don't understand the need for your today macro... Rasmus -- History is what should never happen again