* 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/)]
@ 2013-01-20 20:06 Vasil S. Diadov
2013-01-23 13:49 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Vasil S. Diadov @ 2013-01-20 20:06 UTC (permalink / raw)
To: emacs-orgmode
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: 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/)]
2013-01-20 20:06 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/)] Vasil S. Diadov
@ 2013-01-23 13:49 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2013-01-23 13:49 UTC (permalink / raw)
To: Vasil S. Diadov; +Cc: emacs-orgmode
Hi Vasil,
vasil.s.d@gmail.com (Vasil S. Diadov) writes:
> Efforts are not displayed in mode line due to wrong point position
> during fetching 'org-effort property of the text.
thanks a lot for the patch, I fixed this a bit differently, but the
core idea is the same.
Best,
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-23 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-20 20:06 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/)] Vasil S. Diadov
2013-01-23 13:49 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).