Greg Minshall writes:
> Right now, names of source blocks are global to the .org file, and i
> don't suspect that will (or should) change.
Yep, I understand that. I explained a workaround for using short names
for code blocks and avoid name conflicts in
TIL: you can have spaces in src block names!
Thank you!
--
: Professor Eric S Fraga
: Visit useplaintext.email & www.ucl.ac.uk/~ucecesf/
: Consider meet.jit.si and bigbluebutton.org for video conferencing
: PGP/GnuPG key: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
hi, Rodrigo,
thanks. i understand. we all like "int i;" to be independent in
separate functions (as it were). right now, names of source blocks are
global to the .org file, and i don't suspect that will (or should)
change.
i apologize for bringing it up, but the one thing that jumps out at
ode:
#+HEADER::noweb-ref genetic/functions
#+BEGIN_SRC python
def next_generation(curr):
<>
<>
<>
<>
return new
#+END_SRC
You would then have a block dedicated to each major part of the evolutionary
step.
> 2. If not, how do you
Eric S Fraga writes:
> Yes. Fully qualified and detailed. And then rely on completion to jump
> to code blocks (using org-babel-goto-named-src-block).
Thanks for the answer. I didn't know about
=org-babel-goto-named-src-block=.
Regarding using fully qualified and detailed names: I feel
Greg Minshall writes:
> i guess part of the answer depends on why you are naming your code
> blocks.
I was asking because in my notes in Org Mode, I am used to create
subheadings for each question I have. Here's an example:
Let's say that in my notes on Python, I have the following content
On Monday, 15 Feb 2021 at 14:18, Rodrigo Morales wrote:
> 1. Do you use long names?
Yes. Fully qualified and detailed. And then rely on completion to jump
to code blocks (using org-babel-goto-named-src-block).
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-213-g49364f
Rodrigo,
i guess part of the answer depends on why you are naming your code
blocks. for me, the main reason is for <>. another is so that
when org-mode asks me if it should run a block, it has a name to tell me
to help in my decision-making.
for <>, there is noweb-ref header argument (see
=,
which is ambiguous, you would use
=generate-table-grocery-shopping-2020-may=. Another example:
instead of using =create-venv= you would use
=create-venv-for-personal-blog-in-home=.
2. If not, how do you name your code blocks to avoid name conflicts?
--
Greetings,
Rodrigo Morales.
IRC