From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gaizka Villate Subject: [PATCH] Add 2 customizations to org-annotation-helper: template-shortcut, auto-finalize-remember Date: Thu, 20 Aug 2009 16:33:42 +0200 Message-ID: <20090820143342.GG11071@gaizka-desktop> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="JP+T4n/bALQSJXh8" Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Me8iE-0001dc-Lr for emacs-orgmode@gnu.org; Thu, 20 Aug 2009 10:33:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Me8i9-0001Xl-NC for emacs-orgmode@gnu.org; Thu, 20 Aug 2009 10:33:58 -0400 Received: from [199.232.76.173] (port=56604 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Me8i9-0001Xi-J8 for emacs-orgmode@gnu.org; Thu, 20 Aug 2009 10:33:53 -0400 Received: from mail-fx0-f226.google.com ([209.85.220.226]:63456) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Me8i8-00005V-UE for emacs-orgmode@gnu.org; Thu, 20 Aug 2009 10:33:53 -0400 Received: by fxm26 with SMTP id 26so4263569fxm.42 for ; Thu, 20 Aug 2009 07:33:50 -0700 (PDT) Content-Disposition: inline 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: emacs-orgmode@gnu.org --JP+T4n/bALQSJXh8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi there! I have added a couple of customization variables to org-annotation-helper: Add 2 customizations to org-annotation-helper: template-shortcut, auto-finalize-remember - org-annotation-helper-template-shortcut : So you can choose which shortcut to use with org-annotation (I already use ?w for "work" template) - org-annotation-helper-auto-finalize-remember: Set to true if you want org-annotation-helper to call org-remember-finalize after filling the template. Maybe somebody is interested in applying the patch. ¡¡Thanks for org-mode!! ¡¡It's awesome!! -- Gaizka --JP+T4n/bALQSJXh8 Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Add-2-customizations-to-org-annotation-helper-templ.patch" >From 072fdb4c5377b9c0151963f24095bb2949b3be64 Mon Sep 17 00:00:00 2001 From: Gaizka Villate Date: Thu, 20 Aug 2009 16:28:09 +0200 Subject: [PATCH] Add 2 customizations to org-annotation-helper: template-shortcut, auto-finalize-remember - org-annotation-helper-template-shortcut : So you can choose which shortcut to use with org-annotation (I already use ?w for "work" template) - org-annotation-helper-auto-finalize-remember: Set to true if you want org-annotation-helper to call org-remember-finalize after filling the template. --- contrib/lisp/org-annotation-helper.el | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/org-annotation-helper.el b/contrib/lisp/org-annotation-helper.el index c90233f..e71ba2e 100644 --- a/contrib/lisp/org-annotation-helper.el +++ b/contrib/lisp/org-annotation-helper.el @@ -265,6 +265,23 @@ (autoload 'url-unhex-string "url") +(defgroup org-annotation nil + "Org annotation helper customization." + :tag "Org Annotation" + :group 'org) + +(defcustom org-annotation-helper-template-shortcut ?w + "Character shortcut for the remember template you want to use." + :group 'org-annotation + :type 'character) + +(defcustom org-annotation-helper-auto-finalize-remember nil + "Set to true if you want org-annotation-helper to call org-remember-finalize + after filling the template. + I use it that way, so I can create tasks automatically without human interaction" + :group 'org-annotation + :type 'boolean) + (defun bzg/org-annotation-helper (info) "Process an externally passed remember:// style url. @@ -307,8 +324,10 @@ annotation:// squirrel away a link of the form [[url][title]] that can (set-mark (point)) (insert region) (exchange-point-and-mark t) ;; activate region.. not always on by default - (org-remember nil ?w) - (kill-buffer b) + (org-remember nil org-annotation-helper-template-shortcut) + (kill-buffer b) + (if org-annotation-helper-auto-finalize-remember + (org-remember-finalize)) ) ((equal proto "annotation") (message "Copied '%s' to the kill-ring." orglink) -- 1.6.1.3 --JP+T4n/bALQSJXh8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --JP+T4n/bALQSJXh8--