From b237d4df041daf821a27dc5d0be40e09a4f51428 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 19 Jun 2016 14:11:20 -0400 Subject: [PATCH 1/2] org-set-effort: Remove extra space in prompt * lisp/org.el (org-set-effort): Make spacing across different prompt cases consistent. Simplify prompt concatenation. --- lisp/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 2508ceee6..8ab667a60 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15701,8 +15701,8 @@ When INCREMENT is non-nil, set the property to the next allowed value." (t (let (org-completion-use-ido org-completion-use-iswitchb) (org-completing-read - (concat "Effort " (if (and cur (string-match "\\S-" cur)) - (concat "[" cur "]") "") + (concat "Effort" (and cur (string-match "\\S-" cur) + (concat " [" cur "]")) ": ") existing nil nil "" nil cur)))))) (unless (equal (org-entry-get nil prop) val) From 792bb9b65504a70f3678409bba1a1c144b794a9d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 19 Jun 2016 14:11:25 -0400 Subject: [PATCH 2/2] org-set-effort: Fix void variable error * lisp/org.el (org-set-effort): Check if org-clock-current-task is defined because org-clock.el may not be loaded yet. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 8ab667a60..0865bbb89 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15711,7 +15711,7 @@ When INCREMENT is non-nil, set the property to the next allowed value." '((effort . identity) (effort-minutes . org-duration-string-to-minutes)) val) - (when (string= heading org-clock-current-task) + (when (string= heading (org-bound-and-true-p org-clock-current-task)) (setq org-clock-effort (get-text-property (point-at-bol) 'effort)) (org-clock-update-mode-line)) (message "%s is now %s" prop val)))