From f33787b7a8c6097cbcaab212b43a3156e2724c15 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 2 Mar 2009 21:52:00 +0100 Subject: [PATCH] Archiving: Fix new bug with archiving when heading is not given. Reported by Ed Hirgelt. --- lisp/ChangeLog | 3 +++ lisp/org.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 464cde498..d889a2a2d 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-03-02 Carsten Dominik + * org.el (org-get-valid-level): Catch the case where the level + change is nil. + * org-clock.el (org-clock-find-position): Better indentation of new clock drawers. diff --git a/lisp/org.el b/lisp/org.el index cb5ded436..c9d4efea2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5358,7 +5358,7 @@ even level numbers will become the next higher odd number." (cond ((or (not change) (= 0 change)) (1+ (* 2 (/ level 2)))) ((> change 0) (1+ (* 2 (/ (+ level (* 2 change)) 2)))) ((< change 0) (max 1 (1+ (* 2 (/ (+ level (* 2 change)) 2)))))) - (max 1 (+ level change)))) + (max 1 (+ level (or change 0))))) (if (boundp 'define-obsolete-function-alias) (if (or (featurep 'xemacs) (< emacs-major-version 23))