Jack Kamm <jackk...@gmail.com> writes:

> The following patch seems to fix the issue -- does something like this
> seem reasonable?
>
> ...
> +(defun org-babel-previous-src-block-or-inline ()
> +  "Jump to previous source block or inline block."
> +  (re-search-backward (rx (or (regexp org-babel-src-block-regexp)
> +                              ;; copied from 
> `org-element-inline-src-block-parser'.
> +                              (regexp "\\_<src_\\([^ \t\n[{]+\\)[{[]")))))

Yes, in general. But,
1. Probably better make it internal function for more flexibility in
   future
2. You need to consult `org-element-context' to make sure that we are
   really at inline src block, but not inside some kind of verbatim
   markup.
3. Rather than copying regexps around, please factor it out and create a
   constant in org-element.el

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to