From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: How to setup this custom function with Org-mode functions? (org-habit) Date: Sat, 29 Mar 2014 16:13:59 +0100 Message-ID: <20140329161359.021e44aa@aga-netbook> References: <87siq2rbjf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTuxT-0004T0-B9 for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 11:14:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTuxO-0006av-U6 for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 11:14:07 -0400 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:58124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTuxO-0006aj-N8 for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 11:14:02 -0400 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id E06E642076 for ; Sat, 29 Mar 2014 16:14:00 +0100 (CET) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C1Kkf0RM5iM0 for ; Sat, 29 Mar 2014 16:14:00 +0100 (CET) Received: from aga-netbook (99-234.echostar.pl [213.156.99.234]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id B5B2C42072 for ; Sat, 29 Mar 2014 16:14:00 +0100 (CET) In-Reply-To: <87siq2rbjf.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Dnia 2014-03-28, o godz. 16:09:01 stardiviner napisa=C5=82(a): >=20 > I want to create a custom keybinding to custom function which will > execute all necessary steps for creating an org habit. > The bellowing is my code, but seems it doesn't work at all. > I don't know how to write this custom function actually. (I just put > some keybindings corresponding functions in the custom function > body.) And some org-mode functions are interactively. >=20 > #+BEGIN_SRC emacs-lisp > ;; TODO: create an key binding for all necessary steps for create a > habit. (reference in Org-mode.org file) (defun org-habit-apply () > "Apply org-habit on this task." > (interactive) > (lambda () > (org-todo "HABIT") > (org-insert-property-drawer) ; TODO: :STYLE: habit (value) > (org-schedule))) >=20 > (define-key org-mode-map (kbd "C-c C-x h") 'org-habit-apply) > #+END_SRC >=20 > Does anybody can help me this? and thanks in advance. Is this of any help? http://mbork.pl/2013-09-23_Automatic_insertion_of_habit_templates_%28en%29 Hth, --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University