浏览代码

org-element: Remove :clockedp property from headlines and inlinetasks

* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser): Remove :clockedp property.

This property isn't even remotely related to the structure of the
document and, as such, doesn't belong to Org element.
Nicolas Goaziou 13 年之前
父节点
当前提交
5e30d4fa4e
共有 1 个文件被更改,包括 4 次插入21 次删除
  1. 4 21
      lisp/org-element.el

+ 4 - 21
lisp/org-element.el

@@ -119,8 +119,6 @@
 (eval-when-compile (require 'cl))
 (eval-when-compile (require 'cl))
 (require 'org)
 (require 'org)
 
 
-(declare-function org-clocking-buffer "org-clock" ())
-
 
 
 
 
 ;;; Definitions And Rules
 ;;; Definitions And Rules
@@ -729,8 +727,8 @@ Return a list whose CAR is `headline' and CDR is a plist
 containing `:raw-value', `:title', `:begin', `:end',
 containing `:raw-value', `:title', `:begin', `:end',
 `:pre-blank', `:hiddenp', `:contents-begin' and `:contents-end',
 `:pre-blank', `:hiddenp', `:contents-begin' and `:contents-end',
 `:level', `:priority', `:tags', `:todo-keyword',`:todo-type',
 `:level', `:priority', `:tags', `:todo-keyword',`:todo-type',
-`:scheduled', `:deadline', `:closed', `:clockedp', `:quotedp',
-`:archivedp', `:commentedp' and `:footnote-section-p' keywords.
+`:scheduled', `:deadline', `:closed', `:quotedp', `:archivedp',
+`:commentedp' and `:footnote-section-p' keywords.
 
 
 The plist also contains any property set in the property drawer,
 The plist also contains any property set in the property drawer,
 with its name in lowercase, the underscores replaced with hyphens
 with its name in lowercase, the underscores replaced with hyphens
@@ -803,14 +801,7 @@ Assume point is at beginning of the headline."
 			      (progn (goto-char end)
 			      (progn (goto-char end)
 				     (skip-chars-backward " \r\t\n")
 				     (skip-chars-backward " \r\t\n")
 				     (forward-line)
 				     (forward-line)
-				     (point))))
-	   (clockedp (and (featurep 'org-clock)
-			  (eq (org-clocking-buffer)
-			      (or (buffer-base-buffer) (current-buffer)))
-			  (save-excursion
-			    (goto-char (marker-position org-clock-marker))
-			    (org-back-to-heading t)
-			    (= (point) begin)))))
+				     (point)))))
       ;; Clean RAW-VALUE from any quote or comment string.
       ;; Clean RAW-VALUE from any quote or comment string.
       (when (or quotedp commentedp)
       (when (or quotedp commentedp)
 	(let ((case-fold-search nil))
 	(let ((case-fold-search nil))
@@ -848,7 +839,6 @@ Assume point is at beginning of the headline."
 				       end)
 				       end)
 			  :footnote-section-p footnote-section-p
 			  :footnote-section-p footnote-section-p
 			  :archivedp archivedp
 			  :archivedp archivedp
-			  :clockedp clockedp
 			  :commentedp commentedp
 			  :commentedp commentedp
 			  :quotedp quotedp)
 			  :quotedp quotedp)
 		    time-props
 		    time-props
@@ -915,8 +905,7 @@ Return a list whose CAR is `inlinetask' and CDR is a plist
 containing `:title', `:begin', `:end', `:hiddenp',
 containing `:title', `:begin', `:end', `:hiddenp',
 `:contents-begin' and `:contents-end', `:level', `:priority',
 `:contents-begin' and `:contents-end', `:level', `:priority',
 `:raw-value', `:tags', `:todo-keyword', `:todo-type',
 `:raw-value', `:tags', `:todo-keyword', `:todo-type',
-`:scheduled', `:deadline', `:clockedp', `:closed' and
-`:post-blank' keywords.
+`:scheduled', `:deadline', `:closed' and `:post-blank' keywords.
 
 
 The plist also contains any property set in the property drawer,
 The plist also contains any property set in the property drawer,
 with its name in lowercase, the underscores replaced with hyphens
 with its name in lowercase, the underscores replaced with hyphens
@@ -973,11 +962,6 @@ Assume point is at beginning of the inline task."
 		       (end-of-line)
 		       (end-of-line)
 		       (and (re-search-forward "^\\*+ END" limit t)
 		       (and (re-search-forward "^\\*+ END" limit t)
 			    (match-beginning 0))))
 			    (match-beginning 0))))
-	   (clockedp (and (featurep 'org-clock)
-			  (eq (org-clocking-buffer)
-			      (or (buffer-base-buffer) (current-buffer)))
-			  (let ((clock (marker-position org-clock-marker)))
-			    (and (> clock begin) (< clock task-end)))))
 	   (contents-begin (progn (forward-line)
 	   (contents-begin (progn (forward-line)
 				  (and task-end (< (point) task-end) (point))))
 				  (and task-end (< (point) task-end) (point))))
 	   (hidden (and contents-begin (org-invisible-p2)))
 	   (hidden (and contents-begin (org-invisible-p2)))
@@ -1003,7 +987,6 @@ Assume point is at beginning of the inline task."
 			 :tags tags
 			 :tags tags
 			 :todo-keyword todo
 			 :todo-keyword todo
 			 :todo-type todo-type
 			 :todo-type todo-type
-			 :clockedp clockedp
 			 :post-blank (count-lines before-blank end))
 			 :post-blank (count-lines before-blank end))
 		   time-props
 		   time-props
 		   standard-props))))
 		   standard-props))))