From: vasil.s.d@gmail.com (Vasil S. Diadov)
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <87fw1v8vrk.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 135 bytes --]
Efforts are not displayed in mode line due to wrong point position
during fetching 'org-effort property of the text.
Patch attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch for fixing issue with efforts --]
[-- Type: text/x-patch, Size: 1656 bytes --]
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
next reply other threads:[~2013-01-20 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-20 20:06 Vasil S. Diadov [this message]
2013-01-23 13:49 ` 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/)] Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fw1v8vrk.fsf@gmail.com \
--to=vasil.s.d@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.