emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer Stengele <rainer.stengele@diplan.de>
To: emacs-orgmode@gnu.org
Subject: Re: Converting dates to org-mode dates
Date: Mon, 12 Nov 2007 14:30:35 +0100	[thread overview]
Message-ID: <fh9khm$lt1$1@ger.gmane.org> (raw)
In-Reply-To: <00c401c8252e$bd513bc0$6a80a8c0@CUBE>

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

  reply	other threads:[~2007-11-12 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 13:20 Converting dates to org-mode dates Chris Randle
2007-11-12 13:30 ` Rainer Stengele [this message]
2007-11-12 15:02 ` Bastien
2007-11-12 14:45   ` Chris Randle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fh9khm$lt1$1@ger.gmane.org' \
    --to=rainer.stengele@diplan.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).