[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: want a file format easily edited and read by emacs that allows (mult
From: |
Dan Hitt |
Subject: |
Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included |
Date: |
Sun, 3 Dec 2017 11:17:48 -0800 |
On Sun, Dec 3, 2017 at 2:10 AM, <tomas@tuxteam.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sat, Dec 02, 2017 at 02:47:23PM -0800, Dan Hitt wrote:
>
> [...]
>
>> Hi Marcin,
>>
>> You are very nice, but what is a 'source block'?
>>
>> Is this like cdata in html?
>
> Yes and no :-)
>
> In org mode, a source block looks like
>
> #+BEGIN_SRC C
> void img_free(img *image)
> {
> if(image) {
> if(image->pixels) free(image->pixels);
> free(image);
> }
> }
> #+END_SRC
>
> Meaning: the code between this markup is C source code. Thus Org
> knows, for many languages:
>
> - how to highlight it and edit it, via the appropriate
> Emacs mode
>
> - how to "execute" it (and if you wish, insert the
> results into your buffer). Yes, for C, Org would
> call the compiler for you, for a snippet like the
> above pack some boilerplate around it with a main
> function calling into your func, and printing the
> return value, for org to collect the result (that's
> Org babel magic).
>
> There are many ways to pass parameters to source code blocks,
> which controls their behaviour.
>
> Definitely worth a look.
>
> Cheers
> - -- t
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iEYEARECAAYFAlojzawACgkQBcgs9XrR2kYOgACePyLHE8ZGq7Wj5hm+FhhrlOR2
> USYAnjpr6QvsU1xMAmuxRLPPDkaMlp8K
> =q2aB
> -----END PGP SIGNATURE-----
>
Wow, i mean, just wow.
Presumably there's some confirmation necessary for compilation and
execution, or otherwise it would be some kind of multi-lingual hole
(??)
I have to think about this for a few days :) :) . . . . .
dan
- want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Dan Hitt, 2017/12/02
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Marcin Borkowski, 2017/12/04
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Emanuel Berg, 2017/12/04
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Marcin Borkowski, 2017/12/05
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Emanuel Berg, 2017/12/05
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Marcin Borkowski, 2017/12/06
- Message not available
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Emanuel Berg, 2017/12/06
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Marcin Borkowski, 2017/12/07
- Message not available
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Emanuel Berg, 2017/12/06
- Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included, Emanuel Berg, 2017/12/06