From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: open link in source code block Date: Sat, 05 Jan 2019 10:25:13 +0000 Message-ID: <87y37zo0za.fsf@gmail.com> References: <8585C713-3A24-4FE3-A187-A4587F3ADC97@acm.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggsout.gnu.org ([209.51.188.92]:60286 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfj95-0005xM-0B for Emacs-orgmode@gnu.org; Sat, 05 Jan 2019 05:25:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfj8z-0003xu-VT for Emacs-orgmode@gnu.org; Sat, 05 Jan 2019 05:25:34 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:40410) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfj8y-0003mg-9z for Emacs-orgmode@gnu.org; Sat, 05 Jan 2019 05:25:29 -0500 Received: by mail-wr1-x433.google.com with SMTP id p4so38636599wrt.7 for ; Sat, 05 Jan 2019 02:25:15 -0800 (PST) In-Reply-To: <8585C713-3A24-4FE3-A187-A4587F3ADC97@acm.org> (Win Treese's message of "Fri, 4 Jan 2019 19:38:35 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Win Treese Cc: Emacs-orgmode@gnu.org On Friday, 4 Jan 2019 at 19:38, Win Treese wrote: > Suppose I have the following Org file contents: > > * test > > #+BEGIN_SRC emacs-lisp > (setq yyy 3) > ;; See https://www.gnu.org > #+END_SRC > > The URL for gnu.org is highlighted as a clickable link. But if I click > it, the source block is evaluated. This seems rather unexpected, > especially since my intention was to open the link. Probably expected albeit maybe not your preferred behaviour; all about precedence. In any case, I would suggest that the easy solution would be to move such links out of the src block. I usually put these as org comments, along the lines of # See https://www.gnu.org #+BEGIN_SRC emacs-lisp (setq yyy 3) #+END_SRC My approach to literate programming is to have no (significant) comments in the code segments themselves. Each code block is small and has all commentary in the text, not the code. -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442