Juha Autero <jaut...@iki.fi> writes:

> URLs in code blocks is shown as links, but they cannot be opened.
> Instead result of code block is opened.
>
> For example with code block like this:
>
> #+begin_src shell
>   # This is an example of URL https://orgmode.org/
>   #
>   echo "test"
> #+end_src
>
> URL is marked as a link, but attempts to open it will execute code
> and show the results in separarte buffer. This happens when using mouse
> or keyboard commands. It seems that it is undefined how
> org-open-at-point behaves when there are nested things at point.

Confirmed.

> I think footnote definitions, src-blocks and headlines may contain
> links, citations, timestamps and tags. At least those are combinations
> that make sense. Only case of headline containing links is defined in
> documentation because headlines open list of links in headline. I
> haven't tested other combinations than src-block containing a link.

links, citations, timestamps, and tags are not allowed inside src-blocks
as per Org syntax. However, links are a special case as they are
*fontified* inside src-blocks. And that fontification creates the
problem - `org-open-at-point' is called when you click on the
highlighted link, but on src block it actually executes it.

We may need a special case for org-open-at-point: inside src block on link.

> Also, docstring of org-open-at-point talks about src-blocks and
> talks about "src-block of inline src-block". I think it should be "or".

I fixed the typo.

-- 
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