* Emacs/Org-mode question
@ 2009-07-31 21:39 Markus Heller
2009-07-31 21:45 ` Brian van den Broek
0 siblings, 1 reply; 3+ messages in thread
From: Markus Heller @ 2009-07-31 21:39 UTC (permalink / raw)
To: emacs-orgmode
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
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Emacs/Org-mode question
2009-07-31 21:39 Emacs/Org-mode question Markus Heller
@ 2009-07-31 21:45 ` Brian van den Broek
2009-07-31 22:08 ` Markus Heller
0 siblings, 1 reply; 3+ messages in thread
From: Brian van den Broek @ 2009-07-31 21:45 UTC (permalink / raw)
To: Markus Heller; +Cc: emacs-orgmode
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
> Markus
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.
Best,
Brian vdB
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Emacs/Org-mode question
2009-07-31 21:45 ` Brian van den Broek
@ 2009-07-31 22:08 ` Markus Heller
0 siblings, 0 replies; 3+ messages in thread
From: Markus Heller @ 2009-07-31 22:08 UTC (permalink / raw)
To: emacs-orgmode
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
>> Markus
>
> 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.
>
> Best,
>
> Brian vdB
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
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)
Cheerio
M
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-31 22:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31 21:39 Emacs/Org-mode question Markus Heller
2009-07-31 21:45 ` Brian van den Broek
2009-07-31 22:08 ` Markus Heller
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).