0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-22 15:48:31 +00:00
Commit graph

23805 commits

Author SHA1 Message Date
Matt Huszagh 2af68d6a45 etc/ORG-NEWS: Add an entry 2020-12-14 09:18:53 +01:00
TEC 1af809c573 org-manual.org: document org-plot changes
* doc/org-manual.org: Document changes to org-plot.el.
2020-12-14 06:38:59 +01:00
TEC a831e763fa org-plot.el: Make min/max keywords consistent
* lisp/org-plot.el: (org-plot/add-options-to-plist): Have both x/y
min/max, but have min/max aliased to the y-axis options.
2020-12-14 06:38:57 +01:00
TEC 90815cc948 org-plot.el: radar plot, join last points to first
* lisp/org-plot.el (org--plot/radar-template, org--plot/radar):
Duplicate first points at the end so that a line is drawn between them.
2020-12-14 06:38:56 +01:00
TEC a46cadfae3 org-plot.el: add missing cl- prefixes
* lisp/org-plot.el ( org--plot/merge-alists, org--plot/item-frequencies,
org--plot/prime-factors): Add missing cl- prefic to cl-lib functions
called.
(org--plot/radar): Refactor f function to remove dependency.
(org--plot/values-stats, org--plot/nice-frequency-pick): Autoformatting.
2020-12-14 06:38:55 +01:00
TEC c2fdf424a6 org-plot.el: avoid arithmetic overflow error
* lisp/org-plot.el (org--plot/values-stats): A set of numbers with the
same value (i.e. 0 range) should not produce an arithmetic overflow
error.

This error was caused by taking the log of 0 (when the range is
0).  This is mitigated by explicit checking against this case.
2020-12-14 06:38:53 +01:00
TEC 1ac45d76e8 org-plot.el: complete transition to softcoded type
* lisp/org-plot.el (org-plot/preset-plot-types): Adapt structure to
cover all type-specific logic within org-plot.
(org-plot/gnuplot-script, org-plot/gnuplot): Replace type-specific logic
with references to properties of the type from
`org-plot/preset-plot-types'.
2020-12-14 06:38:52 +01:00
TEC 14a66b2b3a org-plot.el: fix logic error in transposition
* lisp/org-plot.el (org-plot/gnuplot): If statement in transposition
treated condition as its negative, to fix this the condition was
inverted.

It was also noticed that the code could not operate as expected as the
user-supplied #+plot options were not fetched.  Resolved by re-inserting
relevant code from an older version of org-plot.
2020-12-14 06:38:51 +01:00
TEC 74f6a9610e org-plot.el: add radar plot type
* lisp/org-plot.el (org--plot/radar): Implement a new plot type "radar".
(org--plot/radar-template): A huge template sting for `org-plot/radar'.
(org--plot/radar-ticks, org--plot/radar-setup-template): Smaller
template strings for use in `org-plot/radar'.
(org-plot/preset-plot-types): Add the new "radar" type to the list of
default types.

The radar type has a long and complex implementation, but that's exactly
what makes it perfect for something like this. A complex plot can be
produced with a simple keyword in the #+PLOT options. There are still a
few kinks that would benefit from being ironed out, but the current
state is fully-functional.
2020-12-14 06:38:50 +01:00
TEC 7b5113a3bc org-plot.el: tweak term, preamble custom vars
* lisp/org-plot.el (org-plot/gnuplot-script): Call the term and preamble
functions (mentioned below) with the plot type as the argument.
(org-plot/gnuplot-script-preamble, org-plot/gnuplot-term-extra): update
docstring.
2020-12-14 06:38:49 +01:00
TEC e905353d6e org-plot.el: add custom var for affecting the term
* lisp/org-plot.el (org-plot/gnuplot-term-extra): New option to let
the user to tweak the gnuplot term settings.  This allows for setting
characteristics such as default size, or background colour.
(org-plot/gnuplot-script): Use the new option for customisation of
org-plot's term.
2020-12-14 06:38:48 +01:00
TEC 73c99bf42d org-plot.el: add utility functions for range,ticks
* lisp/org-plot.el (org-plot/add-options-to-plist): Add the options :ymin
:ymax :xmin :xmax, as well as :min and :max as aliases to the y{min,max}
options.  The :ticks option is also added, for specifying how many ticks
should be used.
(org--plot/values-stats, org--plot/sensible-tick-num,
org--plot/nice-frequency-pick, org--plot/merge-alists,
org--plot/item-frequencies, org--plot/prime-factors): New utility
functions added to allow for somewhat sensible determination of a :ticks
value when none is provided.  This turns out to be harder than expected,
and so a number of functions are used to attempt to do so.  The essence
of the method used, is to round values and find their prime
decompositions.  From this we try to select the most common components
to give a reasonable step size.  We also add a 'ticks' parameter for
manually setting the number of ticks, and (y)min/max parameters
similarly.
2020-12-14 06:38:47 +01:00
TEC bee7ef6f46 org-plot.el: abstract plot types into custom var
* lisp/org-plot.el (org-plot/preset-plot-types): New option to declare
plot types and provide a lambda which is called with a fixed signature
to generate associated gnuplot code.  The previously hardcoded types
are implemented as the default value.
(org-plot/gnuplot-script): Abstract the generation of gnuplot commands
from the three hardcoded types: 2d, 3d, and grid.
2020-12-14 06:38:46 +01:00
TEC a1d92bd918 org-plot.el: add new custom gnuplot preamble
* lisp/org-plot.el (org-plot/gnuplot-script-preamble): New option
which can be either a string or a function.  The value of this (when
executed, in the case of the function) is inserted near the top of the
generated gnuplot script.
(org-plot/gnuplot-script): Use the new variable
`org-plot/gnuplot-script-preamble' in the manner described.

