Function: org-element-target-parser

org-element-target-parser is a byte-compiled function defined in org-element.el.gz.

Signature

(org-element-target-parser)

Documentation

Parse target at point, if any.

When at a target, return a list whose car is target and cdr a plist with :begin, :end, :value and :post-blank as keywords. Otherwise, return nil.

Assume point is at the target.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
;;;; Target

(defun org-element-target-parser ()
  "Parse target at point, if any.

When at a target, return a list whose car is `target' and cdr
a plist with `:begin', `:end', `:value' and `:post-blank' as
keywords.  Otherwise, return nil.

Assume point is at the target."
  (save-excursion
    (when (looking-at org-target-regexp)
      (let ((begin (point))
	    (value (match-string-no-properties 1))
	    (post-blank (progn (goto-char (match-end 0))
			       (skip-chars-forward " \t")))
	    (end (point)))
	(list 'target
	      (list :begin begin
		    :end end
		    :value value
		    :post-blank post-blank))))))