ob-R.el: allow use of alternative graphics devices

* lisp/ob-R.el (org-babel-R-graphics-devices): New defvar.
(org-babel-R-construct-graphics-device-call): Use it instead of a
hard-coded list of graphics devices.

The `org-babel-R-graphics-devices' variable now holds the association
between graphics file types and R functions.  This allows users by
modifying this alist to choose to use e.g. the Cairo* functions from the
R package “Cairo” or one of several alternative devices for SVG
output (SVGAnnotation, RSVGTipsDevice).
org-id.el (org-id-locations-save): Bind print-(level,length) to nil

* lisp/org-id.el (org-id-locations-save): Bind print-(level,length) to
nil in this function.

Having these variables set to non-nil values results in an unreadable
result being written to `org-id-locations-file'.
ob-core.el (org-babel-execute-src-block): fixes for :results none

* lisp/ob-core.el (org-babel-execute-src-block): Return nil in case of
`:results none'.  Also run `org-babel-after-execute-hook' in this
circumstance.

Previously, the code returned the string "results silenced" in the case
of =:results none=, as this is the return value of the call to
`message'; additionally, the after-execute hook was not being run.
Add 'light argument to some uses of org-babel-get-src-block-info

* lisp/ob-core.el (org-babel-do-key-sequence-in-edit-buffer)
(org-babel-expand-noweb-references)
* lisp/ob-tangle.el (org-babel-tangle): Use 'light argument to
`org-babel-get-src-block-info'.
Fix checkbox creation in numbered lists

* lisp/org.el (org-insert-heading): Check for checkbox at the
  beginning of the item, not just at the beginning of the line.

Without this fix, M-RET in numbered lists would create a checkboxed
item because it was using match data from a previous match.  Now we
make sure we go back to the beginning of the item, so that the match
really tells us if there was a checkbox there.
Merge branch 'master' of orgmode.org:org-mode
Merge branch 'master' of orgmode.org:org-mode
Fix insert-heading

* lisp/org.el (org-insert-heading): Fix problem with inserting
  heading.

The commit fixes a bug introduced in bb2022.
ox-koma-letter: Use same hotkeys as LaTeX export

  * ox-koma-letter.el (koma-letter): Use `L' to export to LaTeX
  buffer, `l' to export to LaTeX file, and `o' to export to PDF
  file and open.

Patch suggested by Rasmus.

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
ox-koma-letter.el: Set LCO option before other KOMA variables

  * ox-koma-letter.el (org-koma-letter-closing): More
  business-like closing.
  (org-koma-letter-from-address): Do not set default personal
  information.
  (org-koma-letter-opening): Gendered opening.
  (org-koma-letter-phone-number): Do not set default personal
  information.
  (org-koma-letter-sender): Use `#+SENDER:' instead of
  `#+AUTHOR:' because the latter is always set by the LaTeX
  exporter.
  (org-koma-letter-email): Duplicte `#+EMAIL:' in this exporter
  because it is always set by the LaTeX exporter.
  (koma-letter): Add additional `#+SENDER:' and `#+EMAIL:' to
  exporter (see above).
  (org-koma-letter-template): Set LCO before evaluating other
  KOMA variables if they are set; add `#+SENDER:' and `#+EMAIL:'
  to template (see above).

The LCO file is set loaded first and KOMA variables are only set if
their value is not `nil'.

Example:

  #+LCO: Default
  #+SIGNATURE: A friend

will result in the following LaTeX code:

  #+BEGIN_SRC latex
  \LoadLetterOption{Default}        % LCO file, with default signature
  \setkomavar{signature}{A friend}  % Overwrite signature
  #+END_SRC

Other KOMA variables defined in the LCO file, e.g., `fromaddress', will
not be overwritten.

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
ox-koma-letter: Export options to control letter

  * ox-koma-letter.el ((org-koma-letter-use-subject):
  Configure printing of subject line.
  (org-koma-letter-use-backaddress): Configure presence of back
  address.
  (org-koma-letter-use-foldmarks): Configure presence of foldmarks.
  (org-koma-letter-use-phone): Configure printing of phone number.
  (org-koma-letter-use-email): Configure printing of email.
  (org-koma-letter-use-place): Configure printing of place.
  (koma-letter): Add export option to exporter backend.
  (org-koma-letter-template): Evaluate export options in
  exporter template.

Usage:

  #+OPTIONS: backaddress:t foldmarks:t subject:titled phone:t email:t place:t

Except for `subject', all options are boolean, i.e., the accept the
values `nil' and `t'. `subject' accepts the values defined in
`scrlttr2`, i.e., `afteropening', `beforeopening', `centered', `left',
`right', `titled', `underlined', and `untitled'.

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
ox-koma-letter.el: Support multiple LCO files

  * ox-koma-letter.el (org-koma-letter-template): Treat `#+LCO:'
  variable as a list of multiple LCO files separated by spaces.

Example:

  #+LCO: Default Signed

will result in the following LaTeX fragment

  #+BEGIN_SRC latex
  \LoadLetterOption{Default}
  \LoadLetterOption{Signed}
  #+END_SRC

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
ox-taskjuggler.el: Add a command to process and open an exported file for tj3

* ox-taskjuggler.el (org-taskjuggler-process-command)
(org-taskjuggler-reports-directory): Add a defcustom to define
the tj3 command and the directory where the reports are to be
generated.
(org-taskjuggler-export-and-process)
(org-taskjuggler-export-process-and-open): Split the command
so that you can now process and open in separate commands.
(org-taskjuggler-compile): New function to process a tjp file
using org-taskjuggler-process-command.

Finally we have support for processing and opening the exported file
with tj3.  For TaskJuggler 2.4 this always worked. Now it also works
for tj3.  `org-taskjuggler-export-and-process' exports the file and
runs it through tj3.  `org-taskjuggler-export-process-and-open'
additionally opens the reports in a browser.
ox-taskjuggler.el: Add a TODO to support org-export-with-planning

* ox-taskjuggler.el: Add a TODO to support org-export-with-planning.
ox-texinfo: Default to buffer-file-coding-system when exporting

* lisp/ox-texinfo.el (org-texinfo-coding-system): Clarify default
  setting.
  (org-texinfo-template): Ensure buffer-file-coding-system is used
  when org-texinfo-coding-system is not set.