Hi,
This screenshot
https://www.dropbox.com/s/g3obxpigr8gg69f/-Org%20Agenda-%20-%20emacs_017.png
shows how it looked before the patch. It's no good unless you have
very good memory for numbers )
From d14eac26b0a452b39e0f8231d2c7a552f16ffe1b Mon Sep 17 00:00:00 2001
From: Alexey Lebedeff <[email protected]>
Date: Thu, 20 Feb 2014 08:43:21 +0400
Subject: [PATCH] Fix clock table when there are links in headings.
* lisp/org.el (org-all-links-display-format): New function which
replaces all links in string with their descriptions.
* lisp/org-clock.el (org-clock-get-table-data): When linking table
entry to original heading, replace all links there with their
descriptions. It's because when nesting org links they are converted
to something like "{{some-link}{some-description}}" and as a result
mulitple rows such as that can become almost indistinguishable.
TINYCHANGE
---
lisp/org-clock.el | 3 ++-
lisp/org.el | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 8e1d632..31e59a8 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2709,7 +2709,8 @@ TIME: The sum of all time spend in this tree, in minutes. This time
(save-match-data
(org-make-org-heading-search-string
(match-string 2))))
- (match-string 2)))
+ (org-all-links-display-format
+ (match-string 2))))
tsp (when timestamp
(setq props (org-entry-properties (point)))
(or (cdr (assoc "SCHEDULED" props))
diff --git a/lisp/org.el b/lisp/org.el
index ac53e56..a9a5bd7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -24095,6 +24095,13 @@ If there is no description, use the link target."
nil t link)
link)))
+(defun org-all-links-display-format (string)
+ "Replaces all links in string with their descriptions."
+ (loop
+ for result = string then (org-link-display-format result)
+ while (string-match org-bracket-link-regexp result)
+ finally (return result)))
+
(defun org-toggle-link-display ()
"Toggle the literal or descriptive display of links."
(interactive)
--
1.8.5.3