* making key binding for timestamp alternative by default
@ 2010-01-30 18:48 John Withers
2010-01-30 18:58 ` Ryan Thompson
0 siblings, 1 reply; 2+ messages in thread
From: John Withers @ 2010-01-30 18:48 UTC (permalink / raw)
To: emacs-orgmode
Folks,
I am trying to figure out what to add to my .emacs to make the normal
key binding call to org-time-stamp into the version with the C-u
modifier by default.
That is, in the default bindings, I am trying to make
C-c .
Perform the action that is normally performed by
C-u C-c .
I am sure this is dead simple, but I have no immediate clue how to do
it. If these were two different functions I would know how to do it, but
using the key binding commands I don't know how to tell my key binding
that I want the C-u version.
Any help would be greatly appreciated, as I am sure I will have use for
this in many other places as well.
-john
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: making key binding for timestamp alternative by default
2010-01-30 18:48 making key binding for timestamp alternative by default John Withers
@ 2010-01-30 18:58 ` Ryan Thompson
0 siblings, 0 replies; 2+ messages in thread
From: Ryan Thompson @ 2010-01-30 18:58 UTC (permalink / raw)
To: grayarea; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1544 bytes --]
All you need to do is define a function that supplies the prefix to
org-time-stamp:
(defun org-time-stamp-with-time (&optional inactive)
"Prompt for a date/time and insert a time stamp containing a
date and time. All parts of a date not specified by the user
will be filled in from the current date/time. So if you press
just return without typing anything, the time stamp will
represent the current date/time. If there is already a
timestamp at the cursor, it will be modified."
(interactive)
(org-time-stamp t inactive))
Then bind that you a key.
On Sat, Jan 30, 2010 at 10:48 AM, John Withers <grayarea@reddagger.org>wrote:
> Folks,
>
> I am trying to figure out what to add to my .emacs to make the normal
> key binding call to org-time-stamp into the version with the C-u
> modifier by default.
>
> That is, in the default bindings, I am trying to make
> C-c .
> Perform the action that is normally performed by
> C-u C-c .
>
> I am sure this is dead simple, but I have no immediate clue how to do
> it. If these were two different functions I would know how to do it, but
> using the key binding commands I don't know how to tell my key binding
> that I want the C-u version.
>
> Any help would be greatly appreciated, as I am sure I will have use for
> this in many other places as well.
>
> -john
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
[-- Attachment #1.2: Type: text/html, Size: 2091 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-30 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-30 18:48 making key binding for timestamp alternative by default John Withers
2010-01-30 18:58 ` Ryan Thompson
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).