emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix an error in org-taskjuggler-get-unique-id
@ 2010-10-19  7:17 Christian Egli
  2010-10-20 12:07 ` [Accepted] " Bastien Guerry
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Egli @ 2010-10-19  7:17 UTC (permalink / raw)
  To: emacs-orgmode


Don't try to pop from an empty list and downcase the result
---
 lisp/org-taskjuggler.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 23f4b62..6367b7a 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -503,7 +503,7 @@ finally add more underscore characters (\"_\")."
 	 (parts (split-string headline))
 	 (id (org-taskjuggler-clean-id (downcase (pop parts)))))
     ; try to add more parts of the headline to make it unique
-    (while (member id unique-ids)
+    (while (and (member id unique-ids) (car parts))
       (setq id (concat id "_" (org-taskjuggler-clean-id (downcase (pop parts))))))
     ; if its still not unique add "_"
     (while (member id unique-ids)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-20 12:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19  7:17 [PATCH] Fix an error in org-taskjuggler-get-unique-id Christian Egli
2010-10-20 12:07 ` [Accepted] " Bastien Guerry

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).