[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Emacs/Org-mode question

From: Markus Heller
Subject: [Orgmode] Re: Emacs/Org-mode question
Date: Fri, 31 Jul 2009 15:08:16 -0700
User-agent: Thunderbird (Windows/20090605)

Brian van den Broek wrote:
Markus Heller said unto the world at 31/07/09 05:39 PM:
Hello all,

this might be a typical beginner question ...

I often use the sequence

C-. <Ret> C-- :

to create this:

- <2009-07-31 Fri>:

where the date is today's date.

I'm sure there's a way to create a command for this, but I have no idea how. I'd like to bind this sequence to something like C-c t or similar.

How do I do this?

Thanks and Cheers

Hi Markus,

I have the following in my .emacs:

(defun date ()
  (interactive "*")
    (insert (format-time-string "%Y-%m-%d %T" (current-time))))
(global-set-key [f11] 'date)

This will at least get you started. See the documentation for format-time-string to season as suits.


Brian vdB

Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.

Thanks Brian,

this got me started.  The code in my .emacs looks like this for me now:

(defun org-date ()
  (interactive "*")
    (insert (format-time-string "- <%Y-%m-%d %a>: ")))
(global-set-key (kbd "C-c d") 'org-date)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]