From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH v2 01/11] org-taskjuggler: make task and resource properties customizable Date: Wed, 15 Aug 2012 21:11:46 +0200 Message-ID: <1345057917-69300-2-git-send-email-yann.hodique@gmail.com> References: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j0p-0004BH-58 for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1j0o-0002WT-4E for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:15 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:64351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j0n-0002WH-Tj for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:14 -0400 Received: by wibhq4 with SMTP id hq4so4695497wib.12 for ; Wed, 15 Aug 2012 12:12:13 -0700 (PDT) In-Reply-To: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> In-Reply-To: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> References: <1344164044-15059-1-git-send-email-yann.hodique@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 Cc: Yann Hodique * org-taskjuggler.el (org-export-taskjuggler-valid-task-attributes): new custom variable (org-export-taskjuggler-valid-resource-attributes): new custom variable --- lisp/org-taskjuggler.el | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index aa645d2..7d9d203 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -240,6 +240,24 @@ but before any resource and task declarations." :version "24.1" :type '(string :tag "Preamble")) +(defcustom org-export-taskjuggler-valid-task-attributes + '(account start note duration endbuffer endcredit end + flags journalentry length limits maxend maxstart minend + minstart period reference responsible scheduling + startbuffer startcredit statusnote) + "Valid attributes for Taskjuggler tasks. If one of these + appears as a property for a headline, it will be exported with + the corresponding task." + :group 'org-export-taskjuggler) + +(defcustom org-export-taskjuggler-valid-resource-attributes + '(limits vacation shift booking efficiency journalentry rate + workinghours flags) + "Valid attributes for Taskjuggler resources. If one of these + appears as a property for a headline, it will be exported with + the corresponding resource." + :group 'org-export-taskjuggler) + ;;; Hooks (defvar org-export-taskjuggler-final-hook nil @@ -614,7 +632,7 @@ is defined it will calculate a unique id for the resource using (cdr (assoc "ID" resource)) (cdr (assoc "unique-id" resource))))) (headline (cdr (assoc "headline" resource))) - (attributes '(limits vacation shift booking efficiency journalentry rate))) + (attributes org-export-taskjuggler-valid-resource-attributes)) (insert (concat "resource " id " \"" headline "\" {\n " @@ -655,11 +673,7 @@ org-mode priority string." (cdr (assoc "duration" task)) (cdr (assoc "end" task)) (cdr (assoc "period" task))))))) - (attributes - '(account start note duration endbuffer endcredit end - flags journalentry length maxend maxstart minend - minstart period reference responsible scheduling - startbuffer startcredit statusnote))) + (attributes org-export-taskjuggler-valid-task-attributes)) (insert (concat "task " unique-id " \"" headline "\" {\n" -- 1.7.11.4