From: Markus Heller <hellerm2@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Emacs/Org-mode question
Date: Fri, 31 Jul 2009 15:08:16 -0700 [thread overview]
Message-ID: <h4vq0g$buv$1@ger.gmane.org> (raw)
In-Reply-To: <4A736607.6060704@gmail.com>
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
prev parent reply other threads:[~2009-07-31 22:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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='h4vq0g$buv$1@ger.gmane.org' \
--to=hellerm2@gmail.com \
--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).