Thanks. @Nicolas
[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 Sat, Jan 27, 2018 at 6:58 PM, Nicolas Goaziou
Nicolas Goaziou writes:
> Hello,
>
> "numbch...@gmail.com" writes:
>
>> 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
Hello,
"numbch...@gmail.com" writes:
> 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,
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:
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:
Hello,
"numbch...@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?
I see. Seems current ob-core.el can filter out the `src-coderef`.
Like the following:
#+begin_src emacs-lisp
(prin1 "hello, world!") (ref:hello)
#+end_src
#+RESULTS[<2018-01-25 20:28:40> 16eccfedcc87d3ca0c7024b2637c646d4708ec42]:
: hello, world!
#+begin_src ruby :results output
puts "hello,
Hello,
"numbch...@gmail.com" writes:
> I think this function should be in Org-mode itself.
> Because when you're editing the source code, will not want this src-coderef
> like `(ref:example)` be editable. It should be in comment.
Thank you for the suggestion. However I
I'm currently using this advice:
```elisp
;;; prepend comment char ahead of `org-babel-ref'.
;; auto prefix with comment char when create code ref in src block with
`org-store-link'.
(defun org-babel-ref-prepend-comment-char (arg interactive?)
"Prepend comment chart in Org-mode src code block."