Commit Graph

721 Commits

Author SHA1 Message Date
Juan Manuel Macías cb408a550a etc/ORG-NEWS: Remove a spurious phrase 2021-09-29 13:14:23 +02:00
Bastien 45bfe69da1 etc/ORG-NEWS: Add a note about "Compatibility with Emacs versions" 2021-09-29 08:55:19 +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 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 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
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
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 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
TEC c12a159094
ORG-NEWS: Mention proportional image width display 2021-09-27 20:18:56 +08:00
Bastien 593740cad2 etc/ORG-NEWS: Mention the citation engine and reorder items 2021-09-27 12:47:01 +02:00
Protesilaos Stavrou 2aa2615de5 Document new agenda faces in the ORG-NEWS 2021-09-26 14:45:07 +02:00
Bastien db67c7e923 Move some ob-*el files to the new org-contrib repo
* lisp/ob-vala.el:
* lisp/ob-shen.el:
* lisp/ob-picolisp.el:
* lisp/ob-mscgen.el:
* lisp/ob-ledger.el:
* lisp/ob-io.el:
* lisp/ob-hledger.el:
* lisp/ob-ebnf.el:
* lisp/ob-coq.el:
* lisp/ob-asymptote.el:
* lisp/ob-abc.el:
* lisp/ob-J.el: Delete.

