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:35:52 +0800 Message-ID: References: <87mv13cr2w.fsf@nicolasgoaziou.fr> <87zi51snce.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113dc542e0ead00563ad2472" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef9R0-0004sv-8c for emacs-orgmode@gnu.org; Fri, 26 Jan 2018 14:13:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ef9Qy-00050U-Py for emacs-orgmode@gnu.org; Fri, 26 Jan 2018 14:13:10 -0500 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]:36238) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ef9Qy-000507-IS for emacs-orgmode@gnu.org; Fri, 26 Jan 2018 14:13:08 -0500 Received: by mail-oi0-x241.google.com with SMTP id w135so996291oie.3 for ; Fri, 26 Jan 2018 11:13:08 -0800 (PST) In-Reply-To: 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 --001a113dc542e0ead00563ad2472 Content-Type: text/plain; charset="UTF-8" Sorry, I miss typed my header argument `:dir "data/code/src-coderef.rb"`. It should be `:tangle`. [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 8:34 PM, numbchild@gmail.com wrote: > 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 >> > > --001a113dc542e0ead00563ad2472 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry, I miss typed my header argument `:dir "dat= a/code/src-coderef.rb"`. It should be `:tangle`.

[= stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &l= t;Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433IRC(freeenode): 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 Twitt= er:=C2=A0 @numbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 = CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/
<= /div>

On Fri, Jan 26, 2018 at 8:34 PM, numbchild@gmail.com <<= a href=3D"mailto:numbchild@gmail.com" target=3D"_blank">numbchild@gmail.com= > wrote:
<= div class=3D"gmail_default">Because it is not good for tangling.
<= div class=3D"gmail_default">For example, tangle the bellowing src block, th= e tangled source code file will has `(ref:hello)` too.
```
#+begin_sr= c emacs-lisp :tangle "data/code/src-coderef.el"
(message "= ;hello, world") (ref:hello)
#+end_src
```
The tangled source code file looks like this:
```
(me= ssage "hello, world") (ref:hello)
```
This absolutely is not a good idea.



And after a test, I found I can't tangle the bellow= ing 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/co= de/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: 47C3= 2433
IRC(freeenode): 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 @numbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36= =C2=A0 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/
=

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

"numbchild@gm= ail.com" <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=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


--001a113dc542e0ead00563ad2472--