unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
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:10:52 +0100	[thread overview]
Message-ID: <20171203101052.GA29579@tuxteam.de> (raw)
In-Reply-To: <CAOphiz+7q-trwKdEBDc-aUdH8euR42pMoOk2FzP3wxyt1kMfFw@mail.gmail.com>

-----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-----



  reply	other threads:[~2017-12-03 10:10 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-02  8:02 want a file format easily edited and read by emacs that allows (multiple) pictures to be included Dan Hitt
2017-12-02 13:06 ` Daian YUE
2017-12-02 20:31   ` Dan Hitt
2017-12-02 21:08     ` Marcin Borkowski
2017-12-02 22:47       ` Dan Hitt
2017-12-03 10:10         ` tomas [this message]
2017-12-03 19:17           ` Dan Hitt
2017-12-03 20:56             ` tomas
2017-12-04 10:02       ` Marcin Borkowski
2017-12-04 11:28         ` Emanuel Berg
2017-12-05  5:11           ` Marcin Borkowski
2017-12-05  5:56             ` Emanuel Berg
2017-12-06 19:29               ` Marcin Borkowski
     [not found]               ` <mailman.5249.1512588581.27995.help-gnu-emacs@gnu.org>
2017-12-07  1:26                 ` Emanuel Berg
2017-12-07  6:27                   ` Marcin Borkowski
2017-12-07  2:06                 ` Emanuel Berg
2017-12-07  2:55                   ` Emanuel Berg
2017-12-07  4:53                   ` Rusi
2017-12-07  5:14                     ` Emanuel Berg
2017-12-07  5:20                       ` Emanuel Berg
2017-12-07  7:17                   ` Eric S Fraga
     [not found]                   ` <mailman.5273.1512631037.27995.help-gnu-emacs@gnu.org>
2017-12-07 11:35                     ` Emanuel Berg
2017-12-07 13:05                       ` Rusi
2017-12-07 13:59                       ` Eric S Fraga
2017-12-07 14:52                         ` Joost Kremers
2017-12-07 15:04                           ` Eric S Fraga
2017-12-07 15:18                             ` Yuri Khan
2017-12-08  9:26                               ` Eric S Fraga
2017-12-08 19:37                                 ` Dan Hitt
2017-12-09 10:20                                   ` Eric S Fraga
2017-12-09 14:03                                     ` Kaushal Modi
     [not found]                                   ` <mailman.5390.1512814836.27995.help-gnu-emacs@gnu.org>
2017-12-09 19:04                                     ` Emanuel Berg
     [not found]                             ` <mailman.5287.1512659955.27995.help-gnu-emacs@gnu.org>
2017-12-07 18:31                               ` Emanuel Berg
2017-12-07 18:50                                 ` Yuri Khan
     [not found]                                 ` <mailman.5293.1512672682.27995.help-gnu-emacs@gnu.org>
2017-12-07 19:07                                   ` Emanuel Berg
2017-12-07 19:19                                     ` Yuri Khan
     [not found]                                     ` <mailman.5295.1512674421.27995.help-gnu-emacs@gnu.org>
2017-12-07 21:23                                       ` Emanuel Berg
     [not found]                           ` <mailman.5286.1512659071.27995.help-gnu-emacs@gnu.org>
2017-12-07 19:02                             ` Emanuel Berg
2017-12-08  9:23                               ` Eric S Fraga
     [not found]                         ` <mailman.5284.1512658429.27995.help-gnu-emacs@gnu.org>
2017-12-07 18:26                           ` Emanuel Berg
2017-12-07 19:04                             ` Joost Kremers
     [not found]                             ` <mailman.5294.1512673483.27995.help-gnu-emacs@gnu.org>
2017-12-07 19:29                               ` Emanuel Berg
2017-12-07 18:43                           ` Emanuel Berg
2017-12-04 20:35         ` Dan Hitt
2017-12-04 21:21           ` Emanuel Berg
2017-12-04 21:52             ` tomas
2017-12-04 22:00               ` Emanuel Berg
2017-12-04 22:12                 ` tomas
2017-12-05  4:13                   ` Emanuel Berg
2017-12-05  8:08                     ` tomas
2017-12-05  8:36                       ` Emanuel Berg
2017-12-05  8:53                         ` tomas
2017-12-05  9:48                           ` Emanuel Berg
2017-12-05 10:03                             ` tomas
2017-12-05 11:31                               ` Emanuel Berg
2017-12-05 11:51                                 ` tomas
2017-12-05 13:44                                   ` Emanuel Berg
2017-12-05 14:00                                     ` tomas
2017-12-05 19:58                                       ` Emanuel Berg
2017-12-05 16:05                                     ` Marcin Borkowski
2017-12-05 20:08                                       ` Emanuel Berg
     [not found]                                 ` <mailman.5155.1512474685.27995.help-gnu-emacs@gnu.org>
2017-12-05 11:59                                   ` Rusi
2017-12-05 15:49                                 ` Marcin Borkowski
     [not found]                             ` <mailman.5149.1512468235.27995.help-gnu-emacs@gnu.org>
2017-12-05 11:29                               ` Rusi
2017-12-05 11:36                                 ` Emanuel Berg
2017-12-05 14:49                                   ` Kevin Buchs
2017-12-05 19:53                                     ` Emanuel Berg
2017-12-05 23:44                                     ` Dan Hitt
     [not found]                                     ` <mailman.5203.1512517474.27995.help-gnu-emacs@gnu.org>
2017-12-06  3:38                                       ` Rusi
2017-12-06  5:28                                         ` Emanuel Berg
2017-12-06  9:23                                           ` Rusi
2017-12-06  9:40                                             ` Emanuel Berg
2017-12-06 16:54                                               ` Eric S Fraga
     [not found]                                               ` <mailman.5229.1512579276.27995.help-gnu-emacs@gnu.org>
2017-12-07  1:21                                                 ` Emanuel Berg
2017-12-07  2:33                                             ` Dan Hitt
     [not found]                                             ` <mailman.5267.1512614019.27995.help-gnu-emacs@gnu.org>
2017-12-07  4:57                                               ` Rusi
2017-12-09  5:25                                               ` Rusi
     [not found]                                   ` <mailman.5167.1512485401.27995.help-gnu-emacs@gnu.org>
2017-12-05 15:08                                     ` Rusi
2017-12-05 15:47                                   ` Marcin Borkowski
2017-12-05 19:55                                     ` Emanuel Berg
2017-12-05 15:45                             ` Marcin Borkowski
2017-12-05 19:53                               ` Emanuel Berg
2017-12-05  9:56                     ` Eric S Fraga
2017-12-05 11:23                       ` Emanuel Berg
2017-12-05 11:39                         ` tomas
2017-12-05 12:19                         ` Eric S Fraga
2017-12-05 13:32                           ` Emanuel Berg
2017-12-05 13:38                             ` tomas
2017-12-05 13:53                               ` Emanuel Berg
2017-12-05 14:09                                 ` tomas
2017-12-05 20:11                                   ` Emanuel Berg
     [not found]                                 ` <mailman.5165.1512482981.27995.help-gnu-emacs@gnu.org>
2017-12-06  3:37                                   ` Emanuel Berg
2017-12-06  5:55                                     ` Emanuel Berg
2017-12-06  9:03                                       ` tomas
     [not found]                                       ` <mailman.5213.1512550993.27995.help-gnu-emacs@gnu.org>
2017-12-06  9:43                                         ` Emanuel Berg
2017-12-06 10:04                                         ` Emanuel Berg
2017-12-06 13:14                                           ` Rusi
2017-12-07  1:37                                             ` Emanuel Berg
2017-12-06 16:54                                           ` Eric S Fraga
2017-12-05 14:42                               ` Yuri Khan
2017-12-05 15:30                                 ` tomas
2017-12-05 15:50                                 ` Marcin Borkowski
2017-12-05 19:04                             ` Eric S Fraga
2017-12-05  5:09             ` Marcin Borkowski
2017-12-05  5:53               ` Emanuel Berg
2017-12-05  5:08           ` Marcin Borkowski
     [not found]   ` <mailman.4985.1512246680.27995.help-gnu-emacs@gnu.org>
2017-12-03  1:24     ` Dan Espen
2017-12-03  4:58       ` Dan Hitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171203101052.GA29579@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).