help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling function as if it had a C-u prefix


From: Tory S. Anderson
Subject: Calling function as if it had a C-u prefix
Date: Fri, 27 Feb 2015 16:24:41 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

I'm playing around with hydra and am trying to bind a key to do the equivalent 
of `C-u org-clock-in`. I've tried following a related question on SO[1] but it 
doesn't seem to be working. Can anyone tell me where I'm off? 

--8<---------------cut here---------------start------------->8---
(global-set-key
 (kbd "C-c o")
 (defhydra hydra-org-time-management (:color blue)
   "Org"
   ("w" (let ((current-prefix-arg 4)) (org-clock-in)) "clock-in")))
--8<---------------cut here---------------end--------------->8---

Footnotes: 
[1] 
http://stackoverflow.com/questions/12827887/emacs-universal-argument-c-u-in-a-function




reply via email to

[Prev in Thread] Current Thread [Next in Thread]