Sébastien Miquel writes:
> I've implemented this proposal in the patch attached.
>
> Does it look good to you ?
Thanks! The patch looks mostly fine.
Applied onto main via 72f66ca0b.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=72f66ca0b9d336e0da61b17cbe8ce183eef364dd
A small
Hi Ihor,
I've implemented this proposal in the patch attached.
Does it look good to you ?
--
Sébastien MiquelFrom b1b783dc80821b07937ac4211ec28df8726fff1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Miquel?=
Date: Sat, 13 Aug 2022 20:49:27 +0200
Subject: [PATCH] New babel syntax
Sébastien Miquel writes:
> The uses are maybe too niche to warrant the breaking change. A syntax
> extension like
> : var=block-id[]
> seems possible, even though brackets are already overloaded.
This sounds better. Using brackets will actually make a lot of sense.
Currently, we have roughly
Hi,
Ihor Radchenko writes:
> Hmm. You are right. I missed "optionally".
>
> Still, I find this idea as the best solution for people who want to
> process the source block text during noweb expansion.
>
> Alternative ideas are welcome though. I'd prefer to avoid breaking
> change if we can find
Ihor,
> Alternative ideas are welcome though. I'd prefer to avoid breaking
> change if we can find an equally simple syntax alternative to assign
> source block code to a variable.
my two cents would be to avoid the breaking change. (i notice, for
example, that i use this construct in some of my
Greg Minshall writes:
>> The current behaviour of :var foo=name-of-src-block is assigning result
>> of evaluation. However, this behaviour is actually not documented.
>> 16.4 Environment of a Code Block section of the manual only documents
>> uses like
>
> in fact, the text of the info page (on m
Ihor,
> The current behaviour of :var foo=name-of-src-block is assigning result
> of evaluation. However, this behaviour is actually not documented.
> 16.4 Environment of a Code Block section of the manual only documents
> uses like
in fact, the text of the info page (on my system?) says
> code b
Sébastien Miquel writes:
> Ihor Radchenko writes:
>> Can you provide more concrete examples?
>>
>>> Some drawbacks:
>>> + doesn't work for all languages (does work for LaTeX)
>> Which languages do not work?
> Most languages do not work. Using your proposed solution, what I'm
> trying to do is
Hi,
Ihor Radchenko writes:
Can you provide more concrete examples?
Some drawbacks:
+ doesn't work for all languages (does work for LaTeX)
Which languages do not work?
Most languages do not work. Using your proposed solution, what I'm
trying to do is
#+name:javascript-header
#+begin_src j
Sébastien Miquel writes:
>> #+name: documentation
>> This is a sample function documentation.
>> Because there are "quotes", it must be escaped and cannot be directly
>> used as noweb-reference.
>>
>> #+name: doc-escape
>> #+begin_src emacs-lisp :var str="" :tangle no
>> (prin1-to-string (string-
Hi,
Ihor Radchenko writes:
Thinking about the whole idea of :noweb-trans more, I see little benefit
compared to something like:
#+name: documentation
This is a sample function documentation.
Because there are "quotes", it must be escaped and cannot be directly
used as noweb-reference.
#+name:
Sébastien Miquel writes:
>> Other than :noweb-trans, the patch looks good for me.
> Here's a patch with only the :noweb-prefix part. If applied, we can mark
> this thread resolved.
Thanks! Applied on main as 2063596b9.
> Ihor Radchenko writes:
>> #+name: documentation
>> This is a sample func
Ihor Radchenko writes:
#+name: documentation
This is a sample function documentation.
Because there are "quotes", it must be escaped and cannot be directly
used as noweb-reference.
#+name: doc-escape
#+begin_src emacs-lisp :var str="" :tangle no
(prin1-to-string (string-trim-right str))
#+end_s
Sébastien Miquel writes:
> at least as long as you're tangling to a programming language, that
> can read lisp strings.
>> Consider the following example:
>>
>> #+BEGIN_SRC emacs-lisp :noweb yes :tangle yes :noweb-prefix no :noweb-trans
>> prin1-to-string
>> <>
>> (setq latex-header <>)
>> #+END
Hi,
Ihor Radchenko writes:
prin1-to-string is too specific and only solves a single use-case.
prin1-to-string is actually universal in a way, since any other
manipulation can then be achieved with
: (setq var (do-something <>))
at least as long as you're tangling to a programming language, th
Sébastien Miquel writes:
> The attached patch adds support for two new babel header arguments:
> =:noweb-prefix= and =:noweb-trans=.
>
> =:noweb-prefix= can be set to =no= to disable the noweb prefix
> behaviour, where prefix characters are repeated when expanding a
> multiline noweb reference.
Hi,
The attached patch adds support for two new babel header arguments:
=:noweb-prefix= and =:noweb-trans=.
=:noweb-prefix= can be set to =no= to disable the noweb prefix
behaviour, where prefix characters are repeated when expanding a
multiline noweb reference.
=:noweb-trans= can be set to =pr
17 matches
Mail list logo