From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Thompson Subject: Re: making key binding for timestamp alternative by default Date: Sat, 30 Jan 2010 10:58:44 -0800 Message-ID: <2a4ba2fd1001301058k23c38a88r425f469e5cecba17@mail.gmail.com> References: <1264877285.31673.95.camel@firefly> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1700744208==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NbIXH-0005wv-It for emacs-orgmode@gnu.org; Sat, 30 Jan 2010 13:59:11 -0500 Received: from [199.232.76.173] (port=38054 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbIXG-0005wm-7G for emacs-orgmode@gnu.org; Sat, 30 Jan 2010 13:59:10 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NbIXB-0007UG-GP for emacs-orgmode@gnu.org; Sat, 30 Jan 2010 13:59:09 -0500 Received: from mail-iw0-f185.google.com ([209.85.223.185]:33336) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NbIXB-0007U8-4Q for emacs-orgmode@gnu.org; Sat, 30 Jan 2010 13:59:05 -0500 Received: by iwn15 with SMTP id 15so1861494iwn.10 for ; Sat, 30 Jan 2010 10:59:04 -0800 (PST) In-Reply-To: <1264877285.31673.95.camel@firefly> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: grayarea@reddagger.org Cc: emacs-orgmode@gnu.org --===============1700744208== Content-Type: multipart/alternative; boundary=001485eaffaa8b8d1a047e665837 --001485eaffaa8b8d1a047e665837 Content-Type: text/plain; charset=ISO-8859-1 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 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 > --001485eaffaa8b8d1a047e665837 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable All you need to do is define a function that supplies the prefix to org-tim= e-stamp:

(defun org-time-stamp-with-time (&optional inactive)=A0 "Prompt for a date/time and insert a time stamp containing a
=A0 date and time. All parts of a date not specified by the user
=A0 wil= l be filled in from the current date/time. So if you press
=A0 just retu= rn without typing anything, the time stamp will
=A0 represent the curren= t date/time. If there is already a
=A0 timestamp at the cursor, it will be modified."
=A0 (interactive= )
=A0 (org-time-stamp t inactive))

Then bind that you a key.
<= br>
On Sat, Jan 30, 2010 at 10:48 AM, John Wither= s <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<= br> 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

--001485eaffaa8b8d1a047e665837-- --===============1700744208== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1700744208==--