Commit Graph

23550 Commits

Author SHA1 Message Date
Karol Wójcik 93325df0ba ox.el: Add missing polish translations in export dictionary
* lisp/ox.el (org-export-dictionary): Add missing polish translations.

TINYCHANGE

Signed-off-by: Karol Wójcik <karol.wojcik@tuta.io>
2020-11-06 00:48:02 -05:00
Kyle Meyer 280a0245f8 Merge branch 'maint' into master 2020-11-06 00:35:26 -05:00
Kyle Meyer 51c4cc1a8a Prefer symbol for eval-after-load's FILE argument
Call eval-after-load with a symbol rather than a string to avoid
potential name conflicts with files that do not provide the feature
(e.g., if a user configures speedbar in a file named "speedbar.el")

Reported-by: John Foerch <jjfoerch@gmail.com>
Ref: https://orgmode.org/list/CAEeGWGKfrV7w9qtPRpAhFtiOCH-+8_ydEe11EoMAkUkbTq1fuA@mail.gmail.com
2020-11-06 00:32:16 -05: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
Gustav Wikström 8d7a9b4ce9 Hide drawers before first headline properly when cycling visibility
* lisp/org.el (org--hide-drawers): New internal function consolidating
  logic from two places currently.

  (org-cycle-hide-drawers): Hide drawers before first headline at
  appropriate times.  Refactor to use new internal function
  `org--hide-drawers'.

  (org-hide-drawer-all): Refactor to use new internal function
  `org--hide-drawers'.
2020-11-05 00:37:18 +01:00
Gustav Wikström 19d2f79a0f Speedup of org-id-update-id-locations
Since this is about performance, a benchmark before this change, on a
set of 519 files with total size of 1500 kb gives the following result:

  519 files scanned, 504 files contains IDs, and 911 IDs found.
  (168.243948 38 2.053949000000003)

After the change the following result:

  519 files scanned, 504 files contains IDs, and 911 IDs found.
  (3.034806 3 0.16445799999999622)

Benchmark done on a a Windows machine with no files previously loaded
into Emacs.

* lisp/org-id.el (org-id-update-id-locations): This function has
gotten a bit of back and forth changes in terms of performance.  One
year ago in 9865e6bd8 and then six months ago in 37a5020bb.
Unfortunately the latest speedup actually was a speed-down.  Speed is
not good again.
2020-11-04 16:41:20 +01:00
Bastien 2d21c0d686 lisp/ob-groovy.el: Add Palak Mathur as a maintainer 2020-11-04 12:45:02 +01:00
Ian Martins ce02d52bc4 ob-java.el: Change the default back to scripting mode
* lisp/ob-java.el (org-babel-default-header-args:java): Change the
default to scripting mode.

