From mboxrd@z Thu Jan 1 00:00:00 1970 From: "numbchild@gmail.com" Subject: Re: [feature] prepend comment char before org-babel-ref Date: Fri, 26 Jan 2018 20:34:14 +0800 Message-ID: References: <87mv13cr2w.fsf@nicolasgoaziou.fr> <87zi51snce.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113dd1800a92520563ad1f8b" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef7g3-0007yp-FU for emacs-orgmode@gnu.org; Fri, 26 Jan 2018 12:20:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ef7g2-0000Tg-4A for emacs-orgmode@gnu.org; Fri, 26 Jan 2018 12:20:35 -0500 Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:45031) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ef7g1-0000Sl-SL for emacs-orgmode@gnu.org; Fri, 26 Jan 2018 12:20:34 -0500 Received: by mail-oi0-x230.google.com with SMTP id j15so769296oii.11 for ; Fri, 26 Jan 2018 09:20:33 -0800 (PST) In-Reply-To: <87zi51snce.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Org-mode --001a113dd1800a92520563ad1f8b Content-Type: text/plain; charset="UTF-8" Because it is not good for tangling. For example, tangle the bellowing src block, the tangled source code file will has `(ref:hello)` too. ``` #+begin_src emacs-lisp :tangle "data/code/src-coderef.el" (message "hello, world") (ref:hello) #+end_src ``` The tangled source code file looks like this: ``` (message "hello, world") (ref:hello) ``` This absolutely is not a good idea. And after a test, I found I can't tangle the bellowing src block: ``` #+begin_src ruby :dir "data/code/src-coderef.rb" puts "hello, world" (ref:hello) #+end_src ``` Even with a comment char prefix: ``` #+begin_src ruby :dir "data/code/src-coderef.rb" puts "hello, world" # (ref:hello) #+end_src ``` [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Fri, Jan 26, 2018 at 4:19 AM, Nicolas Goaziou wrote: > Hello, > > "numbchild@gmail.com" writes: > > > I see. Seems current ob-core.el can filter out the `src-coderef`. > > Like the following: > > [...] > > > My wanted feature is simple, just `(insert (concat comment-char > > coderef-format))` > > Per the above, may I ask why you do need it? > > Regards, > > -- > Nicolas Goaziou 0x80A93738 > --001a113dd1800a92520563ad1f8b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Because it is not good for tangling.
For = example, tangle the bellowing src block, the tangled source code file will = has `(ref:hello)` too.
```
#+begin_src emacs-lisp :tangle "data/= code/src-coderef.el"
(message "hello, world") (ref:hello)=
#+end_src
```
The tangled source code file looks like t= his:
```
(message "hello, world") (ref:hello)
```
This absolutely is not a good idea.


<= br>
And after a test, I found I can't tangle the bellowing src= block:
```
#+begin_src ruby :dir "data/code/src-coderef.rb"= ;
puts "hello, world" (ref:hello)
#+end_src
```
Even with a comment char prefix:
```
#+begin_src ruby = :dir "data/code/src-coderef.rb"
puts "hello, world" = # (ref:hello)
#+end_src

```

[stardiviner]= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <Hack this = world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433
IRC(freeen= ode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Twitter:=C2=A0 @n= umbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8= E5 47C3 2433
Blog: http://stardiviner.github.io/

On Fri, Jan 26, 2018 at 4:19 AM, Nicolas Goa= ziou <mail@nicolasgoaziou.fr> wrote:
Hello,

"numbchild@gmail.com" = <numbchild@gmail.com> writ= es:

> I see. Seems current ob-core.el can filter out the `src-coderef`.
> Like the following:

[...]

> My wanted feature is simple, just `(insert (concat comment-char
> coderef-format))`

Per the above, may I ask why you do need it?

Regards,

--
Nicolas Goaziou=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x80A93738

--001a113dd1800a92520563ad1f8b--