This allows for the user to set the font/colour-scheme, default
precision, and much more.
2020-12-14 06:38:44 +01:00
TEC 8d5122fc5e org-plot.el: add new option :transpose
* lisp/org-plot.el (org-plot/add-options-to-plist,
org-plot/add-options-to-plist): Add a new option :transpose, and a
shorter alias :trans.  Transposition is performed if the argument is yes,
y, or t.  This treats the table as a matrix and performs matrix
transposition on it.  If an hline is present, it is assumed that it is a
marks a separation from a first header row.  The first row is then
treated as the new header by inserting a hline in the transposed data.
This is quite useful for some plots, where across multiple categories,
there are a large number of data points.  Without this, the data points
would be columns and the table can spread irritatingly wide.
2020-12-14 06:38:42 +01:00
TEC a64aa25fa5 org-plot.el: make indentation method consistent
* lisp/org-plot.el (org-plot/gnuplot): Make indentation consistent, by
replacing a few spaces with tabs.

Only 6 of 347 lines used spaces instead of tabs.
2020-12-14 06:38:39 +01:00
Bastien 9359835001 contrib/lisp/ob-julia.el: Add Alberto Ramos as maintainer 2020-12-14 06:27:44 +01:00
Bastien 349322161d lisp/ob-perl.el: Add Corwin Brust as maintainer 2020-12-14 06:25:28 +01:00
Bastien 36b9db60fe Merge branch 'maint' 2020-12-13 21:11:07 +01:00
Bastien 162e0e3e6e lisp/org.el: Bump version to 9.4.2 2020-12-13 21:10:13 +01:00
Kyle Meyer f845305c31 Merge branch 'maint' 2020-12-13 14:56:59 -05:00
Juri Linkov 57a70d5053 ob-ruby.el: Funcall command if it's a function from inf-ruby-implementations
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): When 'command'
is a function from 'inf-ruby-implementations', use 'funcall' to get
a command string for the first arg of 'run-ruby-or-pop-to-buffer'.
This is like what 'run-ruby' does.

Reported-by: Aaron Madlon-Kay <aaron@madlon-kay.com>
Ref: https://orgmode.org/list/CAHvKJZsAUtYOKV1bH_r9BXqE_d6k11qg4dfxvqCUVUxjmGohGw@mail.gmail.com
2020-12-13 14:54:09 -05:00
Kyle Meyer d7d714c7d5 Silence byte-compiler in Emacs repo
These show up in the Emacs repo (before and after the latest sync in
f22856a5c5), but for an unknown reason do not show up with `make
compile' or `make single' in the Org repo.

