org-manual: Document how to activate C++ and D languages

* doc/org-manual.org (Languages): Document how to activate C++ and
  D languages.
This commit is contained in:
Nicolas Goaziou 2018-05-30 12:46:55 +02:00
parent 7ac46c52b7
commit b0e28fa4c6
1 changed files with 64 additions and 56 deletions

View File

@ -17618,29 +17618,29 @@ code block header arguments:
Code blocks in the following languages are supported. Code blocks in the following languages are supported.
| Language | Identifier | Language | Identifier | | Language | Identifier | Language | Identifier |
|------------+--------------+----------------+--------------| |------------+---------------+----------------+--------------|
| Asymptote | =asymptote= | Lua | =lua= | | Asymptote | =asymptote= | Lua | =lua= |
| Awk | =awk= | MATLAB | =matlab= | | Awk | =awk= | MATLAB | =matlab= |
| C | =C= | Mscgen | =mscgen= | | C | =C= | Mscgen | =mscgen= |
| C++ | =C++= | Objective Caml | =ocaml= | | C++ | =C++=[fn:135] | Objective Caml | =ocaml= |
| Clojure | =clojure= | Octave | =octave= | | Clojure | =clojure= | Octave | =octave= |
| CSS | =css= | Org mode | =org= | | CSS | =css= | Org mode | =org= |
| D | =d= | Oz | =oz= | | D | =D=[fn:136] | Oz | =oz= |
| ditaa | =ditaa= | Perl | =perl= | | ditaa | =ditaa= | Perl | =perl= |
| Emacs Calc | =calc= | Plantuml | =plantuml= | | Emacs Calc | =calc= | Plantuml | =plantuml= |
| Emacs Lisp | =emacs-lisp= | Processing.js | =processing= | | Emacs Lisp | =emacs-lisp= | Processing.js | =processing= |
| Fortran | =fortran= | Python | =python= | | Fortran | =fortran= | Python | =python= |
| Gnuplot | =gnuplot= | R | =R= | | Gnuplot | =gnuplot= | R | =R= |
| GNU Screen | =screen= | Ruby | =ruby= | | GNU Screen | =screen= | Ruby | =ruby= |
| Graphviz | =dot= | Sass | =sass= | | Graphviz | =dot= | Sass | =sass= |
| Haskell | =haskell= | Scheme | =scheme= | | Haskell | =haskell= | Scheme | =scheme= |
| Java | =java= | Sed | =sed= | | Java | =java= | Sed | =sed= |
| Javascript | =js= | shell | =sh= | | Javascript | =js= | shell | =sh= |
| LaTeX | =latex= | SQL | =sql= | | LaTeX | =latex= | SQL | =sql= |
| Ledger | =ledger= | SQLite | =sqlite= | | Ledger | =ledger= | SQLite | =sqlite= |
| Lilypond | =lilypond= | Vala | =vala= | | Lilypond | =lilypond= | Vala | =vala= |
| Lisp | =lisp= | | | | Lisp | =lisp= | | |
Additional documentation for some languages is at Additional documentation for some languages is at
https://orgmode.org/worg/org-contrib/babel/languages.html. https://orgmode.org/worg/org-contrib/babel/languages.html.
@ -17755,7 +17755,7 @@ for Python and Emacs Lisp languages.
#+cindex: syntax, Noweb #+cindex: syntax, Noweb
#+cindex: source code, Noweb reference #+cindex: source code, Noweb reference
Org supports named blocks in Noweb[fn:135] style syntax: Org supports named blocks in Noweb[fn:137] style syntax:
: <<CODE-BLOCK-ID>> : <<CODE-BLOCK-ID>>
@ -18255,7 +18255,7 @@ Org Tempo expands snippets to structures defined in
~org-structure-template-alist~ and ~org-tempo-keywords-alist~. For ~org-structure-template-alist~ and ~org-tempo-keywords-alist~. For
example, {{{kbd(< s TAB)}}} creates a code block. Enable it by example, {{{kbd(< s TAB)}}} creates a code block. Enable it by
customizing ~org-modules~ or add ~(require 'org-tempo)~ to your Emacs customizing ~org-modules~ or add ~(require 'org-tempo)~ to your Emacs
init file[fn:136]. init file[fn:138].
#+attr_texinfo: :columns 0.1 0.9 #+attr_texinfo: :columns 0.1 0.9
@ -18511,7 +18511,7 @@ changes.
#+vindex: org-startup-indented #+vindex: org-startup-indented
Dynamic virtual indentation is controlled by the variable Dynamic virtual indentation is controlled by the variable
~org-startup-indented~[fn:137]. ~org-startup-indented~[fn:139].
- =indent= :: - =indent= ::
@ -18843,7 +18843,7 @@ uses only one star and indents text to line with the heading:
#+findex: org-indent-mode #+findex: org-indent-mode
To turn this mode on, use the minor mode, ~org-indent-mode~. Text To turn this mode on, use the minor mode, ~org-indent-mode~. Text
lines that are not headlines are prefixed with spaces to vertically lines that are not headlines are prefixed with spaces to vertically
align with the headline text[fn:138]. align with the headline text[fn:140].
#+vindex: org-indent-indentation-per-level #+vindex: org-indent-indentation-per-level
To make more horizontal space, the headlines are shifted by two stars. To make more horizontal space, the headlines are shifted by two stars.
@ -18878,7 +18878,7 @@ headings as shown in examples below.
#+vindex: org-adapt-indentation #+vindex: org-adapt-indentation
Org supports this with paragraph filling, line wrapping, and Org supports this with paragraph filling, line wrapping, and
structure editing, preserving or adapting the indentation as structure editing, preserving or adapting the indentation as
appropriate[fn:139]. appropriate[fn:141].
- /Hiding leading stars/ :: - /Hiding leading stars/ ::
@ -18912,7 +18912,7 @@ headings as shown in examples below.
#+vindex: org-odd-levels-only #+vindex: org-odd-levels-only
Using stars for only odd levels, 1, 3, 5, ..., can also clean up Using stars for only odd levels, 1, 3, 5, ..., can also clean up
the clutter. This removes two stars from each level[fn:140]. the clutter. This removes two stars from each level[fn:142].
For Org to properly handle this cleaner structure during edits For Org to properly handle this cleaner structure during edits
and exports, configure the variable ~org-odd-levels-only~. To and exports, configure the variable ~org-odd-levels-only~. To
set this per-file, use either one of the following lines: set this per-file, use either one of the following lines:
@ -19490,9 +19490,9 @@ of these strategies:
#+cindex: @LaTeX{}, and Orgtbl mode #+cindex: @LaTeX{}, and Orgtbl mode
To wrap a source table in LaTeX, use the =comment= environment To wrap a source table in LaTeX, use the =comment= environment
provided by =comment.sty=[fn:141]. To activate it, put provided by =comment.sty=[fn:143]. To activate it, put
~\usepackage{comment}~ in the document header. Orgtbl mode inserts ~\usepackage{comment}~ in the document header. Orgtbl mode inserts
a radio table skeleton[fn:140] with the command {{{kbd(M-x a radio table skeleton[fn:142] with the command {{{kbd(M-x
orgtbl-insert-radio-table)}}}, which prompts for a table name. For orgtbl-insert-radio-table)}}}, which prompts for a table name. For
example, if =salesfigures= is the name, the template inserts: example, if =salesfigures= is the name, the template inserts:
@ -19511,7 +19511,7 @@ The line =#+ORGTBL: SEND= tells Orgtbl mode to use the function
~orgtbl-to-latex~ to convert the table to LaTeX format, then insert ~orgtbl-to-latex~ to convert the table to LaTeX format, then insert
the table at the target (receive) location named =salesfigures=. Now the table at the target (receive) location named =salesfigures=. Now
the table is ready for data entry. It can even use spreadsheet the table is ready for data entry. It can even use spreadsheet
features[fn:142]: features[fn:144]:
#+begin_example #+begin_example
% BEGIN RECEIVE ORGTBL salesfigures % BEGIN RECEIVE ORGTBL salesfigures
@ -19726,7 +19726,7 @@ Dynamic blocks, like any other block, can be narrowed with
#+vindex: org-agenda-skip-function #+vindex: org-agenda-skip-function
#+vindex: org-agenda-skip-function-global #+vindex: org-agenda-skip-function-global
Org provides a special hook to further limit items in agenda views: Org provides a special hook to further limit items in agenda views:
~agenda~, ~agenda*~[fn:143], ~todo~, ~alltodo~, ~tags~, ~tags-todo~, ~agenda~, ~agenda*~[fn:145], ~todo~, ~alltodo~, ~tags~, ~tags-todo~,
~tags-tree~. Specify a custom function that tests inclusion of every ~tags-tree~. Specify a custom function that tests inclusion of every
matched item in the view. This function can also skip as much as is matched item in the view. This function can also skip as much as is
needed. needed.
@ -19769,7 +19769,7 @@ meaningful string suitable for the agenda view.
#+vindex: org-agenda-skip-function #+vindex: org-agenda-skip-function
Search for entries with a limit set on levels for the custom search. Search for entries with a limit set on levels for the custom search.
This is a general approach to creating custom searches in Org. To This is a general approach to creating custom searches in Org. To
include all levels, use =LEVEL>0=[fn:144]. Then to selectively pick include all levels, use =LEVEL>0=[fn:146]. Then to selectively pick
the matched entries, use ~org-agenda-skip-function~, which also the matched entries, use ~org-agenda-skip-function~, which also
accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and accepts Lisp forms, such as ~org-agenda-skip-entry-if~ and
~org-agenda-skip-subtree-if~. For example: ~org-agenda-skip-subtree-if~. For example:
@ -20264,13 +20264,13 @@ with Emacs. With a public server, consider encrypting the files.
MobileOrg version 1.5 supports encryption for the iPhone. Org also MobileOrg version 1.5 supports encryption for the iPhone. Org also
requires =openssl= installed on the local computer. To turn on requires =openssl= installed on the local computer. To turn on
encryption, set the same password in MobileOrg and in Emacs. Set the encryption, set the same password in MobileOrg and in Emacs. Set the
password in the variable ~org-mobile-use-encryption~[fn:145]. Note password in the variable ~org-mobile-use-encryption~[fn:147]. Note
that even after MobileOrg encrypts the file contents, the file name that even after MobileOrg encrypts the file contents, the file name
remains visible on the file systems of the local computer, the server, remains visible on the file systems of the local computer, the server,
and the mobile device. and the mobile device.
For a server to host files, consider options like [[http://dropbox.com][Dropbox.com]] For a server to host files, consider options like [[http://dropbox.com][Dropbox.com]]
account[fn:146]. On first connection, MobileOrg creates a directory account[fn:148]. On first connection, MobileOrg creates a directory
=MobileOrg= on Dropbox. Pass its location to Emacs through an =MobileOrg= on Dropbox. Pass its location to Emacs through an
initialisation file variable as follows: initialisation file variable as follows:
@ -20292,15 +20292,15 @@ Org pushes files listed in ~org-mobile-files~ to
~org-mobile-directory~. Files include agenda files (as listed in ~org-mobile-directory~. Files include agenda files (as listed in
~org-agenda-files~). Customize ~org-mobile-files~ to add other files. ~org-agenda-files~). Customize ~org-mobile-files~ to add other files.
File names are staged with paths relative to ~org-directory~, so all File names are staged with paths relative to ~org-directory~, so all
files should be inside this directory[fn:147]. files should be inside this directory[fn:149].
Push creates a special Org file =agendas.org= with custom agenda views Push creates a special Org file =agendas.org= with custom agenda views
defined by the user[fn:148]. defined by the user[fn:150].
Finally, Org writes the file =index.org=, containing links to other Finally, Org writes the file =index.org=, containing links to other
files. MobileOrg reads this file first from the server to determine files. MobileOrg reads this file first from the server to determine
what other files to download for agendas. For faster downloads, what other files to download for agendas. For faster downloads,
MobileOrg only reads files whose checksums[fn:149] have changed. MobileOrg only reads files whose checksums[fn:151] have changed.
** Pulling from MobileOrg ** Pulling from MobileOrg
:PROPERTIES: :PROPERTIES:
@ -20314,7 +20314,7 @@ Org integrates its data in an inbox file format.
1. 1.
#+vindex: org-mobile-inbox-for-pull #+vindex: org-mobile-inbox-for-pull
Org moves all entries found in =mobileorg.org=[fn:150] and appends Org moves all entries found in =mobileorg.org=[fn:152] and appends
them to the file pointed to by the variable them to the file pointed to by the variable
~org-mobile-inbox-for-pull~. Each captured entry and each editing ~org-mobile-inbox-for-pull~. Each captured entry and each editing
event is a top-level entry in the inbox file. event is a top-level entry in the inbox file.
@ -21332,29 +21332,37 @@ it is recommended to set this header only on a per-block basis. It is
possible that this aspect of the implementation might change in the possible that this aspect of the implementation might change in the
future. future.
[fn:135] For Noweb literate programming details, see [fn:135] C++ language is handled in =ob-C.el=. Even though the
identifier for such source blocks is =C++=, you activate it by loading
the C language.
[fn:136] D language is handled in =ob-C.el=. Even though the
identifier for such source blocks is =D=, you activate it by loading
the C language.
[fn:137] For Noweb literate programming details, see
http://www.cs.tufts.edu/~nr/noweb/. http://www.cs.tufts.edu/~nr/noweb/.
[fn:136] For more information, please refer to the commentary section [fn:138] For more information, please refer to the commentary section
in =org-tempo.el=. in =org-tempo.el=.
[fn:137] Note that ~org-indent-mode~ also sets the ~wrap-prefix~ [fn:139] Note that ~org-indent-mode~ also sets the ~wrap-prefix~
property, such that ~visual-line-mode~ (or purely setting ~word-wrap~) property, such that ~visual-line-mode~ (or purely setting ~word-wrap~)
wraps long lines (including headlines) correctly indented. wraps long lines (including headlines) correctly indented.
[fn:138] The ~org-indent-mode~ also sets the ~wrap-prefix~ correctly [fn:140] The ~org-indent-mode~ also sets the ~wrap-prefix~ correctly
for indenting and wrapping long lines of headlines or text. This for indenting and wrapping long lines of headlines or text. This
minor mode handles ~visual-line-mode~ and directly applied settings minor mode handles ~visual-line-mode~ and directly applied settings
through ~word-wrap~. through ~word-wrap~.
[fn:139] Also see the variable ~org-adapt-indentation~. [fn:141] Also see the variable ~org-adapt-indentation~.
[fn:140] Because =LEVEL=2= has 3 stars, =LEVEL=3= has 4 stars, and so [fn:142] Because =LEVEL=2= has 3 stars, =LEVEL=3= has 4 stars, and so
on. on.
[fn:141] https://ctan.org/tex-archive/macros/latex/contrib/comment?lang=en [fn:143] https://ctan.org/tex-archive/macros/latex/contrib/comment?lang=en
[fn:142] If the =TBLFM= keyword contains an odd number of dollar [fn:144] If the =TBLFM= keyword contains an odd number of dollar
characters, this may cause problems with Font Lock in LaTeX mode. As characters, this may cause problems with Font Lock in LaTeX mode. As
shown in the example you can fix this by adding an extra line inside shown in the example you can fix this by adding an extra line inside
the =comment= environment that is used to balance the dollar the =comment= environment that is used to balance the dollar
@ -21362,32 +21370,32 @@ expressions. If you are using AUCTeX with the font-latex library,
a much better solution is to add the =comment= environment to the a much better solution is to add the =comment= environment to the
variable ~LaTeX-verbatim-environments~. variable ~LaTeX-verbatim-environments~.
[fn:143] The ~agenda*~ view is the same as ~agenda~ except that it [fn:145] The ~agenda*~ view is the same as ~agenda~ except that it
only considers /appointments/, i.e., scheduled and deadline items that only considers /appointments/, i.e., scheduled and deadline items that
have a time specification =[h]h:mm= in their time-stamps. have a time specification =[h]h:mm= in their time-stamps.
[fn:144] Note that, for ~org-odd-levels-only~, a level number [fn:146] Note that, for ~org-odd-levels-only~, a level number
corresponds to order in the hierarchy, not to the number of stars. corresponds to order in the hierarchy, not to the number of stars.
[fn:145] If Emacs is configured for safe storing of passwords, then [fn:147] If Emacs is configured for safe storing of passwords, then
configure the variable, ~org-mobile-encryption-password~; please read configure the variable, ~org-mobile-encryption-password~; please read
the docstring of that variable. the docstring of that variable.
[fn:146] An alternative is to use a WebDAV server. MobileOrg [fn:148] An alternative is to use a WebDAV server. MobileOrg
documentation has details of WebDAV server configuration. Additional documentation has details of WebDAV server configuration. Additional
help is at this [[https://orgmode.org/worg/org-faq.html#mobileorg_webdav][FAQ entry]]. help is at this [[https://orgmode.org/worg/org-faq.html#mobileorg_webdav][FAQ entry]].
[fn:147] Symbolic links in ~org-directory~ need to have the same name [fn:149] Symbolic links in ~org-directory~ need to have the same name
as their targets. as their targets.
[fn:148] While creating the agendas, Org mode forces ID properties on [fn:150] While creating the agendas, Org mode forces ID properties on
all referenced entries, so that these entries can be uniquely all referenced entries, so that these entries can be uniquely
identified if MobileOrg flags them for further action. To avoid identified if MobileOrg flags them for further action. To avoid
setting properties configure the variable setting properties configure the variable
~org-mobile-force-id-on-agenda-items~ to ~nil~. Org mode then relies ~org-mobile-force-id-on-agenda-items~ to ~nil~. Org mode then relies
on outline paths, assuming they are unique. on outline paths, assuming they are unique.
[fn:149] Checksums are stored automatically in the file [fn:151] Checksums are stored automatically in the file
=checksums.dat=. =checksums.dat=.
[fn:150] The file will be empty after this operation. [fn:152] The file will be empty after this operation.