From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: [PATCH] Fix an error in org-taskjuggler-get-unique-id Date: Tue, 19 Oct 2010 09:17:16 +0200 Message-ID: <871v7modmr.fsf@saadawi.sbszh.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=50493 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8Sy7-0007yH-1T for emacs-orgmode@gnu.org; Wed, 20 Oct 2010 03:20:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8Sy1-0006xW-Rp for emacs-orgmode@gnu.org; Wed, 20 Oct 2010 03:20:14 -0400 Received: from lo.gmane.org ([80.91.229.12]:50863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8Sy1-0006xF-Kt for emacs-orgmode@gnu.org; Wed, 20 Oct 2010 03:20:09 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P8Sxv-0008Bc-Kh for emacs-orgmode@gnu.org; Wed, 20 Oct 2010 09:20:03 +0200 Received: from gateway01.sbszh.ch ([217.162.18.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Oct 2010 09:20:03 +0200 Received: from christian.egli by gateway01.sbszh.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Oct 2010 09:20:03 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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