See https://list.orgmode.org/87bl9rq29m.fsf@gnu.org/
2021-09-26 14:00:09 +02:00
Bastien e64d5bcc61 Merge branch 'bugfix' 2021-09-25 15:18:38 +02:00
TEC 4a11766cac docs: Update outdated code.orgmode.org links
* CONTRIBUTE, docs/org-manual.org, docs/ORG-NEWS: Replace mentions
of https://code.orgmode.org with references to the new repository
on Savannah (https://git.savannah.gnu.org).
2021-09-25 15:13:25 +02:00
Marco Wahl 4063d4c2d7 org: Rename for more consistency
* lisp/org.el (org-get-previous-sibling): Rename from
  org-get-last-sibling to be more consistent with the rest of Emacs.
  org-get-last-sibling stays as obsolete alias.
2021-09-20 00:27:02 +02:00
Stefan Kangas 215d80d02b
Fix a small number of typos 2021-09-17 17:01:57 +08:00
Marco Wahl 81eb8c5f9e attach: Fix for Emacs<28
* lisp/org-compat.el: Introduce org-directory-empty-p which is directory-empty-p from Emacs 28.
* lisp/org-attach.el (org-attach-sync): Use org-directory-empty-p instead of directory-empty-p.
* etc/ORG-NEWS: Note about org-directory-empty-p.

Thanks Kyle identifying the issue.  Thanks Arthur for suggesting a
fix.
2021-08-10 22:20:48 +02:00
Marco Wahl 61e0837325 org-attach: Possibly delete empty attach directory
* lisp/org-attach.(org-attach-sync): Enable possible deletion of empty
attachment directories.  `org-attach-sync-delete-empty-dir' controls
the action: Never delete, Always delete or Query the user (default).
2021-07-09 21:03:44 +02:00
Allen Li 622f9fa76c org: Use crm for completing tags
* lisp/org-capture.el (org-capture-fill-template): Changed to use
completing-read-multiple.
* lisp/org.el (org-set-tags-command): Changed to use
completing-read-multiple.
(org-change-tag-in-region): Changed to use a simple completion table.
* testing/lisp/test-org.el (test-org/set-tags-command): Fixed tests.

Change various places which use `completing-read' to read tags using a
custom completion function to instead use `completing-read-multiple'
with a completion table instead.

This makes tab completion play better with alternative completion
frameworks such as vertico, selectrum, etc.

`org-change-tag-in-region' only reads a single tag, so it is changed
to use a completion table with `completing-read'.  This also makes it
play better with alternative completion frameworks.

Note that there is still one use for `org-tags-completion-function',
which is for completing tag matches.  Completing tag matches is
different from completing lists of tags since the separators (+, -,
etc) have semantic meaning.  This commit does not address that use
case.
2021-07-09 08:44:32 +02:00
Eric S Fraga d1900adfbe ol-bibtex: Added url and doi as optional entries for BiBTeX export
* lisp/ol-bibtex.el: :doi and :url entries added to optional list of
entries to export to BiBTeX when present in the properties.

* etc/ORG-NEWS: added news item noting this change.
2021-07-01 23:15:22 +02:00
Bastien 5c07b279e0 etc/ORG-NEWS: Document the addition of ox-koma-letter.el 2021-06-24 11:13:15 +02:00
Juan Manuel Macias f4aac6090d ox-latex: add LaTeX attributes to quote block
* doc/org-manual.org (Quote blocks in LaTeX export): manual updated
* etc/ORG-NEWS (Support quote blocks in LaTeX export): news updated
* lisp/ox-latex.el (latex): add `org-latex-default-quote-environment' to `:options-alist'
(org-latex-default-quote-environment): the default quote environment
is `quote'
(org-latex-quote-block): add two attributes: `environment' and `options'
2021-05-29 22:21:59 +02:00
Maxim Nikulin 507cf71de2 etc/ORG-NEWS: Suggest against disabling `electric-indent-mode'
* etc/ORG-NEWS (~org-adapt-indentation~ now defaults to =nil=):
Suggest against disabling `electric-indent-mode'.
2021-05-20 14:24:54 +02:00
Jack Kamm 53fd5b774e ob-comint.el, ob-python.el: Async session evaluation
Adds functionality to ob-comint.el to implement async session eval on
a per-language basis.  Adds a reference implementation for ob-python.

* lisp/ob-comint.el (org-babel-comint-with-output): Remove comment.
(org-babel-comint-async-indicator, org-babel-comint-async-buffers,
org-babel-comint-async-file-callback,
org-babel-comint-async-chunk-callback,
org-babel-comint-async-dangling): Add buffer-local variables used for
async comint evaluation.
(org-babel-comint-use-async): Add function to determine whether block
should be evaluated asynchronously.
(org-babel-comint-async-filter): Add filter function to attach to
comint-output-filter-functions for babel async eval.
(org-babel-comint-async-register): Add function to setup buffer
variables and hooks for session eval.
(org-babel-comint-async-delete-dangling-and-eval): Add helper function
for async session eval.

* lisp/ob-python.el (org-babel-execute:python): Check for async header
argument.
(org-babel-python-evaluate): Check whether to use async evaluation.
(org-babel-python-async-indicator): Add constant for indicating the
start/end of async evaluations.
(org-babel-python-async-evaluate-session): Add function for Python
async eval.

*
testing/lisp/test-ob-python.el (test-ob-python/async-simple-session-output):
Unit test for Python async session eval.
(test-ob-python/async-named-output): Unit test that Python async eval
can replace named output.
(test-ob-python/async-output-drawer): Unit test that Python async eval
works with drawer results.
2021-05-18 09:13:28 -07:00
Bastien c77066dd7f etc/ORG-NEWS: Add a news entry about ditaa.jar not being bundled 2021-05-16 09:54:28 +02:00
Juan Manuel Macías df9b509a6c lisp/org-attach-git.el: New option `org-attach-git-dir'
* lisp/org-attach-git.el (org-attach-git-dir): New option to allow
using the attachment directory of the current node as a Git
repository, if correctly initialized.
(org-attach-git-use-annex, org-attach-git-annex-get-maybe)
(org-attach-git-commit): Use the new option.

* etc/ORG-NEWS: Announce the new option.

Link: https://orgmode.org/list/87y2g8rj7s.fsf@posteo.net/
2021-05-15 16:13:49 +02:00
Bastien 83ab852478 etc/ORG-NEWS: Various enhancements 2021-05-15 16:13:49 +02:00
Thomas S. Dye ee40458d00 lisp/ox-latex.el: Allow arbitrary float environments
* lisp/ox-latex.el (org-latex--inline-image)
(org-latex--decorate-table): Recognize arbitrary :float value.

* etc/ORG-NEWS: Announce new :float capability.

LaTeX users are able to define arbitrary float types.
This patch makes them accessible from Org mode.
2021-05-15 16:13:49 +02:00
Adam Spiers 33027f992d New command `org-refile-reverse' bound to C-c C-M-w
* lisp/org-refile.el (org-refile-reverse): New command.

* lisp/org-keys.el (org-mode-map): Bind C-c C-M-w to
`org-refile-reverse'.

* doc/org-manual.org (Refile and Copy): Document
`org-refile-reverse'.

* etc/ORG-NEWS (New command ~org-refile-reverse~ (=C-c C-M-w=)):
Announce the new command.

Link: https://orgmode.org/list/20200830001047.21362-1-orgmode@adamspiers.org/
2021-05-15 16:13:49 +02:00
Bastien 0a651b7469 lisp/org.el (org-adapt-indentation): Use nil by default
* etc/ORG-NEWS: Announce the new value of nil for
`org-adapt-indentation'.

* lisp/org.el (org-adapt-indentation): Use nil by default.

Link: https://orgmode.org/list/878s4x3bwh.fsf@gnu.org/
2021-05-05 09:52:50 +02:00
Bastien d48276b894 Replace `org-speed-commands-user' by `org-speed-commands'
* etc/ORG-NEWS: Announce `org-speed-commands'.

* doc/org-manual.org (Speed Keys): Document `org-speed-commands'
instead of `org-speed-commands-user'.

* lisp/org-compat.el (org-speed-commands-user): Make an obsolete
variable.

* lisp/org-keys.el (org-speed-commands-user): Remove.
(org-speed-commands): Rename from `org-speed-commands-default' and
make a defcustom.  Add the docstring of `org-speed-commands-user'.
(org-speed-command-help): Throw a message about obsolete option
`org-speed-commands-user' when set in the user configuration.
(org-speed-command-activate): Update docstring.

Link: https://orgmode.org/list/87eeep3c1u.fsf@bzg.fr/
2021-05-03 16:30:04 +02:00
Bastien e80be06236 etc/ORG-NEWS: Announce that contrib/ lives in a separate repository 2021-05-03 13:15:16 +02:00
Bastien d3b6cdbf37 etc/ORG-NEWS: Use https instead of http when available 2021-05-02 07:59:07 +02:00
Alan D. Salewski a2403321ac etc/ORG-NEWS: Announce clocktable per-file time percentages (':formula %')
* etc/ORG-NEWS: New entry announcing clocktable calculation and
display of per-file time percentages, when ':formula %' is used.

TINYCHANGE

Signed-off-by: Alan D. Salewski <ads@salewski.email>
2021-05-01 16:55:43 +02:00
TEC c1a5f5c155
etc/ORG-NEWS: LaTeX env #+results now removed 2021-05-01 19:43:05 +08:00
Bastien Guerry 40c7ddb4ec etc/ORG-NEWS: Add a new :refile-targets template option
* etc/ORG-NEWS: Add a new :refile-targets template option.
2021-05-01 13:13:31 +02:00
Bastien Guerry 67db2f5e46 etc/ORG-NEWS: Announce fontification support of inline export snippets 2021-05-01 12:01:23 +02:00
Bastien Guerry bb24248b82 lisp/ox-html.el: Set `org-html-head-include-scripts' to nil
* lisp/ox-html.el (org-html-scripts): Enhance docstring.
(org-html-head-include-scripts): Default to nil and enhance docstring.

Link: https://orgmode.org/list/498dbe2e-0cd2-c81e-7960-4a26c566a1f7@memebeam.org/
2021-05-01 11:25:51 +02:00
Bastien Guerry 2d1d59d5c0 etc/ORG-NEWS: Advertize `org-babel-plantuml-svg-text-to-path'
* etc/ORG-NEWS: Advertize `org-babel-plantuml-svg-text-to-path'.
2021-05-01 11:01:30 +02:00
Bastien Guerry f9cdda8234 doc/org-manual.org: Deprecate installation thru Org ELPA or archives
* doc/org-manual.org (Installation): Do not document installation
through Org ELPA or an archive as these installation methods will
become obsolete after Org 9.5.
2021-04-28 09:40:01 +02:00
Bastien Guerry a51c0f22b8 ox-html.el (org-html-scripts, org-html-style-default): Use defcustom
* ox-html.el (org-html-scripts, org-html-style-default): Turn
into configurable options.
2021-04-28 08:25:28 +02:00
Protesilaos Stavrou 667cb6f1ae org-faces.el: Use fixed-pitch
* org-faces.el (org-hide, org-date, org-table, org-formula)
(org-code, org-block, org-verbatim): Use fixed-pitch.

Link: https://orgmode.org/list/875z8njaol.fsf@protesilaos.com/
2021-04-27 21:26:37 +02:00
Bastien Guerry 94d8d8ff50 etc/ORG-NEWS: Announce the signature change for `org-tags-expand'
* lisp/org.el (org-tags-expand): Remove obsolete argument.

* etc/ORG-NEWS: Announce the signature change for `org-tags-expand'.
2021-04-27 09:51:21 +02:00
Sameer Rahmani 4efab7681e ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag
* lisp/ox-html.el (org-html-template): Added the support for a CSS
class name to the content tag which wraps the entire content. The CSS
class name can be set via in buffer HTML_CONTENT_CLASS property or
:html-content-class for org publish.

TINYCHANGE
2021-04-26 10:49:24 +02:00
Nicolas Goaziou 962690ef6a ORG-NEWS: Mention DOI links export
* etc/ORG-NEWS (Export DOI links): New entry.
2021-04-18 14:08:08 +02:00
Nicolas Goaziou f6139e6c54 ORG-NEWS: Mention new behavior in macros 2021-04-16 16:40:00 +02:00
Kyle Meyer f03cba1b6f Merge branch 'maint' 2021-03-30 23:55:51 -04:00
Kyle Meyer 1c0ce74a1f NEWS: Remove quote from in front of headline-data symbol
There's no need to quote the symbol when referring to it, just as
`symbol' rather than `'symbol' is used in docstrings.
2021-03-30 23:45:51 -04:00
Kyle Meyer d017cdb0ae NEWS: Group and move up electric-indent/adapt-indentation entries
Put the entry for "respecting electric-indent-mode" and the new value
of org-adapt-indentation near each other given that honoring
electric-indent-mode is likely to make many users aware of the
behavior that org-adapt-indentation controls (even if they weren't
aware that the option existed).

Also move these entries up in hopes of making them easier to discover.

Suggested-by: Tim Cross <theophilusx@gmail.com>
Ref: https://orgmode.org/list/87pmzhi7wp.fsf@gmail.com
2021-03-30 23:43:17 -04:00
Stefan Kangas 2e1c984153 Prefer HTTPS to HTTP in most links 2021-03-21 15:21:22 -04:00
Jay Kamat a9f38b1c22 ox-html: Add webp as an inline image format
* lisp/ox-html.el (org-html-inline-image-rules): Add webp as an inline
  image format

Webp is an image format introduced in 2010, which now has widespread
support in browsers. ox-html can inline webp images identically to how
it does already for other image formats.

[km: updated package-version keyword and added NEWS entry]

Signed-off-by: Jay Kamat <jaygkamat@gmail.com>
2021-03-19 01:11:00 -04:00
Kyle Meyer 4d463ee4ba ORG-NEWS: Add entry for org-clock-ask-before-exiting 2021-03-03 22:51:09 -05:00
Kyle Meyer 8b9d6f67a0 Merge branch 'km/from-emacs-master' 2021-02-28 17:24:54 -05:00
Mattias Engdegård da1ebabfab Backport commit de15ca7d0 from Emacs
Fix typos
de15ca7d0065c5f77c88a90f4f14569886be3617
Mattias Engdegård
Thu Feb 18 16:50:55 2021 +0100
2021-02-21 23:08:10 -05:00
Kevin J. Foley 885ee086dd org-agenda.el: Support argument collection for custom bulk functions
* lisp/org-agenda.el (org-agenda-bulk-custom-functions): Add
documentation about argument collection for custom bulk functions.
(org-agenda-bulk-action): Support function to collect arguments for
custom bulk functions.
* etc/ORG-NEWS (Option ~org-agenda-bulk-custom-functions~ now supports
collecting bulk arguments): Add entry to NEWS.
2021-02-14 21:53:14 -05:00
TEC 5b0eb9aada manual, news: Document org-html-meta-tags
* docs/org-manual.org, etc/ORG-NEWS: Document and announce the new
setting `org-html-meta-tags'.

[km: spacing and spelling tweaks]
2021-02-07 19:37:20 -05:00
Gustav Wikström be2966abb5 org-id: Add title to description when storing id links
* lisp/org-id.el (org-id-store-link): Store title as link description
if it is available.
2021-02-06 20:46:05 +01:00
stardiviner 86ad8d2791 org.el: Complete tags from both global and buffer local
* lisp/org.el (org-fast-tag-selection): Merge buffer local tags with
global alist of tags. And it obeys the option
org-complete-tags-always-offer-all-agenda-tags.

* doc/org-manual.org: Update the TAB key doc in tags selection UI.

* etc/ORG-NEWS: Mention the change in org-set-tags-command.
2021-01-14 00:15:55 -05:00
Kyle Meyer 291993888d Merge branch 'maint' 2021-01-01 15:02:10 -05:00
Kyle Meyer 99eafe3787 Update copyright year to 2021 2021-01-01 14:59:01 -05:00
Gustav Wikström 9140a712fb etc/ORG-NEWS: Add example for new startup option
* etc/ORG-NEWS (New startup options =#+startup: show<n>levels=): Add
example, per request in mailing list.
2020-12-22 15:06:26 +01:00
Ihor Radchenko 1f4ea532a4 Document changes of headline fontification introduced in 979e82fc3
* etc/ORG-NEWS (=org-goto-first-child= now works before first
heading): Document that all the headline components inherit the
headline face instead of default face.  Provide example how to restore
the old behaviour.
2020-12-21 17:40:48 +01:00
Matt Huszagh 2af68d6a45 etc/ORG-NEWS: Add an entry 2020-12-14 09:18:53 +01:00
Bastien e2bb13de23 Merge branch 'maint' 2020-12-12 18:31:12 +01:00
Kévin Le Gouguec 8fde9fc905 Offer alternative to disabling electric-indent-mode
* etc/ORG-NEWS (=RET= and =C-j= now obey ~electric-indent-mode~):
Mention alternative values for org-adapt-indentation.
2020-12-12 18:30:59 +01:00
Gustav Wikström a71ac14e46 New startup options, #+startup: show<n>levels
* lisp/org.el (org-startup-folded, org-startup-options)
  (org-set-startup-visibility): Add new startup options
2020-12-10 10:35:59 +01:00
Daniele Nicolodi 15469774dd org-table: Add mode flag to enable Calc units simplification mode
* org-table.el (org-table-eval-formula): Add the `u` mode flag to
enable Calc's units simplification mode.

* test-org-table.el (test-org-table/mode-string-u): Add Unit test for
the new mode flag.

* org-manual.org: Document new mode flag.
2020-11-24 20:59:39 -05:00
Titus von der Malsburg 8bade78ce6 lisp/org.el: Allow hiding #+SUBTITLE: keyword via `org-hidden-keywords'
* lisp/org.el: Allow users to include 'subtitle in
`org-hidden-keywords' to hide #+SUBTITLE: keyword.

This way #+SUBTITLE is treated like similar keywords for title, date,
e-mail, and author.
2020-11-16 23:31:06 -05:00
Jack Kamm 5371b30fe5 ol.el: New option to set org-link-file-path-type to a function
* lisp/ol.el (org-link-file-path-type): Add new option.
(org-insert-link): Handle function option for org-link-file-path-type.
2020-11-11 17:00:25 -08:00
Gustav Wikström dad436c60b Make `org-goto-first-child' behave intuitively before first heading
* lisp/org.el (org-goto-first-child): Make it understand outline
level 0 as well.  The function now behaves intuitively also before
first heading.
2020-11-05 00:49:23 +01:00
Matt Huszagh d9884cfa70 lisp/ob-core.el: Allow passing empty vector to :file-desc to omit description
* doc/org-manual.org (Type): Document empty vector argument for
file-desc.
* etc/ORG-NEWS (New argument for ~file-desc~ babel header): Add entry
to NEWS.
* lisp/ob-core.el (org-babel--file-desc): Add new function to evaluate
file description value.
(org-babel-execute-src-block): Correctly evaluate file description
when executing src block.
(org-babel-insert-result): Correctly evaluate file description value
when inserting the result of src block execution into the buffer.
* testing/lisp/test-ob.el (test-ob/file-desc-header-argument): Add
test case for new behavior.
2020-10-06 23:13:12 -04:00
Jack Kamm 4b6495c3ba ob-python: Improvements to :return header argument
* lisp/ob-python.el (org-babel-execute:python): Allow return-val to be
non-nil in sessions, and concatenate it after the expanded body.
2020-09-27 08:41:26 -07:00
Kyle Meyer 8c44f2e33f ORG-NEWS: Move org-id-ts-format entry to v9.5 heading
This was added in 6c75b0021 (Allow customised ID format for `ts'
`org-id-method', 2020-09-11), after the v9.4 release.
2020-09-24 19:26:02 -04:00
Samuel W. Flint 488076e0a6 Describe new %L formatting for org-capture
* etc/ORG-NEWS (New formatting directive ~%L~ for org-capture):

Describe new %L formatting for org-capture

TINYCHANGE
2020-09-24 19:25:44 -04:00
Ihor Radchenko 6c75b00217 Allow customised ID format for `ts' `org-id-method'
* lisp/org-id.el (org-id-new): Use `org-id-ts-format' as ID format for
`ts' ID generation method.
(org-id-ts-format): New custom variable for `ts' ID format.  The
default value is the same as old hard-coded ID format string.
* etc/ORG-NEWS (New option ~org-id-ts-format~): Announce the new
custom variable.
2020-09-23 10:29:50 +02:00
Bastien fbccf09c74 etc/ORG-NEWS: Create an empty section for Org 9.5 2020-09-14 15:50:27 +02:00
Bastien eda0c60120 etc/ORG-NEWS: Create an empty section for Org 9.5 2020-09-14 15:48:54 +02:00
Bastien Guerry 1e3aa1ce0a etc/ORG-NEWS: Rephrasing, reordering and various other enhancements 2020-09-10 08:57:26 +02:00
Nicolas Goaziou b79fef1da7 html: Improve consistency on internal anchors naming scheme
* lisp/ox-html.el (org-html-prefer-user-labels): New variable.
(org-html--reference): New function.
(org-html--format-toc-headline):
(org-html-list-of-listings):
(org-html-list-of-tables):
(org-html-example-block):
(org-html-headline):
(org-html-inline-src-block):
(org-html-latex-environment):
(org-html-link):
(org-html-paragraph):
(org-html-quote-block):
(org-html-radio-target):
(org-html-special-block):
(org-html-src-block):
(org-html-table):
(org-html-target): Use new function.
2020-09-09 10:23:28 +02:00
Bastien 07c6b11258 ob-shell.el: New option `org-babel-shell-results-defaults-to-output'
* lisp/ob-shell.el (org-babel-shell-results-defaults-to-output):
New option.

* testing/lisp/test-ob-exp.el (ob-exp/exports-inline): Fix test.

See <https://orgmode.org/list/CA+A2iZaziAfMeGpBqL6qGrzrWEVvLvC0DUw++T4gCF3NGuW-DQ@mail.gmail.com>
2020-09-07 19:30:04 +02:00
Terje Larsen 186371eac7 ob-plantuml: Add support for plantuml executable
* lisp/ob-plantuml (org-babel-variable-assignments:plantuml): Support
using plantuml executable instead of jar.

Some systems come with an executable for plantuml instead of a specific
JAR file. This adds support for two different modes:
- jar :: using java together with a JAR (previous behavior)
- plantuml :: using a PlantUML executable

The PlantUML executable can be configured via
`org-plantuml-executable-path` and also the arguments that will be given
via `org-plantuml-executable-args`.
2020-09-04 12:36:58 +02:00
Eric S Fraga e8ebf5d6c9 Add other-tab option for org-agenda-window-setup
* org-agenda.el (org-agenda-prepare-window, org-agenda--quit): Handle
other-tab option for agenda view creation and exit.
2020-08-29 08:04:03 -04:00
Jack Kamm 632ceabb14 ob-python: Refactor session evaluation
* lisp/ob-python.el: Require python.el at top-level.
(org-babel-python-eoe-indicator): Remove unused variable.
(org-babel-python-initiate-session-by-key): Rename
python-buffer to avoid obsolete warning.
(org-babel-python-evaluate-external-process): Remove unnecessary
require.
(org-babel-python--exec-tmpfile): Simplify this template.
(org-babel-python--eval-ast): Add printing of results to this
template, requiring additional string escapes.
(org-babel-python-evaluate-session): Simplify to use adjusted
templates, and call out to functionality in python.el or
python-mode.el.
(org-babel-python-evaluate-session): Simplified to use adjusted templates.

This commit refactors and cleans up code related to session
evaluation. python.el is now required at the top-level. Python
templates for wrapping code are simplified. Instead of directly
pasting code to the REPL, functionality from python.el and
python-mode.el are used; this fixes issues with code being echoed to
the REPL, and should be generally more robust. Finally, in the
:results value case, special handling of exceptions is removed, and we
no longer print None when the last statement isn't an expression.
2020-08-28 22:07:56 -07:00
John Herrlin ea946353aa ob-core: file-mode option in source code block arguments
* ob-core.el (org-babel-execute-src-block): Source code block header
argument `:file-mode' can set file permissions if `:file' argument is
provided.
(org-babel-common-header-args-w-values): Add `:file-mode' to common
header arguments.

TINYCHANGE
2020-08-02 22:59:25 -04:00
Kévin Le Gouguec 0fd9a6ad6c Fix recommendation in 9.4 release notes
Cf. <https://orgmode.org/list/87pn8huuq2.fsf@iki.fi/t/#m4f86f6baf790e88ab905007757487a1f481cc579>.

Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>

* etc/ORG-NEWS (=RET= and =C-j= now obey ~electric-indent-mode~):
Recommend disabling electric-indent-local-mode rather than
electric-indent-mode, as the latter impacts all buffers rather than
just the newly-created Org buffer.
2020-07-28 21:49:58 -04:00
Marco Wahl 7069dc3f32 org: New function to hide the body up to the first child
* lisp/org.el (org-hide-entry): New function. Counterpart to org-show-entry.
2020-07-21 12:14:10 +02:00
Kenneth D. Mankoff 0ab117bc57 ob-screen: Accept :screenrc header argument
* lisp/ob-screen.el (org-babel-default-header-args:screen): Add
default header argument `:screenrc' and value "/dev/null".
(org-babel-prep-session:screen): Use header argument in variable
`screenrc' and not hard-coded value.
2020-07-15 23:13:44 -04:00
Kenneth D. Mankoff 25bc790be5 ob-screen: Respect :session name. Don't prepend 'org-babel-session-'
* lisp/ob-screen.el (org-babel-prep-session:screen): Remove concat of
"org-babel-session-" string onto session name when creating session.
(org-babel-screen-session-socketname): Remove concat of
"org-babel-session-" string onto session name searching for existing
screen session.
2020-07-15 23:13:44 -04:00
Nicolas Goaziou b6e7d3dcb6 news: Remove reference to `org-cycle-hide-property-drawers' 2020-07-03 22:07:12 +02:00
Nicolas Goaziou e2b62b4da8 Rewrite `org-forward-paragraph' and `org-backward-paragraph'
* lisp/org.el (org-forward-paragraph):
(org-backward-paragraph): Rewrite functions.  Add repeat argument.
Mimic more closely regular `forward|backward-paragraph' functions.
(org--forward-paragraph-once):
(org--backward-paragraph-once):
(org--paragraph-at-point): New functions.
* testing/lisp/test-org.el (test-org/forward-paragraph):
(test-org/backward-paragraph): Update tests.  Add some.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
2020-06-13 17:22:48 +02:00
Kyle Meyer aa32f65f83 Rename org-startup-numeroted variable to fix typo
* lisp/org.el (org-startup-numerated): Fix "numeroted" typo in
variable name.
(org-startup-options):
(org-mode):
* doc/org-manual.org (Dynamic Headline Numbering):
(Summary of In-Buffer Settings): Update for rename.

Also fix a few related typos in ORG-NEWS and the manual.

No compatibility alias has been added, as this variable hasn't yet
made it into a release.
2020-06-11 17:55:50 -04:00
Kyle Meyer fd6696ea8b ORG-NEWS: Fix some typos in v9.4 entries 2020-06-10 21:23:39 -04:00
Nicholas Vollmer 3ba4f056d7 capture: Set `org-capture-current-plist' before `org-capture-mode-hook'
* org-capture.el (org-capture-place-template): Allow
`org-capture-current-plist' access during `org-capture-mode-hook'

Ensure consistency between org-capture's hooks.

`org-capture-after-finalize-hook' is now the only hook that cannot
access `org-capture-current-plist' because the capture buffer is
killed when it is run.
2020-06-10 19:41:35 +02:00
Nicholas Vollmer 99acb17d06 etc/ORG-NEWS: Fix broken documentation link 2020-06-08 22:26:46 -04:00
Bastien Guerry c7a86a43ae Merge branch 'maint' 2020-06-05 10:40:14 +02:00
Bastien Guerry fa4dddf8d2 Fix broken links
* lisp/org.el:
* lisp/ol-bibtex.el:
* etc/ORG-NEWS (org-capture.el is now the default capture system):
* doc/org-manual.org (Cache results of evaluation): Fix broken links.
2020-06-05 10:39:52 +02:00
Kévin Le Gouguec 2ab68c7c35 * etc/ORG-NEWS: Announce a recent fix in ob-C.el. 2020-06-02 01:02:41 +02:00
Bastien cc75b12e43 etc/ORG-NEWS: Advertize the new keybinding 2020-06-01 14:44:03 +02:00
TEC f5c47d857c Extend org-edit-special to editing LaTeX fragments
* lisp/org-src.el (org-src--contents-area): Handle `latex-fragment'.
(org-edit-latex-fragment): New function.
* lisp/org.el (org-edit-special): Use new function.
2020-05-26 23:03:11 +02:00
Roland Coeurjoly 1837cfb0e2 ob-haskell: Introduce :compile header argument
* lisp/ob-haskell (org-babel-haskell-compiler):
(org-babel-header-args:haskell): New variables.
(org-babel-haskell-execute):
(org-babel-haskell-interpret): New functions.
(org-babel-execute:haskell): Use new functions.
2020-05-25 09:17:14 +02:00
Bastien d868067055 etc/ORG-NEWS: Tiny formatting enhancements 2020-05-22 16:04:43 +02:00
Nicolas Goaziou 88f5ed91c5 `org-startup-folded' defaults to `showeverything'
* lisp/org.el (org-startup-folded): New default value.

See <http://lists.gnu.org/r/emacs-orgmode/2020-04/msg00452.html>.
2020-05-12 12:33:21 +02:00
Nicolas Goaziou 074ea1629c Deprecate `org-cycle-hide-drawers'
* lisp/org.el (org-hide-drawer-all): New function.
(org-cycle-hide-drawers): move...
* lisp/org-compat.el (org-cycle-hide-drawers): ... here.
* lisp/org-agenda.el (org-agenda-show-1): Remove use of
`org-cycle-hide-drawers'.
2020-05-09 15:30:02 +02:00
Nicolas Goaziou 8580ef6ec1 Rename `org-at-property-block-p'
* lisp/org.el (org-at-property-drawer-p): New name.
* lisp/org-compat.el (org-at-property-block-p): Obsolete alias.
2020-05-09 12:50:34 +02:00
Kévin Le Gouguec d3e6b58004 Make RET and C-j obey `electric-indent-mode'
* lisp/org-compat.el (org-return-indent): Deprecate this command.
* lisp/org-keys.el (org-mode-map): Rebind C-j to a command emulating
`electric-newline-and-maybe-indent'.
* lisp/org.el (org-cdlatex-environment-indent): Stop using the now
obsolete function.
(org--newline): New helper function.
(org-return): Use it to transparently handle `electric-indent-mode'.
(org-return-and-maybe-indent): New command to emulate
`electric-newline-and-maybe-indent' while taking care of Org special
cases (tables, links, timestamps).
* testing/lisp/test-org.el (test-org/with-electric-indent,
test-org/without-electric-indent): New tests.
* testing/org-test.el (org-test-with-minor-mode): New helper to set a
minor mode to a specific state, and reset it afterward.
2020-05-07 12:14:30 +02:00
Nicolas Goaziou ce10179cc2 table: `org-table-to-lisp' does not check if point is at a table
* lisp/org-table.el (org-table-to-lisp): Do not check if point is at
a table.  Leave it to the caller.

See <http://lists.gnu.org/r/emacs-orgmode/2020-05/msg00000.html>.
2020-05-01 15:00:47 +02:00
Nicolas Goaziou 31068373dc export: Remove `org-export-special-keywords'
* lisp/ox.el (org-export-special-keywords):
(org-export--get-inbuffer-options): Do not use `org-export-special-keywords'.
2020-04-26 22:59:24 +02:00
Nicolas Goaziou b4e91b7e94 New function: org-collect-keywords
* lisp/org.el (org-set-regexps-and-options): Use new function.
(org-collect-keywords):
(org--collect-keywords-1): New functions.
* lisp/ox.el (org-export--get-inbuffer-options): Use new function.
2020-04-26 18:06:15 +02:00
Brian Powell bc90264ac6 ox-html: Add customizable format string for equations
* lisp/ox-html.el (org-html-equation-reference-format): New variable.
* doc/org-manual.org update to reference new variable
2020-04-21 19:44:03 +02:00
Nicolas Goaziou 19a4a8de44 Merge branch 'maint' 2020-04-19 01:45:47 +02:00
Nicolas Goaziou 3fcea865b4 news: rename and old entry
* etc/ORG-NEWS (Footnotes changes): Rename from "Footnotes". Since
this is a reserved name, the whole section disappear from export.
2020-04-19 01:44:50 +02:00
Nicolas Goaziou dcb562ba09 news: Document drawer folding changes 2020-04-18 19:28:31 +02:00
Marco Wahl 6f38fe24a3 Merge branch 'maint' 2020-04-18 16:17:12 +02:00
Marco Wahl bb9dfdafeb org-table: Make column delete consistent with row delete
* lisp/org-table.el (org-table-delete-column): Stay in the column at
delete.  Exceptionally allow column delete when point is at eol
immediately to the right of a cell seperator.

A hint by Eric S Fraga led to this commit.
https://lists.gnu.org/archive/html/emacs-orgmode/2020-04/msg00283.html
2020-04-18 16:16:02 +02:00
Marco Wahl 0e5be8a656 Merge branch 'maint' 2020-04-18 00:21:39 +02:00
Marco Wahl 22d2b0ac84 org-table: Insert column at point
* lisp/org-table.el (org-table-insert-column): Adjust the function to
insert the column at point (and not to the right.)

Org-manual, ORG-NEWS and testing are changed accordingly.
2020-04-18 00:13:24 +02:00
Nicolas Goaziou fb593f7556 Handle ".+" repeater with hours step
* doc/org-manual.org (Repeated tasks): Document new feature.
* lisp/org.el (org-auto-repeat-maybe): Repeat from now when ".+" is
used in conjunction of hours increment.
* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Add tests.
2020-04-06 15:18:48 +02:00
Kyle Meyer ba685555c4 org-clock: Mention semimonth step in manual and add test
* doc/org-manual.org (The clock table): Mention new semimonth :step
value.
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/step):
Test :step semimonth.

Add a NEWS entry as well.
2020-03-26 21:04:00 -04:00
Nicolas Goaziou 041138e47c Remove `org-export-link-as-file'
* lisp/ol.el (org-link-parameters): Remove reference to the function.
* lisp/ox.el (org-export-link-as-file): Remove function.
* testing/lisp/test-ox.el (test-org-export/link-as-file): Remove test.

The current implementation is not satisfactory, and not useful in the
code base. Using a pre-export hook turning custom link type into
"file" is enough for now. See "attachement" links for an example.
2020-02-28 01:30:30 +01:00
Nicolas Goaziou 5d4314ce9e ORG-NEWS: Improve suggested fix
* etc/ORG-NEWS (Possibly broken internal file links: please check and
fix): Improve code.  Limit false positives.
2020-02-26 16:36:21 +01:00
Bastien 1a84a8b611 etc/ORG-NEWS: Add incompatible change about possibly broken links 2020-02-25 20:29:17 +01:00
Bastien 3a543a981b Enhancements to `org-latex-to-html-convert-command'
* lisp/org.el (org-latex-to-html-convert-command): Fix option.

* etc/ORG-NEWS: Document `org-latex-to-html-convert-command'
as a new option.
2020-02-24 11:21:40 +01:00
Nicolas Goaziou fe5962ce9b Fix some time stamps regexps
* lisp/org.el (org-ts--internal-regexp): New variable.
(org-ts-regexp):
(org-ts-regexp-inactive):
(org-ts-regexp-both): Use new variable.
(org-maybe-keyword-time-regexp): Remove variable.
(org-logbook-drawer-re): Simplify regexp.

Also move "Timestamp" section higher in the library (topological
order). This change should pacify "Relint" checks.
2020-02-23 12:41:33 +01:00
Bastien 4d23aa19d5 etc/ORG-NEWS: Tiny rephrasing and formatting fixes 2020-02-23 09:42:02 +01:00
Bastien 08428fed78 ob-shell.el: Delete `org-babel-shell-return-value-is-exit-status'
* lisp/ob-shell.el (org-babel-sh-evaluate): Return the output
by default.  Return exit status as the "value" when :result is
explicitely set to "value".

* lisp/ob-shell.el
(org-babel-shell-return-value-is-exit-status): Delete option.

* doc/org-manual.org (Collection): Be more accurate.

See the whole thread here:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/msg00715.html

Thanks to everyone in this discussion.
2020-02-22 10:58:55 +01:00
Bastien e360cd8f3a Change the default values for several options
* doc/org-manual.org (Execute commands in the active region):
Update the manual given the new defaults.

* etc/ORG-NEWS (New default settings for some options): New
section.

* lisp/org.el (org-loop-over-headlines-in-active-region):
Change the default value to `t'.
(org-fontify-done-headline): Ditto.

* lisp/org-agenda.el
(org-agenda-loop-over-headlines-in-active-region): Ditto.

* lisp/org-src.el (org-src-tab-acts-natively): Ditto.
2020-02-21 16:35:56 +01:00
Bastien 0c02928eb2 ob-shell.el: Rename `ob-shell-return-value-is-exit-status'
* lisp/ob-shell.el
(org-babel-shell-return-value-is-exit-status): Rename from
`ob-shell-return-value-is-exit-status'.
(org-babel-execute:shell, org-babel-sh-evaluate): Use new name.
(org-babel--variable-assignments:bash_assoc): Fix indentation.
2020-02-21 08:26:37 +01:00
Nicolas Goaziou afd3b04ecc ol: Extend open tooling in link parameters
* lisp/ol.el (org-link-parameters): Extend :follow parameter to handle
a second argument.
(org-link-open): Call custom-link functions after internal ones.
(org-link-open-as-file): New function.
(org-link-parameters): Reference new function.
(org-link-open): Use new function.
2020-02-19 18:42:47 +01:00
Bastien ac1498ec6e etc/ORG-NEWS: Document `ob-shell-return-value-is-exit-status'
* etc/ORG-NEWS: Document `ob-shell-return-value-is-exit-status'.
2020-02-19 16:57:15 +01:00
Bastien 325962c003 org.el: New option `org-startup-numeroted' and #+startup: num
* lisp/org.el (org-startup-numeroted): New option.
(org-startup-options): New "num" and "nonum" startup keywords.
(org-mode): Startup according `org-startup-numeroted' or the
local #+startup setup.

* doc/org-manual.org (Dynamic Headline Numbering)
(Summary of In-Buffer Settings): Document
`org-startup-numeroted' and #startup: num.

* etc/ORG-NEWS: Document the new startup option.

Thanks to Guillaume MULLER for this idea.
2020-02-18 13:27:33 +01:00
Bastien fc3f1e6b28 Revert "ob-python: Session returns empty string if no return value"
This reverts commit 5fc4576548.
2020-02-17 23:46:49 +01:00
Bastien b8a2ad9288 org-agenda.el: New hook `org-agenda-filter-hook'
* lisp/org-agenda.el (org-agenda-filter-hook): New hook.
(org-agenda-finalize): Enhance docstring.
(org-agenda-filter): Use the new hook.
(org-agenda-filter-expand-tags, org-agenda-filter-apply): ):
Fix docstrings.

* etc/ORG-NEWS: Document the new hook.
2020-02-17 18:40:11 +01:00
Jack Kamm 5fc4576548 ob-python: Session returns empty string if no return value
* lisp/ob-python.el (org-babel-python--eval-ast): Change sessions to
return an empty string, instead of None, if there is no return value.
2020-02-17 18:30:47 +01:00
Bastien 055742562c org-colview.el: Allow text rescaling
* lisp/org-colview.el (org-columns-header-line-remap): New
variable.
(org-columns--display-here): Don't rigidly inherit the :height
from the default face, allow text-scale-* to also rescale the
temporary column view header-line.
(org-columns-remove-overlays): If
`org-columns-header-line-remap' is non-nil, remove the
header-line face relative remapping.

* etc/ORG-NEWS (Allow text rescaling in column view): Document
the ability to scale text in column view.

Thanks to Marco Wahl for this suggestion.
2020-02-17 13:59:19 +01:00
Bastien 1d8d83d875 etc/ORG-NEWS: Add more details on ob-clojure.el enhancements 2020-02-17 00:12:48 +01:00
Bastien e561bac519 etc/ORG-NEWS: Document ob-clojure.el changes and reorder 2020-02-16 11:39:19 +01:00
Bastien 684ab0f2a4 etc/ORG-NEWS: Add a section about the 7yo bug, rephrasing 2020-02-14 14:46:31 +01:00
Bastien bfe404c933 etc/ORG-NEWS: Fix typo and formatting 2020-02-13 17:04:04 +01:00
Bastien 32cffa9ce4 etc/ORG-NEWS: Add a new entry about ob-clojure.el updates 2020-02-13 17:03:41 +01:00
Dan Drake 554a3fc643 org-clock.el: Add `t' option to `org-clock-resolve'
* org-clock.el (org-clock-resolve): add `t' option.  This works like
`k', but asks the user to specify a time instead of a number of
minutes.

TINYCHANGE

Often when you are interrupted at a task and get back to it, you know
what time the interruption happened. This option makes it easy to tell
org-resolve-clocks about that. For example, say you clocked into task A
at, say, 9:37:

    * original task A
      :LOGBOOK:
      CLOCK: [2020-01-21 Mon 09:37]
      :END:

While working on task A, you get a phone call. When the call is done,
you'd like to update your time logging to reflect the phone call. Your
phone says the call was at 11:09.

With C-c C-x C-z, you can use the `K' option, but you need to figure out
the number of minutes to keep. It's easier to look at the phone, or to
mentally note the time when an interruption starts. With the new option,
you can select `T', and just specify a time of 11:09. The state is now:

    * original task A
      :LOGBOOK:
      CLOCK: [2020-01-21 Mon 09:37]--[2020-01-21 Mon 11:09] => 1:32
      :END:

You add the phone call to your org buffer and do C-c C-x C-i to clock
in. Org asks you to start the time from when the previous task ended,
you say yes, and the state is now:

    * original task A
      :LOGBOOK:
      CLOCK: [2020-01-21 Mon 09:37]--[2020-01-21 Mon 11:09] => 1:32
      :END:
    * task B, phone call
      :LOGBOOK:
      CLOCK: [2020-01-21 Mon 11:09]
      :END:

At this point, you can clock back into task A, or any other task.

The key feature here is to be able to just type in a time -- in any
format accepted by org-read-date -- instead of specifying a number of
minutes.
2020-02-13 07:48:04 +01:00
Bastien 8e9f78f612 Revert "etc/ORG-NEWS: Add a note about new way to resolve clock"
This reverts commit 550db5f014.
2020-02-13 07:37:49 +01:00
Bastien 550db5f014 etc/ORG-NEWS: Add a note about new way to resolve clock 2020-02-13 01:27:48 +01:00
Bastien 1a05da36b8 etc/ORG-NEWS: Add incompatible change 2020-02-12 19:10:45 +01:00
Bastien eaa220f6a7 Small code enhancement
* doc/org-manual.org (Checkboxes): Minor update.

* lisp/org-list.el (org-at-radio-list-p): Respect the
attributes #+ATTR_* syntax.
2020-02-12 08:40:46 +01:00
Bastien 4028cc731b Use "#+attr_org: :radio" before lists to enable radio buttons
* doc/org-manual.org (Checkboxes): Document the use of
"#+attr_org".

* lisp/org.el (org-ctrl-c-ctrl-c): When the list at point is
preceded by "#+attr_org: :radio" use `org-toggle-radio-button'
instead of `org-toggle-checkbox'.

* lisp/org-list.el (org-at-radio-list-p): New defsubst.
(org-toggle-checkbox): Use it.

* etc/ORG-NEWS: Document the use of "#+attr_org".
2020-02-12 01:51:46 +01:00
Bastien 561feb128d Add `org-toggle-radio-button' and related minor mode
* doc/org-manual.org (Checkboxes): Document the new minor mode
and command.

* lisp/org-keys.el (org-mode-map): Bind C-c C-x C-r to
`org-toggle-radio-button'.

* lisp/org-list.el (org-list-checkbox-radio-mode): New minor
mode to let C-c C-c call `org-toggle-radio-button' instead of
`org-toggle-checkbox'.
(org-toggle-radio-button): New command.

* lisp/org.el (org-ctrl-c-ctrl-c): Use `org-toggle-radio-button'.

* etc/ORG-NEWS: Document the new minor mode and command.

Thanks to Phil Sainty for sharing this idea and links to similar
implementations.
2020-02-11 23:55:53 +01:00
Bastien 85363d4867 etc/ORG-NEWS: Allowed empty HTML extension 2020-02-11 09:34:17 +01:00
Bastien d0cc865623 Rearrange etc/ORG-NEWS 2020-02-11 09:02:19 +01:00
Bastien 23fa7b9796 etc/ORG-NEWS: Delete an obsolete change
* etc/ORG-NEWS: Delete an obsolete change.
2020-02-10 23:25:54 +01:00
Bastien d9b586ce34 etc/ORG-NEWS: Document a change
* etc/ORG-NEWS: Document the ability to scroll up and down in the
agenda commands dispatch window.
2020-02-10 23:21:34 +01:00