From mboxrd@z Thu Jan 1 00:00:00 1970 From: vasil.s.d@gmail.com (Vasil S. Diadov) Subject: Bug: Effort is not displayed in mode line, patch attached [7.9.2 (7.9.2-181-ge8aaca-elpaplus @ /usr/local/share/emacs/24.2/lisp/org/)] Date: Mon, 21 Jan 2013 00:06:07 +0400 Message-ID: <87fw1v8vrk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tx1AN-0000pK-W2 for emacs-orgmode@gnu.org; Sun, 20 Jan 2013 15:06:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tx1AL-0000Yq-OZ for emacs-orgmode@gnu.org; Sun, 20 Jan 2013 15:06:55 -0500 Received: from mail-la0-f51.google.com ([209.85.215.51]:43642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tx1AL-0000Yc-Gk for emacs-orgmode@gnu.org; Sun, 20 Jan 2013 15:06:53 -0500 Received: by mail-la0-f51.google.com with SMTP id fj20so5493794lab.38 for ; Sun, 20 Jan 2013 12:06:52 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Efforts are not displayed in mode line due to wrong point position during fetching 'org-effort property of the text. Patch attached. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-clock.el.patch Content-Description: Patch for fixing issue with efforts diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 914f5ff..0b3d2fc 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1226,7 +1226,8 @@ make this the default behavior.)" "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" (match-string 4))) (t "???"))) - (setq org-clock-heading (org-propertize org-clock-heading + (setq org-clock-heading + (org-propertize org-clock-heading 'face nil)) (org-clock-find-position org-clock-in-resume) (cond @@ -1241,7 +1242,10 @@ make this the default behavior.)" (setq org-clock-start-time (apply 'encode-time (org-parse-time-string (match-string 1)))) - (setq org-clock-effort (get-text-property (point) 'org-effort)) + (setq org-clock-effort + (save-excursion + (org-back-to-heading t) + (get-text-property (point) 'org-effort))) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start)))) ((eq org-clock-in-resume 'auto-restart) @@ -1261,7 +1265,10 @@ make this the default behavior.)" (beginning-of-line 1) (org-indent-line-to (- (org-get-indentation) 2))) (insert org-clock-string " ") - (setq org-clock-effort (get-text-property (point) 'org-effort)) + (setq org-clock-effort + (save-excursion + (org-back-to-heading t) + (get-text-property (point) 'org-effort))) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start))) (setq org-clock-start-time --=-=-=--