Commit Graph

24483 Commits

Author SHA1 Message Date
Bastien a7e4339f68 etc/ORG-NEWS: Fix section title 2021-09-29 14:29:11 +02:00
Bastien 0a86adc127 lisp/org.el: Set version header to 9.5 2021-09-29 14:24:53 +02:00
Bastien 80b2aa41e1 Fix 1d5e41d41 2021-09-29 14:17:04 +02:00
Bastien 1344911585 lisp/ob-R.el: Fix compiler warnings 2021-09-29 14:16:47 +02:00
Bastien 1d5e41d41b lisp/ob-core.el (org-babel-eval-headers): Fix elements ordering
* lisp/ob-core.el (org-babel-eval-headers): Fix elements ordering.
(org-babel-merge-params): Tiny refactoring.

This fixes the test `test-ob-lob/call-with-header-arguments' that
fails after 9f1507bdd.
2021-09-29 14:05:10 +02:00
Ihor Radchenko 32b9251886 Parse titleless headlines with a tag correctly
* lisp/org-element.el (org-element-headline-parser): Do not treat tag
as headline title in headlines like "* :tag:".
2021-09-29 13:25:44 +02:00
Bastien 31929f539c Merge branch 'bugfix' 2021-09-29 13:19:55 +02:00
Jonathan Gregory e4c0281d23 Set the MIDI file extension conditionally
* lisp/ob-lilypond.el (org-babel-lilypond-attempt-to-play-midi): By
default, LilyPond outputs .mid files for Windows and .midi for
everything else.

See: <https://lists.gnu.org/r/emacs-orgmode/2021-08/msg00379.html>

TINYCHANGE
2021-09-29 13:19:44 +02:00
Juan Manuel Macías cb408a550a etc/ORG-NEWS: Remove a spurious phrase 2021-09-29 13:14:23 +02:00
Bastien 33799db8c2 doc/org-manual.org: End sentences with two spaces, fix indentation 2021-09-29 13:04:10 +02:00
Juan Manuel Macías 6dcddb1b6f doc/org-manual.org: Fix Shakespeare's sonnet
* doc/org-manual.org (Verse blocks in LaTeX export): The previous
version of Shakespeare's sonnet is replaced by the version included in
Wikipedia (Shakespeare, William. Duncan-Jones, Katherine. Shakespeare’s
Sonnets. Bloomsbury Arden 2010. p. 113).
* etc/ORG-NEWS (Support verse blocks in LaTeX export): The last
sentence is superfluous.  There is no explanation below.
2021-09-29 13:00:24 +02:00
Bastien 8db21e6cb3 Remove and update Makefiles as contrib/ has been moved out 2021-09-29 10:08:20 +02:00
Bastien 806ac1b7f6 *el: Fix indentation 2021-09-29 09:22:47 +02:00
Matt Huszagh 9f1507bdd1 ob-core.el: Add ability to use closures as default header arguments
* lisp/ob-core.el (org-babel-default-header-args): Document ability to
use closures.
(org-babel-eval-headers): New function to generate header arguments,
which adds the ability to evaluate closures during source block
execution or export.
(org-babel-merge-params): Only evaluate closures when we have our
final list of headers.
2021-09-29 09:19:05 +02:00
Bastien a5e8dfaf5b Revert "ob-core.el: Add ability to use closures as default header arguments"
This reverts commit 78783f4e47.
2021-09-29 09:18:48 +02:00
Yasushi SHOJI 3a291b0f0e ox-publish.el: Add `org-html-publish-to-html' as the default publishing function
* lisp/org-macs.el (org-plist-delete-all): New function.

* lisp/ox-publish.el (org-publish-file): Add
`org-html-publish-to-html' as the default publishing function.

* testing/lisp/test-ox-publish.el (org-test-publish): Use
`org-plist-delete-all' to remove properties from the plist.

Reported-by: Christopher W. Ryan
See <https://list.orgmode.org/CAELBRWLgV-s6SGX=cevtN7iW8htwiLezR469T-cGMWE_6iX1+A@mail.gmail.com>
2021-09-29 09:14:43 +02:00
Bastien 7e1745d744 lisp/ob-julia.el: Fix copyright header 2021-09-29 09:02:44 +02:00
András Simonyi 158332224d doc/org-manual.org: Remove a couple of stray words
* doc/org-manual.org (Citation handling): Remove a pair of unnecessary words.
2021-09-29 08:55:58 +02:00
Bastien 45bfe69da1 etc/ORG-NEWS: Add a note about "Compatibility with Emacs versions" 2021-09-29 08:55:19 +02:00
Bastien 519947e508 * lisp/org.el: Require Emacs 25.1.
lisp/org.el: Require Emacs 25.1