* testing/lisp/test-ob-java.el: Modify the first test to use the
default for `:results' and all others to specify it.

A recent commit added functional mode and made it default, but this
would break java source blocks for anyone that relied on the old
default.  This sets the default back to scripting mode.
2020-11-02 06:26:54 -05:00
Kyle Meyer ad2115f2c1 ob-gnuplot: Silence byte compiler 2020-11-01 23:27:04 -05:00
Kyle Meyer 3b382e9d9e Merge branch 'maint' into master 2020-11-01 18:38:24 -05:00
Kyle Meyer 20374f69e8 ob-exp: Restore evaluation query for lob calls during export
* lisp/ob-exp.el (org-babel-exp-results): Fix a regression from v9.0
that led to silently executing lob calls on export despite a non-nil
value of org-confirm-babel-evaluate.
* testing/lisp/test-ob-lob.el (test-ob-lob/confirm-evaluate): New test.

56bf3d789 (Babel: avoid superfluous confirmation for internal wrapper,
2013-04-10) let-bound org-confirm-babel-evaluate to nil in two spots
to prevent double querying for lob calls.  These overrides were no
longer needed following the refactoring in dbb375fdf (Simplify Babel
calls evaluation, 2016-06-16).  However, that commit dropped only one
of the spots, and, as a result, disabled confirmation unconditionally
when exporting lob calls.

Drop the remaining org-confirm-babel-evaluate override.

Reported-by: 吴锐扬 <ywwry66@gmail.com>
Ref: https://orgmode.org/list/5362C0A0-632F-4C87-8FA1-915F0F53D8B8@gmail.com
2020-11-01 18:34:16 -05:00
Adam Spiers 2b3bbf3618 x11idle: Make installation a little smoother
Fix a -Wimplicit-int compiler warning, and make it more obvious how to
obtain scrnsaver.h on three of the most popular Linux distros.

Signed-off-by: Adam Spiers <orgmode@adamspiers.org>
2020-10-28 23:40:40 -04:00
Bastien ae7b29047d lisp/ob-dot.el: Add Justin Abrahms as the maintainer 2020-10-28 09:59:25 +01:00
Bastien 4d3eaf85a3 lisp/ob-mscgen.el: Add Justin Abrahms as the maintainer 2020-10-28 09:59:13 +01:00
Bastien b499b0827d lisp/ob-screen.el: Add Ken Mankoff as a maintainer 2020-10-28 09:56:23 +01:00
Bastien 1d105a4298 lisp/ob-eshell.el: Add stardiviner as the maintainer 2020-10-28 09:52:01 +01:00
Kyle Meyer 0d314a0473 Merge branch 'maint' into master 2020-10-27 00:05:03 -04:00
Kyle Meyer e8070d71ab Revert "org.el: Allow empty subtrees to be folded back"
* lisp/org.el (org-cycle-internal-local): Revert
ee3c3b5547, which does not appear to
have addressed the original issue and breaks cycling with empty lines.

Reported-by: B Goodr <bgoodr@gmail.com>
Ref: https://orgmode.org/list/CAJj=8EFJXFu9ZQ11cO24AAu=1jykW2Zr+=R4FLuKG=bLjfUe+g@mail.gmail.com
Reported-by: Mikhail Skorzhisnkii <mskorzhinskiy@eml.cc>
Ref: https://orgmode.org/list/87h7qu10ht.fsf@eml.cc
2020-10-26 23:52:01 -04:00
Bastien e753766bc2 lisp/ob-abc.el: Add William Waites as the maintainer 2020-10-26 12:18:17 +01:00
Bastien 36f4df8925 lisp/ob-R.el: Add Jeremie Juste as a maintainer 2020-10-26 10:52:12 +01:00
Bastien eecc491f1c lisp/ob-clojure.el: Add bzg@gnu.org as the maintainer 2020-10-26 08:55:32 +01:00
Ian Martins 5a41c62c26 ob-java.el: Use customizable commands, avoid incompatability
* lisp/ob-java.el: Use customizable variables for java compiler and
runtime commands.  Move variable declarations to fix byte-compile
warnings.  Change Author.  Change tabs to spaces.

A recent patch replaced `defcustom' with `defvar' for variables that
point to the java compiler and runtime commands, which would break
functionality for anyone who had customized the variable.  This
reverts that change.

ob-java is using features not available on older versions of emacs
which org supports.  This replaces them with alternatives.
2020-10-25 15:24:08 -04:00
Ian Martins 5b6d774ba1 ob-java.el: Allow non-public classes
* lisp/ob-java.el: Don't require class definitions to be declared
public.

