From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: Converting dates to org-mode dates Date: Mon, 12 Nov 2007 14:30:35 +0100 Message-ID: References: <00c401c8252e$bd513bc0$6a80a8c0@CUBE> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrZR0-000872-33 for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 08:34:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrZQy-00086q-Tt for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 08:34:37 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrZQy-00086n-Lc for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 08:34:36 -0500 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IrZQy-00009h-64 for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 08:34:36 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IrZP8-0006aI-Mv for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 13:32:42 +0000 Received: from 212.34.176.74 ([212.34.176.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Nov 2007 13:32:42 +0000 Received: from rainer.stengele by 212.34.176.74 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Nov 2007 13:32:42 +0000 In-Reply-To: <00c401c8252e$bd513bc0$6a80a8c0@CUBE> 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 schrieb: > Hi > > I've been converting a file that contains dates in this format: > > dd/mm/yyyy > > to Org-mode inactive format. It's pretty simple using regular expression > search & replace, except that I get this far: > > [yyyy-mm-dd ] > > and can't find a way to put the day of the week in there. Individually, > I can do a 'C-u 0 S-right' on each date, and that shifts the date 0 days > into the future, and fills in the day of the week. > > This also impacts on cases (unusual and unlikely, I grant you) where you > might have an incorrect day: > > [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? > I would probably do this with an Emacs macro, searching for the date as a regex, moving to the space before "]" and shifting rigth and again shifting left. This will end up with the right week day for each date. rainer