See https://orgmode.org/worg/org-maintenance.html#emacs-compatibility
2021-09-29 08:52:04 +02:00
Nicholas Vollmer b41f2971ab org-id: Fix checkdoc warnings
* org-id: Fix checkdoc warnings.
2021-09-29 08:50:06 +02:00
Bastien 005bba5348 etc/ORG-NEWS: Add news item about org-babel-default-header-args accepting closures 2021-09-29 08:48:06 +02:00
Kyle Meyer 1292d89c37 Clean up spacing to pass Emacs's pre-commit check
* lisp/org-agenda.el (org-agenda-highlight-todo):
(org-agenda-set-mode-name):
* lisp/org-table.el (org-table-eval-formula): Avoid space before tab in
indent.

This is in preparation for syncing with the Emacs repo.
2021-09-29 00:37:30 -04:00
Kyle Meyer d3add14461 ORG-NEWS: Drop an incomplete thought
This is flagged by Emacs's pre-commit hook due to trailing whitespace.
But the line looks incomplete, so just deleted the line.
2021-09-29 00:37:06 -04:00
Kyle Meyer d4105060d2 orgcard.tex: Use en-dash for copyright years
This matches what's in the Emacs tree (and generated automatically by
admin/update-copyright).
2021-09-29 00:15:06 -04:00
Kyle Meyer 5ed40ab266 ORG-NEWS: Clean up leftover conflicts
The merge in e64d5bcc6 (Merge branch 'bugfix', 2021-09-25) left
several unresolved conflicts.  One was cleaned up later in db67c7e92
(Move some ob-*el files to the new org-contrib repo, 2021-09-26).
Take care of the other ones.
2021-09-29 00:03:17 -04:00
András Simonyi b96aae4684 oc-csl: Refactor code to help byte-compilation
* lisp/oc-csl.el (org-cite-csl--create-structure-params): Refactor pcase pattern
to avoid slow or in some cases non-terminating byte compilation.
2021-09-28 18:55:01 +02:00
Jeremie Juste 72a48c306f ob-R.el: Patch async evaluation when :results output
* lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session):
Make sure that `ess-inject-source' is set to the default
'function-and-buffer before running `ess-eval-buffer'.  Return
`ess-inject-source' to its user-specified state afterwards.
2021-09-28 18:22:18 +02:00
Jeremie Juste 01557eef57 ob-R.el: Patch async evaluation when :results output
* lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session): Make
sure that `ess-eval-visibly' is nil before evaluating the temporary
buffer, but return ess-eval-visibly to it's original state afterwards.
2021-09-28 18:22:15 +02:00
Jeremie Juste 51a60cd53f lisp/ob-R: Async evaluation in R
* lisp/ob-R.el (ob-session-async-R-indicator): Add constant
representing a prefix R to identity session.
(ob-session-async-org-babel-R-evaluate-session): New function to
evaluate R src block asynchrously.
(ob-session-async-R-value-callback): New function that calls back
the result of the asynchronous evaluation.
(org-babel-R-evaluate): Add `async' parameter and call
`ob-session-async-org-babel-R-evaluate-session' if `async'
parameter is present.
(org-babel-execute:R): Call `org-babel-comint-use-async' to check
if async is among `params' and add async parameter to
`org-babel-R-evaluate'.

* testing/lisp/test-ob-R.el: Add 7 more tests for async
evaluations, also taken from the `ob-session-async' package.

This is almost a carbon copy of Jack Kamm's `ob-session-async'.
The original source code can be found
https://github.com/jackkamm/ob-session-async.

Please refer to the following thread to trace back the discussion
on async evaluation in R:

https://list.orgmode.org/87eed9g9p6.fsf@gmail.com/
2021-09-28 18:22:12 +02:00
Bastien 93d7825d55 lisp/org.el (visual-fill-column-width): Silence compiler warning
* lisp/org.el (visual-fill-column-width): Silence compiler warning.
2021-09-28 17:31:18 +02:00
TEC 8130147958 ox-org: Use lower case keywords
* lisp/ox-org.el (org-org-identity, org-org-template): As it has
previously been clarified on the mailing list that upper-case keywords
are only intended for the manual[1], an Org export of an Org file should
use lower-case keywords.