* testing/lisp/test-ob-java.el: Add test with non-public class.
2020-10-25 15:24:08 -04:00
John Herrlin 045ab0096a ob-java.el: Fix spacing in generated main method
* lisp/ob-java.el: Correct Indentation of closing curly braces when
the default main method is used.
2020-10-25 15:24:08 -04:00
Ian Martins 6edfc2b57c ob-java.el: Add support for variables, return values, tramp
* lisp/ob-java.el: Add support for variables and return values.  Write
tempfiles to the `org-babel-temporary-directory'.  Make package,
class, and main method definitions optional.

* testing/lisp/test-ob-java.el: Add tests.

ob-java was missing features common to many other org-babel
implementations, such as the ability to accept variables and return a
value. This brings those features to ob-java, making the experience
more consistent across org-babel languages, and expanding the ways
java source blocks interact with org mode buffers.

A simple java program requires boilerplate code to declare a class and
main method.  This boilerplate code makes java source blocks more
tedious to write and more effort to read.  This is more evident in an
org buffer where there may be many small source blocks.  This change
makes that code optional.  If it is not provided, the source block
will be wrapped in the boilerplate code just before compilation.

Most org babel implementation write temporary files to the
`org-babel-temporary-directory'.  That avoids polluting the current
directory and provides built-in support for tramp.  ob-java would
write source files and binaries to the directory containing the org
file by default.  This may be unexpected and unwanted, and didn't work
with tramp.  This change writes all tempfiles to the
`org-babel-temporary-directory'.

Executing an ob-java source block would always try to compile and run
the code in the source block, so a source block that wasn't
runnable (didn't contain a main method) would error during run.  This
change adds a generic main method just before compilation if one isn't
included in the source block so that the run will succeed.

There were no tests for ob-java.  This adds tests.
2020-10-25 15:24:08 -04:00
Kyle Meyer d43cc7988f Merge branch 'maint' into master 2020-10-25 01:12:00 -04:00
Stefan Kangas 47bf6005b3 Backport commit dd16e46bb from Emacs
; Prefer https to http in more URLs
dd16e46bb9d0099baea06d780ad8f62728addc2e
Stefan Kangas
Sat Oct 24 20:23:27 2020 +0200
2020-10-25 01:10:16 -04:00
Stefan Kangas 0193b543e9 Backport commit 4a575eb18 from Emacs
byte-compile-file: Make optional LOAD argument obsolete
4a575eb18cca3eed5019f2d2d2abeea1f0c07005
Stefan Kangas
Tue Oct 20 18:48:27 2020 +0200
2020-10-25 01:10:16 -04:00
Jack Kamm 7ae31038e7 Merge branch 'maint' into master 2020-10-24 07:03:09 -07:00
Adrian Kummerlaender a442c2515d ob-python: Rename exec tmpfile handle to prevent conflict
* lisp/ob-python.el (org-babel-python--exec-tmpfile): Rename tmpfile handle
(org-babel-python-format-session-value): Rename tmpfile handle

Opening the exec tmpfile as a `f' variable shadows any such variable
that might by defined by the Python session context. e.g. my Org babel
files commonly pass single letter variables inside a session which is
broken by this behavior.

The new name `__org_babel_python_tmpfile' is in line with other org
mode specific Python variables set by ob-python.  This is unlikely to
conflict with the user's Python code.

TINYCHANGE
2020-10-24 07:01:27 -07:00
Matt Huszagh ae35a34590 ob-latex.el: Make latex to svg compilation very customizable
* lisp/ob-latex.el (org-babel-latex-preamble): New option for LaTeX
preamble customization.
(org-babel-latex-begin-env): New option for LaTeX document environment
begin customization.
(org-babel-latex-end-env): New option for LaTeX document environment
end customization.
(org-babel-latex-pdf-svg-process): New option for converting a pdf to
svg.
(org-babel-execute:latex): Add specific case for svg generation from
LaTeX block.
2020-10-24 14:28:29 +02:00
fpi 95ed6badc0 ob-gnuplot: Download remote input files
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): When variables
point to remote files, download them and use a local copy instead.

TINYCHANGE
2020-10-24 14:14:02 +02:00
Protesilaos Stavrou 7ebb2d5629 Review face for export dispatcher highlighted keys
* lisp/org-faces.el (org-dispatcher-highlight): Define new face.

* lisp/ox.el (org-export--dispatch-ui): Apply org-dispatcher-highlight
face.

The intent is to decouple the dispatcher's interface from the generic
org-warning face.  The dispatcher's active keys are thus made easier
to tell apart, without interfering with other applications of
org-warning.
2020-10-24 13:44:42 +02:00
Bastien e5bf534e14 Merge branch 'maint' 2020-10-24 13:38:49 +02:00
Aaron Madlon-Kay 3ce495cc44 ob-ruby.el: allow specification of ruby command w/header arg
b-ruby.el: Use the :ruby header arg

* lisp/ob-ruby.el (org-babel-execute:ruby): Locally set
`org-babel-ruby-command' using a header argument.

TINYCHANGE
2020-10-24 13:37:25 +02:00
Bastien 343c5e5679 Merge branch 'maint' 2020-10-24 13:34:30 +02:00
Adam Spiers 752c466a63 org-agenda.el: Fix typo in docstring
* lisp/org-agenda.el (org-agenda-new-marker): Fix typo in docstring.

TINYCHANGE
2020-10-24 13:34:02 +02:00
Kyle Meyer a88806b554 Merge branch 'maint' into master 2020-10-20 00:39:54 -04:00
Kyle Meyer edfafa9090 org.el: Autoload org-load-modules-maybe
* lisp/org.el (org-load-modules-maybe): Autoload.

