Hello,
>>>>> Jambunathan K writes:
>> [1] E.g. `org-babel-where-is-src-block-head' may not be the
>> "proper" way to detect if we're in a src block.
>>
> I wonder what the proper way is ...
> At different points in the past, I had looked for org-at-babel-p or
> something similar. I invariably wound up using
> org-babel-where-is-src-block-head ...
I don't know it either but there is `org-in-regexps-block-p' for
general use, and in org-list, I used something in the lines of this:
(defun in-src-block-p ()
(save-excursion
(let ((case-fold-search t))
(end-of-line)
(and (re-search-backward "^[ \t]*#\\+\\(begin\\|end\\)_src" nil t)
(= (length (match-string 1)) 5)))))
Regards,
-- Nicolas
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode