Function: org-at-radio-list-p

org-at-radio-list-p is a byte-compiled function defined in org-list.el.gz.

Signature

(org-at-radio-list-p)

Documentation

Is point at a list item with radio buttons?

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-list.el.gz
(defun org-at-radio-list-p ()
  "Is point at a list item with radio buttons?"
  (when (org-match-line (org-item-re))	;short-circuit
    (let* ((e (save-excursion (forward-line 0) (org-element-at-point))))
      ;; Check we're really on a line with a bullet.
      (when (org-element-type-p e '(item plain-list))
	;; Look for ATTR_ORG attribute in the current plain list.
	(let ((plain-list (org-element-lineage e 'plain-list t)))
	  (org-with-point-at (org-element-post-affiliated plain-list)
	    (let ((case-fold-search t)
		  (regexp "^[ \t]*#\\+attr_org:.* :radio \\(\\S-+\\)")
		  (begin (org-element-begin plain-list)))
	      (and (re-search-backward regexp begin t)
		   (not (string-equal "nil" (match-string 1)))))))))))