From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Converting dates to org-mode dates Date: Mon, 12 Nov 2007 15:02:19 +0000 Message-ID: <871wav33t0.fsf@bzg.ath.cx> References: <00c401c8252e$bd513bc0$6a80a8c0@CUBE> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrZrt-00062e-CQ for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:02:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrZrq-0005xc-K7 for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:02:24 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrZro-0005xK-T8 for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:02:20 -0500 Received: from ik-out-1112.google.com ([66.249.90.181]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrZro-0008Ni-JG for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:02:20 -0500 Received: by ik-out-1112.google.com with SMTP id c29so709835ika for ; Mon, 12 Nov 2007 06:02:19 -0800 (PST) In-Reply-To: <00c401c8252e$bd513bc0$6a80a8c0@CUBE> (Chris Randle's message of "Mon, 12 Nov 2007 13:20:05 -0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org "Chris Randle" writes: > [2007-11-12 Tue] (should be Mon) > > As far as I can see, that will stay like this until the date is shifted > in some way. > > Is there any way to parse an entire region/buffer for Org-mode dates and > refresh their day of the week text? Maybe you can try this (not heavily tested): (defun my-update-day-name-in-inactive-time-stamps () "Update the abbreviate day name in inactive time-stamps." (interactive) (save-excursion (goto-char (point-min)) (while (re-search-forward "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)\\( [a-z]+\\)\\]" nil t) (let* ((date (match-string 1)) (day (format-time-string "%a" (apply 'encode-time (save-match-data (org-parse-time-string date)))))) (replace-match (concat "[" date " " day "]") t t))))) -- Bastien