From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH v3 01/11] org-taskjuggler.el: Make task and resource properties customizable Date: Thu, 16 Aug 2012 21:01:59 +0200 Message-ID: <1345143729-72705-2-git-send-email-yann.hodique@gmail.com> References: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> <1345143729-72705-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T25L7-0006SH-4o for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T25L3-0001oA-Lk for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:41 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:53620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T25L3-0001nq-Fr for emacs-orgmode@gnu.org; Thu, 16 Aug 2012 15:02:37 -0400 Received: by mail-wg0-f49.google.com with SMTP id ez12so2171108wgb.30 for ; Thu, 16 Aug 2012 12:02:37 -0700 (PDT) In-Reply-To: <1345143729-72705-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): Add new option. (org-export-taskjuggler-valid-resource-attributes): Add new custom option. --- 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