瀏覽代碼

org.el (org-make-org-heading-search-string): Don't use statistic or [x/y] cookies when creating a link

* org.el (org-make-org-heading-search-string): Don't use
statistic or [x/y] cookies when creating a link.

Thanks to William Lechelle for reporting this.
Bastien Guerry 12 年之前
父節點
當前提交
7afb487a28
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -9269,10 +9269,10 @@ according to FMT (default from `org-email-link-description-format')."
 	       (and (derived-mode-p 'org-mode)
 		    (save-excursion
 		      (org-back-to-heading t)
-		      (plist-get (cadr (org-element-at-point))
-				 :raw-value)))))
+		      (org-element-property :raw-value (org-element-at-point))))))
 	(lines org-context-in-file-links))
     (or string (setq s (concat "*" s)))  ; Add * for headlines
+    (setq s (replace-regexp-in-string "\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]" "" s))
     (when (and string (integerp lines) (> lines 0))
       (let ((slines (org-split-string s "\n")))
 	(when (< lines (length slines))