emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Gomez, Daniel" <DGOMEZ1@MGH.HARVARD.EDU>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Ignoring link syntax inside of src blocks [9.5.4 (9.5.4-ged6f8d)]
Date: Mon, 13 Jun 2022 21:16:00 +0000	[thread overview]
Message-ID: <DM6PR04MB70513ABD44AF459167A41E6BB9AB9@DM6PR04MB7051.namprd04.prod.outlook.com> (raw)
In-Reply-To: <DM6PR04MB70512EEFF151D6427E4B0FDDB9AB9@DM6PR04MB7051.namprd04.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]

Hi all,

The link syntax [[link]] is parsed as an org-link inside of a source block, as shown in the code below:

#+begin_src emacs-lisp
[[2]]
#+end_src

This if fine in the example above, but consider a language like python. The link syntax is also valid python syntax:

#+begin_src python
x = np.array([[2]])
#+end_src

If I now toggle link display with org-toggle-link-display, then my python code is still valid, but reads as if it'd be wrong (as illustrated here):

#+begin_src python
x = np.array(2)  # the [[]] appear hidden.
#+end_src

How could I tell org-mode to not parse links inside of org src-blocks?

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.70 Version 10.15.7 (Build 19H1922))
 of 2022-06-10
Package: Org mode version 9.5.4 (9.5.4-ged6f8d)


Regards,

Daniel
The information in this e-mail is intended only for the person to whom it is addressed.  If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline <https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 

[-- Attachment #2: Type: text/html, Size: 2190 bytes --]

  reply	other threads:[~2022-06-13 21:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 15:03 [BUG] Ignoring link syntax inside of src blocks [9.5.4 (9.5.4-ged6f8d @ /Users/dangom/.emacs.d.vanilla/straight/build/org/)] Gomez, Daniel
2022-06-13 20:45 ` [BUG] Ignoring link syntax inside of src blocks [9.5.4 (9.5.4-ged6f8d)] Gomez, Daniel
2022-06-13 21:16   ` Gomez, Daniel [this message]
2022-06-14  1:39     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR04MB70513ABD44AF459167A41E6BB9AB9@DM6PR04MB7051.namprd04.prod.outlook.com \
    --to=dgomez1@mgh.harvard.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).