Function: org-element-inlinetask-parser
org-element-inlinetask-parser is a byte-compiled function defined in
org-element.el.gz.
Signature
(org-element-inlinetask-parser LIMIT &optional RAW-SECONDARY-P)
Documentation
Parse an inline task.
Do not search past LIMIT.
Return a new syntax node of inlinetask type containing :title,
:begin, :end, :pre-blank, :contents-begin and :contents-end,
:level, :priority, :raw-value, :tags, :todo-keyword,
:todo-type, :scheduled, :deadline, :closed, :post-blank and
:post-affiliated properties.
The plist also contains any property set in the property drawer, with its name in upper cases and colons added at the beginning (e.g., :CUSTOM_ID).
When optional argument RAW-SECONDARY-P is non-nil, inline-task's title will not be parsed as a secondary string, but as a plain string instead.
Assume point is at beginning of the inline task.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
;;;; Inlinetask
(defun org-element-inlinetask-parser (limit &optional raw-secondary-p)
"Parse an inline task.
Do not search past LIMIT.
Return a new syntax node of `inlinetask' type containing `:title',
`:begin', `:end', `:pre-blank', `:contents-begin' and `:contents-end',
`:level', `:priority', `:raw-value', `:tags', `:todo-keyword',
`:todo-type', `:scheduled', `:deadline', `:closed', `:post-blank' and
`:post-affiliated' properties.
The plist also contains any property set in the property drawer,
with its name in upper cases and colons added at the
beginning (e.g., `:CUSTOM_ID').
When optional argument RAW-SECONDARY-P is non-nil, inline-task's
title will not be parsed as a secondary string, but as a plain
string instead.
Assume point is at beginning of the inline task."
(save-excursion
(let* ((deferred-title-prop
(if raw-secondary-p
org-element--headline-parse-title-raw
org-element--headline-parse-title-parse))
(begin (point))
(task-end (save-excursion
(forward-line 1)
(and (re-search-forward org-element-headline-re limit t)
(looking-at-p "[ \t]*END[ \t]*$")
(line-beginning-position))))
(contents-begin (and task-end
(< (point) task-end)
(progn
(forward-line)
(skip-chars-forward " \t\n")
(line-beginning-position))))
(contents-end (and contents-begin task-end))
(end (progn (when task-end (goto-char task-end))
(forward-line)
(skip-chars-forward " \r\t\n" limit)
(if (eobp) (point) (line-beginning-position)))))
(org-element-create
'inlinetask
(list
:begin begin
:end end
:pre-blank
(if (not contents-begin) 0
(1- (count-lines begin contents-begin)))
:contents-begin contents-begin
:contents-end contents-end
:buffer (current-buffer)
:raw-value deferred-title-prop
:title deferred-title-prop
:level deferred-title-prop
:priority deferred-title-prop
:tags deferred-title-prop
:todo-keyword deferred-title-prop
:todo-type deferred-title-prop
:archivedp deferred-title-prop
:commentedp deferred-title-prop
:post-blank (1- (count-lines (or task-end begin) end))
:post-affiliated begin
:secondary (alist-get
'inlinetask
org-element-secondary-value-alist)
:deferred
(and task-end org-element--headline-deferred))))))