Function: org-element-diary-sexp-parser
org-element-diary-sexp-parser is a byte-compiled function defined in
org-element.el.gz.
Signature
(org-element-diary-sexp-parser LIMIT AFFILIATED)
Documentation
Parse a diary sexp.
LIMIT bounds the search. AFFILIATED is a list of which CAR is the buffer position at the beginning of the first affiliated keyword and CDR is a plist of affiliated keywords along with their value.
Return a new syntax node of diary-sexp type containing :begin,
:end, :value, :post-blank and :post-affiliated properties.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
;;;; Diary Sexp
(defun org-element-diary-sexp-parser (limit affiliated)
"Parse a diary sexp.
LIMIT bounds the search. AFFILIATED is a list of which CAR is
the buffer position at the beginning of the first affiliated
keyword and CDR is a plist of affiliated keywords along with
their value.
Return a new syntax node of `diary-sexp' type containing `:begin',
`:end', `:value', `:post-blank' and `:post-affiliated' properties."
(save-excursion
(let ((begin (car affiliated))
(post-affiliated (point))
(value (progn (looking-at "\\(%%(.*\\)[ \t]*$")
(match-string-no-properties 1)))
(pos-before-blank (progn (forward-line) (point)))
(end (progn (skip-chars-forward " \r\t\n" limit)
(if (eobp) (point) (line-beginning-position)))))
(org-element-create
'diary-sexp
(nconc
(list :value value
:begin begin
:end end
:post-blank (count-lines pos-before-blank end)
:post-affiliated post-affiliated)
(cdr affiliated))))))