emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org ee4ffa5 1/2: org-clock: fix runtime error i


From: ELPA Syncer
Subject: [elpa] externals-release/org ee4ffa5 1/2: org-clock: fix runtime error in org-clock-in
Date: Wed, 17 Feb 2021 00:57:10 -0500 (EST)

branch: externals-release/org
commit ee4ffa5672e9cd28b28e2d947993847234540327
Author: Jean-Marie Gaillourdet <jm@gaillourdet.net>
Commit: Kyle Meyer <kyle@kyleam.com>

    org-clock: fix runtime error in org-clock-in
    
    * org-clock.el (org-clock-in): Under certain configurations of org,
    Emacs doom, evil-org-mode and my custom settings, org-clock-in aborts
    with an an error because indent-line-to is called with -2.
    
    TINYCHANGE
---
 lisp/org-clock.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 2073b33..af7c0ea 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1369,7 +1369,7 @@ the default behavior."
                        (end-of-line 0)
                        (org-in-item-p)))
             (beginning-of-line 1)
-            (indent-line-to (- (current-indentation) 2)))
+            (indent-line-to (max 0 (- (current-indentation) 2))))
           (insert org-clock-string " ")
           (setq org-clock-effort (org-entry-get (point) org-effort-property))
           (setq org-clock-total-time (org-clock-sum-current-item



reply via email to

[Prev in Thread] Current Thread [Next in Thread]