From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: How to setup this custom function with Org-mode functions? (org-habit) Date: Sat, 26 Jul 2014 16:23:18 +0800 Message-ID: <87silobkax.fsf@gmail.com> References: <87siq2rbjf.fsf@gmail.com> <20140329161359.021e44aa@aga-netbook> 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]:40014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAxIl-0001mp-Kv for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 04:26:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAxIh-0001eH-ET for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 04:25:59 -0400 Received: from [183.249.158.139] (port=1468 helo=dark) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAxIg-0001cG-NF for emacs-orgmode@gnu.org; Sat, 26 Jul 2014 04:25:55 -0400 In-reply-to: <20140329161359.021e44aa@aga-netbook> 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: Marcin Borkowski Cc: emacs-orgmode@gnu.org This is what I want, thanks very much. Marcin Borkowski writes: > 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,