Re: [Orgmode] Re: Bind C-u C-c C-x C-i to a key

2010-08-13 Thread Bastien
Andreas Burtzlaff and...@gmx.net writes:

 (defun ab-org-clock-in-select ()
   (interactive)
   (org-clock-in t))

 (global-set-key (kbd f12) 'ab-org-clock-in-select)

 Maybe there's a more elegant way I don't know about..

Maybe this one:

(global-set-key (kbd f12) (lambda() (interactive) (org-clock-in t)))

-- 
 Bastien

___
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


Re: [Orgmode] Re: Bind C-u C-c C-x C-i to a key

2010-08-13 Thread Bastien
Bastien bastien.gue...@wikimedia.fr writes:

 (global-set-key (kbd f12) (lambda() (interactive) (org-clock-in t)))

Forget this one -- Memnon Anon's solution is right.

Sorry for the noise...

-- 
 Bastien

___
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


[Orgmode] Re: Bind C-u C-c C-x C-i to a key

2010-08-12 Thread Andreas Burtzlaff
Markus Heller helle...@gmail.com writes:

 Hello all,

 I'd like to bind `C-u C-c C-x C-i' to the f10 key in emacs 23.

 I guess the line in my .emacs has to look like

 (global-set-key (kbd f10) 'org-XXX-XXX)

 but what exactly would org-XXX-XXX be?

 I apologize if this is a question with an obvious answer ...

The C-u says that the function that is bound to the rest of the key
combination is called with the first argument being `t'.

To get information about the function bound to a key combination use:
C-h k 
and then press the key combination (without the C-u prefix).
In this case it is org-clock-in.

This should bind org-clock-in with argument `t' to F12:

(defun ab-org-clock-in-select ()
  (interactive)
  (org-clock-in t))

(global-set-key (kbd f12) 'ab-org-clock-in-select)

Maybe there's a more elegant way I don't know about..

HTH

Andreas

 Thanks and Cheers
 Markus


 ___
 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

___
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