All of these functions are autoloaded.
2020-12-13 13:56:29 -05:00
Kyle Meyer 72f65744b7 Merge branch 'maint' 2020-12-12 23:17:51 -05:00
Kyle Meyer 8fafb71fea org-startup-options: Fix docstring typo
* lisp/org.el (org-startup-options): Fix docstring typo.
2020-12-12 23:17:30 -05:00
Kyle Meyer 5dc375434c Clean up spacing to pass Emacs's pre-commit check
* lisp/org-agenda.el (org-agenda-todo): Avoid space before tab in
indent.

This is in preparation for syncing with the Emacs repo.
2020-12-12 14:41:42 -05:00
Kyle Meyer 61f37f2e1a lisp/org.el: Bump version to 9.4.1
* lisp/org.el: Bump version to 9.4.1.
2020-12-12 14:34:08 -05: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 f6e41c1d14 org-id: org-id-get-with-outline-path-completion for file targets
* lisp/org-id.el (org-id-get-with-outline-path-completion): Make the
function work also for files (outline level 0)
2020-12-11 11:27:23 +01:00
Bastien 2bae9a3e49 Merge branch 'maint' 2020-12-11 08:58:06 +01:00
Bastien 7ce1a666d8 lisp/ob-abc.el: Fix link to William Waites homepage 2020-12-11 08:57:44 +01:00
Fatih Aydin dc1e037cd1 ox: Add Turkish translation
* lisp/ox.el (org-export-dictionary): Add Turkish translation.

TINYCHANGE
2020-12-10 23:24:02 -05:00
Kyle Meyer 25777d6e2c Merge branch 'maint' 2020-12-10 23:23:56 -05:00
Ihor Radchenko a03f17e49f Fix org-in-archived-heading-p
* lisp/org.el (org-in-archived-heading-p): When called on a heading
with a tag containing org-archive-tag string as a substring, that
heading was incorrectly recognised as archived.  Changed matching
against the whole :tag1:tag2:...: string to matching against tag list
as returned by `org-get-tags'.
* testing/lisp/test-org.el (test-org/in-archived-heading-p): Add test
when one of the heading tags contains org-archive-tag as a substring.
2020-12-10 22:25:12 -05:00
Bastien 0571aa7010 lisp/ob-C.el: Add Thierry Banel as the maintainer 2020-12-10 12:13:24 +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
Kyle Meyer 752f01fdc6 Merge branch 'maint' 2020-12-10 00:49:20 -05:00
Kyle Meyer e04aa83309 refile: Update remaining spots that use obsolete org-copy
* lisp/org-refile.el (org-refile): Update docstring to refer to
org-refile-copy rather than obsolete alias org-copy.
2020-12-10 00:49:15 -05:00
Kyle Meyer cf02219e72 org: Reset saved scroll position on new cycling sequence
* lisp/org.el (org-optimize-window-after-visibility-change): Reset
org-scroll-position-to-restore if it is not a repeated call.

The org-scroll-position-to-restore variable is used to save the
position, but the position may be from a cycling sequence other than
the current one.  Reset it at the start of a sequence.
2020-12-10 00:48:29 -05:00
Kyle Meyer 4f8ac0a7a3 org.el: Fix cycling hang when %p is in frame-title-format
* lisp/org.el (org-optimize-window-after-visibility-change): Guard
against calling set-window-start with a nil POS argument.

org-optimize-window-after-visibility-change calls set-window-start
with org-scroll-position-to-restore when it is a repeat call
(i.e. last-command and this-command match).  However,
org-scroll-position-to-restore may not have yet been set yet (e.g. if
org-startup-folded is at its default value of showeverything).

Calling set-window-start appears to generally be a noop, but, for a
reason that I don't understand, it triggers a hang when %p is in
frame-title-format.

Reported-by: Massimo Lauria <massimo.lauria@uniroma1.it>
Ref: https://orgmode.org/list/CAJCFsEEHJXP4nKZpWdzheMM5O0Dq-tT+v0u0FsT+3Q0mi4v10A@mail.gmail.com
2020-12-10 00:48:24 -05:00
Kyle Meyer 3e39f82cd4 Merge branch 'maint' 2020-12-08 23:50:56 -05:00
Kyle Meyer 2eb5f0741f org-fixup-indentation: Fix regression in logbook adjustment
* lisp/org.el (org-fixup-indentation): Don't call indent-line-to with
a negative value.
* testing/lisp/test-org.el (test-org/promote):
(test-org/demote): Add tests.

The handling added in 11ef7454a (org.el (org-fixup-indentation): Fix
logbook drawers indentation, 2020-09-07) calls indent-line-to with a
value equal to the sum of current indentation and the DIFF argument,
but this can lead to a type error because DIFF may be negative.

Note that, aside from the headline-data test cases, the added tests on
top of the parent of e3b79ad2b (Allow a new value for
`org-adapt-indentation', 2020-02-09), which added the initial logbook
special case to org-fixup-indentation.