[1]: https://list.orgmode.org/87tuuw3n15.fsf@nicolasgoaziou.fr/
2021-09-28 17:27:55 +02:00
András Simonyi 9e2341bc65 oc-csl: Add support for the text and year citation styles
* lisp/oc-csl.el (org-cite-csl--create-structure-params): Introduce this new
function to map the extended list of supported citation styles and variants to
the corresponding citeproc-el citation structure creation parameters.
(org-cite-csl--no-affixes-p, org-cite-csl--capitalize-p,
org-cite-csl--no-author-p): Remove them since their functionality is provided
now by `org-cite-csl--create-structure-params'.
(org-cite-csl--parse-reference): Don't generate `suppress-author' cite
information as that is treated now by citeproc-el as a citation style.
(org-cite-csl--create-structure): Use `org-cite-csl--create-structure-params' to
generate style-dependent citation structure parameters.
2021-09-28 16:39:10 +02:00
Nicholas Vollmer 3f1bf8c1f6 org-capture: Fix checkdoc warnings
* org-capture: Fix checkdoc warnings.
2021-09-28 07:36:28 +02:00
Bastien 8d4a88b8d9 lisp/ob-stan.el: Delete
* lisp/ob-stan.el: Delete.

ob-stan.el has been move to https://git.sr.ht/~bzg/org-contrib and
will be maintained on https://git.kyleam.com/ob-stan in the future.
2021-09-28 07:03:53 +02:00
Bruce D'Arcus 3b4ab1c3e4 doc/org-manual.org (Citations): Enhance
* doc/org-manual.org (Citations): Enhance.

This is based on a preliminary draft provided by Emmanuel Charpentier.
2021-09-28 06:59:20 +02:00
Bastien 20c3b0e436 mk/server.mk: Also copy orgguide.html
* mk/server.mk (doc-up): Also copy orgguide.html.
2021-09-27 21:59:23 +02:00
TEC 663255e25e org: Remove obsolete default LaTeX packages
* lisp/org.el (org-latex-default-packages-alist): Remove grffile and
textcomp from the list of default LaTeX packages to load, as they've
been obsolete for quite a few years now.

* etc/ORG-NEWS: Announce the removal of grffile and textcomp from
`org-latex-default-packages-alist'.
2021-09-27 18:40:08 +02:00
Max Nikulin 6300e0ebef test-org-protocol.el: Decode "+" to " " tests
testing/lisp/test-org-protocol.el
(test-org-protocol/org-protocol-store-link)
(test-org-protocol/org-protocol-capture): Cases to check that "+" is
decoded to space in query parameters (new style of URIs) but preserved
in path components (old style of org-protocol links).
2021-09-27 17:52:03 +02:00
Max Nikulin 09dc3fa304 org-protocol.el: decode "+" in query part as space
* lisp/org-protocol.el (org-protocol-convert-query-to-plist):
Replace "+" chars by spaces before passing parameter string
to decoder.  Allow making org-protocol URIs with help of URLSearchParams
JavaScript class.
* lisp/org-protocol.el doc/org-manual.org etc/ORG-NEWS: Add examples
demonstrating new opportunity for browser bookmarklets.

Make parsing of URI parameters a bit closer to URL standard
https://url.spec.whatwg.org/#urlencoded-parsing
2021-09-27 17:50:49 +02:00
Bastien c80fea7355 lisp/oc.el: Fix docstring wrapping
* lisp/oc.el (org-cite-parse-elements): Fix docstring wrapping.
2021-09-27 17:23:21 +02:00
Ihor Radchenko db167b9999
Do not use mark-whole-buffer noninteractively
* lisp/org.el (org-fill-element): `mark-whole-buffer' introduced in
7b85a64da is only for interactive use and causes compiler warning.
Replace it using noninteractive commands.
2021-09-27 22:31:01 +08:00
Ihor Radchenko 14fb761d78
Do not use mark-whole-buffer noninteractively
* lisp/org.el (org-fill-element): `mark-whole-buffer' introduced in
7b85a64da is only for interactive use and causes compiler warning.
Replace it using noninteractive commands.
2021-09-27 22:28:45 +08:00
Bastien 981bcbfc14 Merge branch 'bugfix' 2021-09-27 14:47:41 +02:00
Bastien d13556e5ed lisp/org.el (org-return): Enable `delete-selection'
* lisp/org.el (org-return): Enable `delete-selection'.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
<https://list.orgmode.org/87zgvz6lz7.fsf@gmail.com/>
2021-09-27 14:47:11 +02:00
Bastien 4594423811 doc/org-manual.org: Fix typo
* doc/org-manual.org (Citation handling): Fix typo.
2021-09-27 14:32:52 +02:00
TEC c12a159094
ORG-NEWS: Mention proportional image width display 2021-09-27 20:18:56 +08:00
TEC c90f96c00d
org: Support displaying X% width images
* lisp/org.el (org-display-inline-image--width): Instead of interpreting
an image :width of X% as X pixels, take it as X% of the text width of
the buffer.
2021-09-27 20:18:50 +08:00
TEC c76a7eed23
org: Refactor width in `org-display-inline-images'
* lisp/org.el (org-display-inline-images,
org-display-inline-image--width): Extract the width determination in
`org-display-inline-images' into a new function
`org-display-inline-image--width' where I have taken the opportunity to
refactor the width-determination code.
2021-09-27 20:17:49 +08:00
TEC e816ae1ff5
org: Display proportional image widths
* lisp/org.el (org-display-inline-images): When the image width is given
as a float less than 2, interpret the value as that portion of the text
area width.  This works well with cases such as "#+attr_latex: :width
0.6\linewidth" as this will now be interpreted as 60% of the text area
width.  The upper bound is set to 2 not 1, as more than 100% of the text
width can be realistic, e.g. "1.2\linewidth" in LaTeX, but more than
200% seems unrealistic.
2021-09-27 19:57:57 +08:00