emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [feature] prepend comment char before org-babel-ref


From: address@hidden
Subject: Re: [O] [feature] prepend comment char before org-babel-ref
Date: Fri, 26 Jan 2018 20:34:14 +0800

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]           <Hack this world!>      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 <address@hidden> wrote:
Hello,

"address@hidden" <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]