Reported-by: Duianto <otnaiud@gmail.com>
Ref: https://orgmode.org/list/CAE-tX7i5ew3ED3YX6jjx57qNuRtV0AumWKuE0W83YUUReKE5-g@mail.gmail.com
Reported-by: stardiviner <numbchild@gmail.com>
Ref: https://orgmode.org/list/CAL1eYuKObYzY2MHSQ+W08mW3TZ+83H45teOq_rHq9qz7-FEgKw@mail.gmail.com
2020-12-08 23:48:16 -05:00
Nicolas Goaziou 7c8dce72bd ox-latex: Improve handling of footnotes within verse blocks
* lisp/ox-latex.el (org-latex-footnote-reference): Use the footmark +
footnotetext combination for footnotes in verse environments.
(org-latex-verse-block): Use `org-latex--delayed-footnotes-definitions'.

Reported-by: Juan Manuel Macías <maciaschain@posteo.net>
<http://lists.gnu.org/r/emacs-orgmode/2020-12/msg00006.html>
2020-12-05 10:05:46 +01:00
Kyle Meyer b0a3079970 Merge branch 'maint' 2020-12-04 00:36:08 -05:00
Stefan Kangas 706ba90195 Backport commit 0a4aa2894 from Emacs
* lisp/org.el: Don't require 'font-lock'; it is preloaded since
version 22.1.

Remove redundant requires of 'font-lock'
0a4aa2894297c0fd9e735328bbb60b427e0ba5d4
Stefan Kangas
Thu Dec 3 08:50:14 2020 +0100
2020-12-03 19:20:23 -05:00
Kyle Meyer f874644e5b Merge branch 'maint' 2020-11-30 23:52:09 -05:00
Kyle Meyer 3bb073b638 ol: Fix type error in org-link-search corner case
* lisp/ol.el (org-link-search): Account for orphan #+name keyword.

If #+name is followed by a blank line (making it an invalid affiliated
keyword), :name is nil.

Reported-by: Dima Kogan <dima@secretsauce.net>
Ref: https://orgmode.org/list/875z5xf7f7.fsf@secretsauce.net
2020-11-30 23:49:48 -05:00
Kyle Meyer d1c7cd3ca4 Merge branch 'maint' 2020-11-28 17:21:35 -05:00
Kyle Meyer c974467fe5 org-goto: Explicitly load org.el and org-refile.el
* lisp/org-goto.el: Require org.el and org-refile.el.

org-goto.el depends on org.el and org-refile.el being loaded, and the
autoloaded org-goto command may be called before org.el and
org-refile.el are loaded (and an org-refile.el load won't be triggered
just by visiting an Org file).

Reported-by: Omar Antolín Camarena <omar@matem.unam.mx>
Ref: https://orgmode.org/list/87h7pil2v5.fsf@matem.unam.mx
2020-11-28 17:21:14 -05:00