org-store-link and orgtbl-mode both 1) call org-load-modules-maybe at
the start of their execution, 2) can be used outside of Org mode, and
3) are in libraries that do not load org.el (instead org.el loads
them).  Autoload org-load-modules-maybe to avoid an error if these are
called before org.el is loaded.

Reported-by: Tim Frana <tfr@mailbox.org>
Ref: https://orgmode.org/list/5e0f0216-44d8-c909-3757-4d95650445ef@mailbox.org
2020-10-20 00:39:28 -04:00
Martin Kampas 90b14cb409 org-colview: Fix done keywords highlighting in agenda buffers
* lisp/org-colview.el (org-agenda-columns): Populate
org-done-keywords from org-done-keywords-for-agenda or the done keywords
will use the same face as those not-done.

TINYCHANGE
2020-10-20 00:35:11 -04:00
Kevin J. Foley 2d1e2606e7 org-refile.el (org-refile): Add description of RFLOC to docstring
* lisp/org-refile.el (org-refile): Document structure of RFLOC
parameter.
2020-10-20 00:35:10 -04:00
Kyle Meyer 8402c4a778 Merge branch 'maint' into master 2020-10-11 02:08:55 -04:00
Kyle Meyer ba6cf4645f org.el: Avoid repeated calls in org-font-lock-add-priority-faces
* lisp/org.el (org-font-lock-add-priority-faces): Let-bind bounds to
avoid repeated calls.

This will also make the conflict resolution in the next merge of maint
clearer.
2020-10-11 02:07:39 -04:00
Kyle Meyer b1de0c8e4b Fix regression in priority fontification
* lisp/org-agenda.el (org-agenda-fontify-priorities):
* lisp/org.el (org-font-lock-add-priority-faces): Fontify up to the
end of the closing bracket of the priority, as was the case before
v9.4.

7b1077def (Tiny enhancements to priority handling, 2020-01-30)
switched org-agenda-fontify-priorities and
org-font-lock-add-priority-faces over to using org-priority-regexp
rather than inline regexps.  For the inline regexps, the first group
ended at the closing bracket, but the first group in
org-priority-regexp includes an optional space, leading to the face
extending one character too far.

Restore the bound to the closing bracket by determining the bound
based on the second group, the priority label, instead.

Reported-by: Roman Rudakov <rrudakov@pm.me>
Helped-by: Protesilaos Stavrou <info@protesilaos.com>
Ref: https://orgmode.org/list/87r1r2kh77.fsf@pm.me
2020-10-11 02:04:11 -04:00
Adrian Kummerlaender 1f1644396b ob-python: Rename exec tmpfile handle to prevent conflict
* lisp/ob-python.el (org-babel-python--exec-tmpfile): Rename tmpfile handle
(org-babel-python-format-session-value): Rename tmpfile handle

Opening the exec tmpfile as a `f' variable shadows any such variable
that might by defined by the Python session context. e.g. my Org babel
files commonly pass single letter variables inside a session which is
broken by this behavior.

The new name `__org_babel_python_tmpfile' is in line with other org
mode specific Python variables set by ob-python.  This is unlikely to
conflict with the user's Python code.

TINYCHANGE
2020-10-10 16:05:21 -07:00
Protesilaos Stavrou 23f9415c6a Make headline faces precede checkbox statistics
* lisp/org.el (org-set-font-lock-defaults): Apply `prepend' to
checkbox statistics.  Affects `org-checkbox-statistics-done' and
`org-checkbox-statistics-todo'.

This builds on commit 979e82fc3: org-level-N faces are no longer
overridden by elements placed on top of them.
2020-10-07 23:29:35 -04:00
Kyle Meyer 6a182b690f Merge branch 'maint' into master 2020-10-07 00:43:35 -04:00
Nicholas Vollmer f0902bf185 org.el (org-display-outline-path): Fix invalid face reference error
* lisp/org.el (org-display-outline-path): Use an anonymous face when
adding default :height to outline path.
2020-10-07 00:41:46 -04: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
Nicolas Goaziou 41651f4ed0 id: Close unnecessary buffers after having looked for an ID
* lisp/org-id.el (org-id-find-id-in-file): When the file was not being
visited, and the caller didn't request a marker pointing to the ID
location, close the newly created buffer.

Reported-by: this nkk <thisnkk@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-09/msg01018.html>
2020-10-06 12:11:58 +02:00