From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH 01/10] org-taskjuggler: make task and resource properties customizable Date: Sun, 5 Aug 2012 12:53:55 +0200 Message-ID: <1344164044-15059-2-git-send-email-yann.hodique@gmail.com> References: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxyUI-0001Uu-6M for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxyUC-0000wx-SI for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:10 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:58921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxyUC-0000uY-F9 for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 06:55:04 -0400 Received: by wibhm11 with SMTP id hm11so641660wib.12 for ; Sun, 05 Aug 2012 03:55:03 -0700 (PDT) In-Reply-To: <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 | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 4409013..3c56630 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -240,6 +240,23 @@ 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) + "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 +631,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 +672,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.3