Browse Source

org-clock.el (org-clock-get-table-data): Bugfix

* org-clock.el (org-clock-get-table-data): When :link is `t'
in the clocktable parameters, bracket links in the clocktable
should only contain their description, other C-c C-o will try
to open the bracket link at point instead of the headline.

Thanks to Alexey Lebedeff for providing a preliminary patch for this.
Bastien Guerry 11 years ago
parent
commit
3a233aa6d9
1 changed files with 6 additions and 3 deletions
  1. 6 3
      lisp/org-clock.el

+ 6 - 3
lisp/org-clock.el

@@ -2705,9 +2705,12 @@ TIME:      The sum of all time spend in this tree, in minutes.  This time
 			   (format "file:%s::%s"
 				   (buffer-file-name)
 				   (save-match-data
-				     (org-make-org-heading-search-string
-				      (match-string 2))))
-			   (match-string 2)))
+				     (match-string 2)))
+			   (org-make-org-heading-search-string
+				      (replace-regexp-in-string
+				       org-bracket-link-regexp
+				       "\\3"
+				       (match-string 2)))))
 		    tsp (when timestamp
 			  (setq props (org-entry-properties (point)))
 			  (or (cdr (assoc "SCHEDULED" props))