Browse Source

Whitespaces clean up.

Bastien Guerry 14 years ago
parent
commit
16a1897fd9
1 changed files with 61 additions and 61 deletions
  1. 61 61
      lisp/org-taskjuggler.el

+ 61 - 61
lisp/org-taskjuggler.el

@@ -74,7 +74,7 @@
 ;; TaskJugglerUI.
 ;; TaskJugglerUI.
 ;;
 ;;
 ;; * Resources
 ;; * Resources
-;; 
+;;
 ;; Next you can define resources and assign those to work on specific
 ;; Next you can define resources and assign those to work on specific
 ;; tasks. You can group your resources hierarchically. Tag the top
 ;; tasks. You can group your resources hierarchically. Tag the top
 ;; node of the resources with "taskjuggler_resource" (or whatever you
 ;; node of the resources with "taskjuggler_resource" (or whatever you
@@ -107,7 +107,7 @@
 ;; etc for tasks.
 ;; etc for tasks.
 ;;
 ;;
 ;; * Dependencies
 ;; * Dependencies
-;; 
+;;
 ;; The exporter will handle dependencies that are defined in the tasks
 ;; The exporter will handle dependencies that are defined in the tasks
 ;; either with the ORDERED attribute (see TODO dependencies in the Org
 ;; either with the ORDERED attribute (see TODO dependencies in the Org
 ;; mode manual) or with the BLOCKER attribute (see org-depend.el) or
 ;; mode manual) or with the BLOCKER attribute (see org-depend.el) or
@@ -137,7 +137,7 @@
 ;;   :Effort:   2.0
 ;;   :Effort:   2.0
 ;;   :BLOCKER:  training_material { gapduration 1d } some_other_task
 ;;   :BLOCKER:  training_material { gapduration 1d } some_other_task
 ;;   :END:
 ;;   :END:
-;; 
+;;
 ;;;; * TODO
 ;;;; * TODO
 ;;   - Use SCHEDULED and DEADLINE information (not just start and end
 ;;   - Use SCHEDULED and DEADLINE information (not just start and end
 ;;     properties).
 ;;     properties).
@@ -198,7 +198,7 @@ with `org-export-taskjuggler-project-tag'"
   :group 'org-export-taskjuggler
   :group 'org-export-taskjuggler
   :type 'integer)
   :type 'integer)
 
 
-(defcustom org-export-taskjuggler-default-reports 
+(defcustom org-export-taskjuggler-default-reports
   '("taskreport \"Gantt Chart\" {
   '("taskreport \"Gantt Chart\" {
   headline \"Project Gantt Chart\"
   headline \"Project Gantt Chart\"
   columns hierarchindex, name, start, end, effort, duration, completed, chart
   columns hierarchindex, name, start, end, effort, duration, completed, chart
@@ -217,7 +217,7 @@ with `org-export-taskjuggler-project-tag'"
   :group 'org-export-taskjuggler
   :group 'org-export-taskjuggler
   :type '(repeat (string :tag "Report")))
   :type '(repeat (string :tag "Report")))
 
 
-(defcustom org-export-taskjuggler-default-global-properties 
+(defcustom org-export-taskjuggler-default-global-properties
   "shift s40 \"Part time shift\" {
   "shift s40 \"Part time shift\" {
   workinghours wed, thu, fri off
   workinghours wed, thu, fri off
 }
 }
@@ -226,7 +226,7 @@ with `org-export-taskjuggler-project-tag'"
 define global properties such as shifts, accounts, rates,
 define global properties such as shifts, accounts, rates,
 vacation, macros and flags. Any property that is allowed within
 vacation, macros and flags. Any property that is allowed within
 the TaskJuggler file can be inserted. You could for example
 the TaskJuggler file can be inserted. You could for example
-include another TaskJuggler file. 
+include another TaskJuggler file.
 
 
 The global properties are inserted after the project declaration
 The global properties are inserted after the project declaration
 but before any resource and task declarations."
 but before any resource and task declarations."
@@ -262,15 +262,15 @@ defined in `org-export-taskjuggler-default-reports'."
   (setq-default org-done-keywords org-done-keywords)
   (setq-default org-done-keywords org-done-keywords)
   (let* ((tasks
   (let* ((tasks
 	  (org-taskjuggler-resolve-dependencies
 	  (org-taskjuggler-resolve-dependencies
-	   (org-taskjuggler-assign-task-ids 
+	   (org-taskjuggler-assign-task-ids
 	    (org-taskjuggler-compute-task-leafiness
 	    (org-taskjuggler-compute-task-leafiness
-	     (org-map-entries 
-	      '(org-taskjuggler-components) 
+	     (org-map-entries
+	      '(org-taskjuggler-components)
 	      org-export-taskjuggler-project-tag nil 'archive 'comment)))))
 	      org-export-taskjuggler-project-tag nil 'archive 'comment)))))
 	 (resources
 	 (resources
 	  (org-taskjuggler-assign-resource-ids
 	  (org-taskjuggler-assign-resource-ids
-	   (org-map-entries 
-	    '(org-taskjuggler-components) 
+	   (org-map-entries
+	    '(org-taskjuggler-components)
 	    org-export-taskjuggler-resource-tag nil 'archive 'comment)))
 	    org-export-taskjuggler-resource-tag nil 'archive 'comment)))
 	 (filename (expand-file-name
 	 (filename (expand-file-name
 		    (concat
 		    (concat
@@ -284,9 +284,9 @@ defined in `org-export-taskjuggler-default-reports'."
       (error "No tasks specified"))
       (error "No tasks specified"))
     ;; add a default resource
     ;; add a default resource
     (unless resources
     (unless resources
-      (setq resources 
-	    `((("resource_id" . ,(user-login-name)) 
-	       ("headline" . ,user-full-name) 
+      (setq resources
+	    `((("resource_id" . ,(user-login-name))
+	       ("headline" . ,user-full-name)
 	       ("level" . 1)))))
 	       ("level" . 1)))))
     ;; add a default allocation to the first task if none was given
     ;; add a default allocation to the first task if none was given
     (unless (assoc "allocate" (car tasks))
     (unless (assoc "allocate" (car tasks))
@@ -372,16 +372,16 @@ a path to the current task."
     (dolist (task tasks resolved-tasks)
     (dolist (task tasks resolved-tasks)
       (let ((level (cdr (assoc "level" task))))
       (let ((level (cdr (assoc "level" task))))
 	(cond
 	(cond
-	 ((< previous-level level) 
+	 ((< previous-level level)
 	  (setq unique-id (org-taskjuggler-get-unique-id task (car unique-ids)))
 	  (setq unique-id (org-taskjuggler-get-unique-id task (car unique-ids)))
 	  (dotimes (tmp (- level previous-level))
 	  (dotimes (tmp (- level previous-level))
 	    (push (list unique-id) unique-ids)
 	    (push (list unique-id) unique-ids)
 	    (push unique-id path)))
 	    (push unique-id path)))
-	 ((= previous-level level) 
+	 ((= previous-level level)
 	  (setq unique-id (org-taskjuggler-get-unique-id task (car unique-ids)))
 	  (setq unique-id (org-taskjuggler-get-unique-id task (car unique-ids)))
 	  (push unique-id (car unique-ids))
 	  (push unique-id (car unique-ids))
 	  (setcar path unique-id))
 	  (setcar path unique-id))
-	 ((> previous-level level) 
+	 ((> previous-level level)
 	  (dotimes (tmp (- previous-level level))
 	  (dotimes (tmp (- previous-level level))
 	    (pop unique-ids)
 	    (pop unique-ids)
 	    (pop path))
 	    (pop path))
@@ -401,11 +401,11 @@ deeper), then it's not a leaf."
    ((null tasks) nil)
    ((null tasks) nil)
    ;; if a task has no successors it is a leaf
    ;; if a task has no successors it is a leaf
    ((null (car (cdr tasks)))
    ((null (car (cdr tasks)))
-    (cons (cons (cons "leaf-node" t) (car tasks)) 
+    (cons (cons (cons "leaf-node" t) (car tasks))
 	  (org-taskjuggler-compute-task-leafiness (cdr tasks))))
 	  (org-taskjuggler-compute-task-leafiness (cdr tasks))))
    ;; if the successor has a lower level than task it is a leaf
    ;; if the successor has a lower level than task it is a leaf
-   ((<= (cdr (assoc "level" (car (cdr tasks)))) (cdr (assoc "level" (car tasks)))) 
-    (cons (cons (cons "leaf-node" t) (car tasks)) 
+   ((<= (cdr (assoc "level" (car (cdr tasks)))) (cdr (assoc "level" (car tasks))))
+    (cons (cons (cons "leaf-node" t) (car tasks))
 	  (org-taskjuggler-compute-task-leafiness (cdr tasks))))
 	  (org-taskjuggler-compute-task-leafiness (cdr tasks))))
    ;; otherwise examine the rest of the tasks
    ;; otherwise examine the rest of the tasks
    (t (cons (car tasks) (org-taskjuggler-compute-task-leafiness (cdr tasks))))))
    (t (cons (car tasks) (org-taskjuggler-compute-task-leafiness (cdr tasks))))))
@@ -415,12 +415,12 @@ deeper), then it's not a leaf."
 unique id to each resource."
 unique id to each resource."
   (cond
   (cond
    ((null resources) nil)
    ((null resources) nil)
-   (t 
+   (t
     (let* ((resource (car resources))
     (let* ((resource (car resources))
 	   (unique-id (org-taskjuggler-get-unique-id resource unique-ids)))
 	   (unique-id (org-taskjuggler-get-unique-id resource unique-ids)))
       (push (cons "unique-id" unique-id) resource)
       (push (cons "unique-id" unique-id) resource)
-      (cons resource 
-	    (org-taskjuggler-assign-resource-ids (cdr resources) 
+      (cons resource
+	    (org-taskjuggler-assign-resource-ids (cdr resources)
 						 (cons unique-id unique-ids)))))))
 						 (cons unique-id unique-ids)))))))
 
 
 (defun org-taskjuggler-resolve-dependencies (tasks)
 (defun org-taskjuggler-resolve-dependencies (tasks)
@@ -432,24 +432,24 @@ unique id to each resource."
 	     (depends (cdr (assoc "depends" task)))
 	     (depends (cdr (assoc "depends" task)))
 	     (parent-ordered (cdr (assoc "parent-ordered" task)))
 	     (parent-ordered (cdr (assoc "parent-ordered" task)))
 	     (blocker (cdr (assoc "BLOCKER" task)))
 	     (blocker (cdr (assoc "BLOCKER" task)))
-	     (blocked-on-previous 
+	     (blocked-on-previous
 	      (and blocker (string-match "previous-sibling" blocker)))
 	      (and blocker (string-match "previous-sibling" blocker)))
 	     (dependencies
 	     (dependencies
 	      (org-taskjuggler-resolve-explicit-dependencies
 	      (org-taskjuggler-resolve-explicit-dependencies
-	       (append 
+	       (append
 		(and depends (org-taskjuggler-tokenize-dependencies depends))
 		(and depends (org-taskjuggler-tokenize-dependencies depends))
-		(and blocker (org-taskjuggler-tokenize-dependencies blocker))) 
+		(and blocker (org-taskjuggler-tokenize-dependencies blocker)))
 	       tasks))
 	       tasks))
 	      previous-sibling)
 	      previous-sibling)
 	; update previous sibling info
 	; update previous sibling info
 	(cond
 	(cond
-	 ((< previous-level level) 
+	 ((< previous-level level)
 	  (dotimes (tmp (- level previous-level))
 	  (dotimes (tmp (- level previous-level))
 	    (push task siblings)))
 	    (push task siblings)))
 	 ((= previous-level level)
 	 ((= previous-level level)
 	  (setq previous-sibling (car siblings))
 	  (setq previous-sibling (car siblings))
 	  (setcar siblings task))
 	  (setcar siblings task))
-	 ((> previous-level level) 
+	 ((> previous-level level)
 	  (dotimes (tmp (- previous-level level))
 	  (dotimes (tmp (- previous-level level))
 	    (pop siblings))
 	    (pop siblings))
 	  (setq previous-sibling (car siblings))
 	  (setq previous-sibling (car siblings))
@@ -459,7 +459,7 @@ unique id to each resource."
 	(when (or (and previous-sibling parent-ordered) blocked-on-previous)
 	(when (or (and previous-sibling parent-ordered) blocked-on-previous)
 	  (push (format "!%s" (cdr (assoc "unique-id" previous-sibling))) dependencies))
 	  (push (format "!%s" (cdr (assoc "unique-id" previous-sibling))) dependencies))
 	; store dependency information
 	; store dependency information
-	(when dependencies 
+	(when dependencies
 	  (push (cons "depends" (mapconcat 'identity dependencies ", ")) task))
 	  (push (cons "depends" (mapconcat 'identity dependencies ", ")) task))
 	(setq previous-level level)
 	(setq previous-level level)
 	(setq resolved-tasks (append resolved-tasks (list task)))))))
 	(setq resolved-tasks (append resolved-tasks (list task)))))))
@@ -469,10 +469,10 @@ unique id to each resource."
 individual dependencies and return them as a list while keeping
 individual dependencies and return them as a list while keeping
 the optional arguments (such as gapduration) for the
 the optional arguments (such as gapduration) for the
 dependencies. A dependency will have to match `[-a-zA-Z0-9_]+'."
 dependencies. A dependency will have to match `[-a-zA-Z0-9_]+'."
-  (cond 
+  (cond
    ((string-match "^ *$" dependencies) nil)
    ((string-match "^ *$" dependencies) nil)
    ((string-match "^[ \t]*\\([-a-zA-Z0-9_]+\\([ \t]*{[^}]+}\\)?\\)[ \t,]*" dependencies)
    ((string-match "^[ \t]*\\([-a-zA-Z0-9_]+\\([ \t]*{[^}]+}\\)?\\)[ \t,]*" dependencies)
-    (cons 
+    (cons
      (substring dependencies (match-beginning 1) (match-end 1))
      (substring dependencies (match-beginning 1) (match-end 1))
      (org-taskjuggler-tokenize-dependencies (substring dependencies (match-end 0)))))
      (org-taskjuggler-tokenize-dependencies (substring dependencies (match-end 0)))))
    (t (error (format "invalid dependency id %s" dependencies)))))
    (t (error (format "invalid dependency id %s" dependencies)))))
@@ -486,27 +486,27 @@ where a matching tasks was found. If the dependency is
 `org-taskjuggler-resolve-dependencies'). If there is no matching
 `org-taskjuggler-resolve-dependencies'). If there is no matching
 task the dependency is ignored and a warning is displayed ."
 task the dependency is ignored and a warning is displayed ."
   (unless (null dependencies)
   (unless (null dependencies)
-    (let* 
+    (let*
 	;; the dependency might have optional attributes such as "{
 	;; the dependency might have optional attributes such as "{
 	;; gapduration 5d }", so only use the first string as id for the
 	;; gapduration 5d }", so only use the first string as id for the
 	;; dependency
 	;; dependency
 	((dependency (car dependencies))
 	((dependency (car dependencies))
 	 (id (car (split-string dependency)))
 	 (id (car (split-string dependency)))
-	 (optional-attributes 
+	 (optional-attributes
 	  (mapconcat 'identity (cdr (split-string dependency)) " "))
 	  (mapconcat 'identity (cdr (split-string dependency)) " "))
 	 (path (org-taskjuggler-find-task-with-id id tasks)))
 	 (path (org-taskjuggler-find-task-with-id id tasks)))
-      (cond 
+      (cond
        ;; ignore previous sibling dependencies
        ;; ignore previous sibling dependencies
        ((equal (car dependencies) "previous-sibling")
        ((equal (car dependencies) "previous-sibling")
 	(org-taskjuggler-resolve-explicit-dependencies (cdr dependencies) tasks))
 	(org-taskjuggler-resolve-explicit-dependencies (cdr dependencies) tasks))
        ;; if the id is found in another task use its path
        ;; if the id is found in another task use its path
-       ((not (null path)) 
+       ((not (null path))
 	(cons (mapconcat 'identity (list path optional-attributes) " ")
 	(cons (mapconcat 'identity (list path optional-attributes) " ")
-	      (org-taskjuggler-resolve-explicit-dependencies 
+	      (org-taskjuggler-resolve-explicit-dependencies
 	       (cdr dependencies) tasks)))
 	       (cdr dependencies) tasks)))
        ;; warn about dangling dependency but otherwise ignore it
        ;; warn about dangling dependency but otherwise ignore it
-       (t (display-warning 
-	   'org-export-taskjuggler 
+       (t (display-warning
+	   'org-export-taskjuggler
 	   (format "No task with matching property \"task_id\" found for id %s" id))
 	   (format "No task with matching property \"task_id\" found for id %s" id))
 	  (org-taskjuggler-resolve-explicit-dependencies (cdr dependencies) tasks))))))
 	  (org-taskjuggler-resolve-explicit-dependencies (cdr dependencies) tasks))))))
 
 
@@ -515,7 +515,7 @@ task the dependency is ignored and a warning is displayed ."
 return nil."
 return nil."
   (let ((task-id (cdr (assoc "task_id" (car tasks))))
   (let ((task-id (cdr (assoc "task_id" (car tasks))))
 	(path (cdr (assoc "path" (car tasks)))))
 	(path (cdr (assoc "path" (car tasks)))))
-    (cond 
+    (cond
      ((null tasks) nil)
      ((null tasks) nil)
      ((equal task-id id) path)
      ((equal task-id id) path)
      (t (org-taskjuggler-find-task-with-id id (cdr tasks))))))
      (t (org-taskjuggler-find-task-with-id id (cdr tasks))))))
@@ -536,7 +536,7 @@ finally add more underscore characters (\"_\")."
     (while (member id unique-ids)
     (while (member id unique-ids)
       (setq id (concat id "_")))
       (setq id (concat id "_")))
     id))
     id))
-	
+
 (defun org-taskjuggler-clean-id (id)
 (defun org-taskjuggler-clean-id (id)
   "Clean and return ID to make it acceptable for taskjuggler."
   "Clean and return ID to make it acceptable for taskjuggler."
   (and id (replace-regexp-in-string "[^a-zA-Z0-9_]" "_" id)))
   (and id (replace-regexp-in-string "[^a-zA-Z0-9_]" "_" id)))
@@ -551,7 +551,7 @@ specified it is calculated
 	(version (cdr (assoc "version" project)))
 	(version (cdr (assoc "version" project)))
 	(start (cdr (assoc "start" project)))
 	(start (cdr (assoc "start" project)))
 	(end (cdr (assoc "end" project))))
 	(end (cdr (assoc "end" project))))
-    (insert 
+    (insert
      (format "project %s \"%s\" \"%s\" %s +%sd {\n }\n"
      (format "project %s \"%s\" \"%s\" %s +%sd {\n }\n"
 	     unique-id headline version start
 	     unique-id headline version start
 	     org-export-taskjuggler-default-project-duration))))
 	     org-export-taskjuggler-default-project-duration))))
@@ -561,16 +561,16 @@ specified it is calculated
 with separator \"\n\"."
 with separator \"\n\"."
   (let ((filtered-items (remq nil items)))
   (let ((filtered-items (remq nil items)))
     (and filtered-items (mapconcat 'identity filtered-items "\n"))))
     (and filtered-items (mapconcat 'identity filtered-items "\n"))))
-  
+
 (defun org-taskjuggler-get-attributes (item attributes)
 (defun org-taskjuggler-get-attributes (item attributes)
   "Return all attribute as a single formated string. ITEM is an
   "Return all attribute as a single formated string. ITEM is an
 alist representing either a resource or a task. ATTRIBUTES is a
 alist representing either a resource or a task. ATTRIBUTES is a
 list of symbols. Only entries from ITEM are considered that are
 list of symbols. Only entries from ITEM are considered that are
 listed in ATTRIBUTES."
 listed in ATTRIBUTES."
-  (org-taskjuggler-filter-and-join 
+  (org-taskjuggler-filter-and-join
    (mapcar
    (mapcar
-    (lambda (attribute) 
-      (org-taskjuggler-filter-and-join 
+    (lambda (attribute)
+      (org-taskjuggler-filter-and-join
        (org-taskjuggler-get-attribute item attribute)))
        (org-taskjuggler-get-attribute item attribute)))
     attributes)))
     attributes)))
 
 
@@ -578,7 +578,7 @@ listed in ATTRIBUTES."
   "Return a list of strings containing the properly formatted
   "Return a list of strings containing the properly formatted
 taskjuggler declaration for a given ATTRIBUTE in ITEM (an alist).
 taskjuggler declaration for a given ATTRIBUTE in ITEM (an alist).
 If the ATTRIBUTE is not in ITEM return nil."
 If the ATTRIBUTE is not in ITEM return nil."
-  (cond 
+  (cond
    ((null item) nil)
    ((null item) nil)
    ((equal (symbol-name attribute) (car (car item)))
    ((equal (symbol-name attribute) (car (car item)))
     (cons (format "%s %s" (symbol-name attribute) (cdr (car item)))
     (cons (format "%s %s" (symbol-name attribute) (cdr (car item)))
@@ -592,14 +592,14 @@ defines a property \"resource_id\" it will be used as the id for
 this resource. Otherwise it will use the ID property. If neither
 this resource. Otherwise it will use the ID property. If neither
 is defined it will calculate a unique id for the resource using
 is defined it will calculate a unique id for the resource using
 `org-taskjuggler-get-unique-id'."
 `org-taskjuggler-get-unique-id'."
-  (let ((id (org-taskjuggler-clean-id 
-	     (or (cdr (assoc "resource_id" resource)) 
-		 (cdr (assoc "ID" resource)) 
+  (let ((id (org-taskjuggler-clean-id
+	     (or (cdr (assoc "resource_id" resource))
+		 (cdr (assoc "ID" resource))
 		 (cdr (assoc "unique-id" resource)))))
 		 (cdr (assoc "unique-id" resource)))))
 	(headline (cdr (assoc "headline" resource)))
 	(headline (cdr (assoc "headline" resource)))
 	(attributes '(limits vacation shift booking efficiency journalentry rate)))
 	(attributes '(limits vacation shift booking efficiency journalentry rate)))
-    (insert 
-     (concat 
+    (insert
+     (concat
       "resource " id " \"" headline "\" {\n "
       "resource " id " \"" headline "\" {\n "
       (org-taskjuggler-get-attributes resource attributes) "\n"))))
       (org-taskjuggler-get-attributes resource attributes) "\n"))))
 
 
@@ -611,9 +611,9 @@ Otherwise if it contains something like 3.0 it is assumed to be
 days and will be translated into 3.0d. Other formats that
 days and will be translated into 3.0d. Other formats that
 taskjuggler supports (like weeks, months and years) are currently
 taskjuggler supports (like weeks, months and years) are currently
 not supported."
 not supported."
-  (cond 
+  (cond
    ((null effort) effort)
    ((null effort) effort)
-   ((string-match "\\([0-9]+\\):\\([0-9]+\\)" effort) 
+   ((string-match "\\([0-9]+\\):\\([0-9]+\\)" effort)
     (let ((hours (string-to-number (match-string 1 effort)))
     (let ((hours (string-to-number (match-string 1 effort)))
 	  (minutes (string-to-number (match-string 2 effort))))
 	  (minutes (string-to-number (match-string 2 effort))))
       (format "%dh" (+ hours (/ minutes 60.0)))))
       (format "%dh" (+ hours (/ minutes 60.0)))))
@@ -623,7 +623,7 @@ not supported."
 (defun org-taskjuggler-get-priority (priority)
 (defun org-taskjuggler-get-priority (priority)
   "Return a priority between 1 and 1000 based on PRIORITY, an
   "Return a priority between 1 and 1000 based on PRIORITY, an
 org-mode priority string."
 org-mode priority string."
-  (max 1 (/ (* 1000 (- org-lowest-priority (string-to-char priority))) 
+  (max 1 (/ (* 1000 (- org-lowest-priority (string-to-char priority)))
 	    (- org-lowest-priority org-highest-priority))))
 	    (- org-lowest-priority org-highest-priority))))
 
 
 (defun org-taskjuggler-open-task (task)
 (defun org-taskjuggler-open-task (task)
@@ -635,24 +635,24 @@ org-mode priority string."
 	(priority-raw (cdr (assoc "PRIORITY" task)))
 	(priority-raw (cdr (assoc "PRIORITY" task)))
 	(priority (and priority-raw (org-taskjuggler-get-priority priority-raw)))
 	(priority (and priority-raw (org-taskjuggler-get-priority priority-raw)))
 	(state (cdr (assoc "TODO" task)))
 	(state (cdr (assoc "TODO" task)))
-	(complete (or (and (member state org-done-keywords) "100") 
+	(complete (or (and (member state org-done-keywords) "100")
 		      (cdr (assoc "complete" task))))
 		      (cdr (assoc "complete" task))))
 	(parent-ordered (cdr (assoc "parent-ordered" task)))
 	(parent-ordered (cdr (assoc "parent-ordered" task)))
 	(previous-sibling (cdr (assoc "previous-sibling" task)))
 	(previous-sibling (cdr (assoc "previous-sibling" task)))
 	(milestone (or (cdr (assoc "milestone" task))
 	(milestone (or (cdr (assoc "milestone" task))
 		       (and (assoc "leaf-node" task)
 		       (and (assoc "leaf-node" task)
-			    (not (or effort 
+			    (not (or effort
 				     (cdr (assoc "duration" task))
 				     (cdr (assoc "duration" task))
 				     (cdr (assoc "end" task))
 				     (cdr (assoc "end" task))
 				     (cdr (assoc "period" task)))))))
 				     (cdr (assoc "period" task)))))))
-	(attributes 
+	(attributes
 	 '(account start note duration endbuffer endcredit end
 	 '(account start note duration endbuffer endcredit end
 	   flags journalentry length maxend maxstart minend
 	   flags journalentry length maxend maxstart minend
 	   minstart period reference responsible scheduling
 	   minstart period reference responsible scheduling
 	   startbuffer startcredit statusnote)))
 	   startbuffer startcredit statusnote)))
     (insert
     (insert
-     (concat 
-      "task " unique-id " \"" headline "\" {\n" 
+     (concat
+      "task " unique-id " \"" headline "\" {\n"
       (if (and parent-ordered previous-sibling)
       (if (and parent-ordered previous-sibling)
 	  (format " depends %s\n" previous-sibling)
 	  (format " depends %s\n" previous-sibling)
 	(and depends (format " depends %s\n" depends)))
 	(and depends (format " depends %s\n" depends)))
@@ -664,12 +664,12 @@ org-mode priority string."
       (and effort (format " effort %s\n" effort))
       (and effort (format " effort %s\n" effort))
       (and priority (format " priority %s\n" priority))
       (and priority (format " priority %s\n" priority))
       (and milestone (format " milestone\n"))
       (and milestone (format " milestone\n"))
-      
+
       (org-taskjuggler-get-attributes task attributes)
       (org-taskjuggler-get-attributes task attributes)
       "\n"))))
       "\n"))))
 
 
 (defun org-taskjuggler-close-maybe (level)
 (defun org-taskjuggler-close-maybe (level)
-  (while (> org-export-taskjuggler-old-level level) 
+  (while (> org-export-taskjuggler-old-level level)
     (insert "}\n")
     (insert "}\n")
     (setq org-export-taskjuggler-old-level (1- org-export-taskjuggler-old-level)))
     (setq org-export-taskjuggler-old-level (1- org-export-taskjuggler-old-level)))
   (when (= org-export-taskjuggler-old-level level)
   (when (= org-export-taskjuggler-old-level level)