Commit graph

16962 commits

Author SHA1 Message Date
Jim Porter be0cdd1e52 org-mouse: Support intermediate-state checkboxes
* lisp/org-mouse.el (org-mode-hook): Use regexp from
`org-set-font-lock-defaults' and set font-lock keywords more robustly.

TINYCHANGE
2021-09-26 07:56:00 +02:00
Rodrigo Morales e0535fa2d8 ob-sql.el (org-babel-expand-body:sql): Support :prologue :epilogue
* lisp/ob-sql.el (org-babel-expand-body:sql): Add support for
:prologue and :epilogue parameters.

TINYCHANGE
2021-09-26 07:50:47 +02:00
Sébastien Miquel 70e65a2028 org-src.el: Do not indent blank lines, except current one
* lisp/org-src.el (org-src--contents-for-write-back): Do not indent blank lines, except for the
current line maybe.
(org-src--preserve-blank-line): New variable, whether to preserve
indentation of the current blank line.
(org-src--edit-element): Set `org-src--preserve-blank-line'.
* lisp/org.el (org-indent-line): When tab acts natively, do some
preindentation, which signals `org-src--edit-element' to
preserve the indentation of current blank line.

Removing all the whitespace was the original behaviour for all blank lines, before `857ae366b3`.
2021-09-26 07:47:40 +02:00
Bastien ee0fd1ec31 Revert "org-src.el (org-src--contents-for-write-back): Do not indent blank lines"
This reverts commit 35690cd04f.
2021-09-26 07:47:24 +02:00
Sébastien Miquel 35690cd04f org-src.el (org-src--contents-for-write-back): Do not indent blank lines
* lisp/org-src.el (org-src--contents-for-write-back): Do not indent
blank lines, except for the current line.

This was the original behaviour for all blank lines, before `857ae366b3`.
2021-09-26 07:46:42 +02:00
Tom Gillespie 9364b2d894 lisp/ox-html.el: Restore org-svg class.
* lisp/ox-html.el (org-html--format-image): Restore org-svg class.
d96e897579 removed the org-svg class
which is necessary even when using <img> tags otherwise svg images
will render at absurdly large sizes.
2021-09-25 23:17:44 +02:00
Bastien faf1ba8cde Merge branch 'bugfix' 2021-09-25 23:09:50 +02:00
Ihor Radchenko 97de19f659 Fix not updating org-clock-marker after refiling from indirect buffer
* lisp/org.el (org-check-and-save-marker): Save markers in base buffer
of indirect buffer in addition to markers in current buffer.

Fixes bug reported in https://orgmode.org/list/CABa5=g4bvYQoTbBn96tFi9K827u_A+MweqYWWpib_tyFLBdG3g@mail.gmail.com/T/#t
2021-09-25 23:09:37 +02:00
Juan Manuel Macias 18f6ef8c3f ox.el: add smart quotes for greek
* lisp/ox.el (org-export-smart-quotes-alist): The correct quotes for
Greek have been established with the help of Protesilaos Stavrou, who
has contributed a style guide for the European institutions:
http://publications.europa.eu/code/el/el-4100107el.htmq On the correct
character for Greek second-level opening quotes, according to Yannis
Haralambous (`From Unicode to Typography, a Case Study: the Greek
Script' (1999, p. 20), a symbol equivalent to the Unicode character
U+201F is historically attested. But it seems that the current trend
in Greece is to apply the character U+201C, more commonly used in
other languages. Haralambous himself, in a recent consultation,
states: `[...] U+201C is a good choice for representing that grapheme
since it is used in most countries of the world...'
2021-09-25 22:54:05 +02:00
Nicholas Vollmer 4d1a77aec6 org-attach: Fix byte-comp function warning
* (org-attach.el): Declare function for byte compiler.
2021-09-25 22:46:34 +02:00
Nicholas Vollmer 74a5af619c Fix byte-comp function warnings
* (org.el, org-table.el org-keys.el) Declare functions for byte compiler.
2021-09-25 21:31:25 +02:00
Nicholas Vollmer d8b9bd05ba Fix byte-comp function warnings
* (org.el, org-table.el org-keys.el) Declare functions for byte compiler.
2021-09-25 21:30:32 +02:00
Bastien 769a557ceb Merge branch 'bugfix' 2021-09-25 18:17:46 +02:00
Ihor Radchenko 399481bad1 Do not ignore user-defined display-buffer-alist in org-insert-link
* lisp/ol.el (org-insert-link): Handle case when *Org Links* window is
not created.
* lisp/org-macs.el (org-no-popups): Do not override
`display-buffer-alist'. Use `pop-up-windows' instead.
2021-09-25 18:17:32 +02:00
Bastien 777c1c3cb5 Merge branch 'bugfix' 2021-09-25 18:02:19 +02:00
Max Nikulin ec7c16a060 ox-latex: Allow percent sign in 'src-block' caption
* lisp/ox-latex.el (org-latex-src-block): Prevent leak of percent sign
from caption to `format' first argument causing export failure due to
insufficient argument number.  The fix covers only the case of verbatim
environment.
* testing/lisp/test-ox.el
(test-org-export/latex-src-block-verbatim-caption): New test for src
block LaTeX export with cases of various formatting of caption and
verbatim environment.  Check that percent signs in caption and source
block body do not lead to errors.

Reported-by: Charest, Luc <charest.luc@hydroquebec.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2021-08/msg00017.html>
2021-09-25 18:02:08 +02:00
Ihor Radchenko a3c912cb29 Fix duplicate logbook entry for repeated tasks
* lisp/org.el (org-add-log-setup): Always run `org-add-log-note' via
`post-command-hook'.  Otherwise, there is no way to know if a note was
requested for `this-command'.  Running `org-add-log-note' directly
would, for example, break `org-auto-repeat-maybe' as reported in [1].

* lisp/org-agenda.el (org-agenda-todo): Avoid reintroducing the bug
fixed in c670379adf.

* testing/lisp/test-org.el: Add test checking the reported bug.

[1] https://orgmode.org/list/CAOn=hbcaW1R6vtun-E2r4LS=j3dp=VjqmjGtzy8UC1SyPArKbA@mail.gmail.com
2021-09-25 17:23:53 +02:00
Bastien 179ae6b232 Merge branch 'bugfix' 2021-09-25 17:16:49 +02:00
Ihor Radchenko 6a2c48704b Avoid infinite loop in org-agenda-dim-blocked-tasks
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): When the blocked
task is the last line in agenda buffer and no trailing newline is
present, (move-beginning-of-line 2) would not move the point causing
infinite loop.  Now, such case is handled correctly.
2021-09-25 17:16:38 +02:00
David Lukes b967a05fbc org-indent: Allow indentation per level to be 0
* lisp/org-indent.el (org-indent--compute-prefixes): Prefixes should
only be computed when `org-indent-indentation-per-level' is greater than
0.  For one thing, the current algorithm leads to an error otherwise,
and for another, this makes it possible to use org-indent just to
preserve indentation on continuation lines, without adding any
additional indentation per level (by setting the option to 0).

TINYCHANGE
2021-09-25 16:40:28 +02:00
Utkarsh Singh e626185081 org-table.el: Fix usage of user-error
* lisp/org-table.el (org-table-convert-region): Don't use `if' because
  Elisp has no concept of continuable errors.
2021-09-25 16:23:54 +02:00
Pedro Bruel bf1c4c7575 Include support for evaluating julia code
* lisp/ob-julia.el: included from org-contrib
* testing/lisp/test-ob-julia.el: start adapting from testing/lisp/test-ob-python.el
2021-09-25 16:00:02 +02:00
Bastien 26b0297f65 Merge branch 'bugfix' 2021-09-25 15:53:16 +02:00
Maxim Nikulin 3f5605e66c org-agenda.el: Avoid dependency on subr-x
* lisp/org-agenda.el (org-agenda-highlight-todo): Do not use `string-empty-p'.

Restore compatibility with Emacs-24.3.
2021-09-25 15:53:07 +02:00
Ihor Radchenko c9dc6603a4
Fix org-babel-header-args:haskell not being an alist
* lisp/ob-haskell.el (org-babel-header-args:haskell): The old value of
the variable was not argument alist, as expected by Org babel code.

Fixes https://orgmode.org/list/87fsty7750.fsf@gmail.com
2021-09-21 16:51:54 +08:00
Bastien fb7574178c lisp/ob-gnuplot.el: Add Ihor Radchenko as maintainer 2021-09-20 09:27:50 +02:00
Kyle Meyer f5392c4f2b Merge branch 'km/from-emacs-master' 2021-09-19 22:39:03 -04:00
Marco Wahl d3d2e56bd6 oc: Replace an obsolete alias
* lisp/oc.el (org-cite--allowed-p): The replace removes the respective
  warning at compilation.
2021-09-20 00:38:28 +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
Morgan Willcock 3a77e59fc9
ox-ascii: Justify correctly with indent-tabs-mode
* lisp/ox-ascii.el (org-ascii--justify-lines): Ensure that
`indent-tabs-mode' is nil when applying indentation to justify lines.
As other parts of ox-ascii use spaces for adjustments, if
`indent-tabs-mode' is respected, ox-ascii will produce an an
inconsistently formatted export.  It's preferable to just force spaces
by binding `indent-tabs-mode' to nil.

TINYCHANGE
2021-09-20 00:57:43 +08:00
Mark Dawson ef31364bc8
ob-tangle: Fix incorrect buff name in org-src edit
* lisp/ob-tangle.el (org-babel-tangle): Fix stringp error which happens
when confirming successful tangle when `org-babel-tangle' is called from
an org-src edit buffer.

TINYCHANGE
2021-09-19 20:58:49 +08:00
Marco Wahl 069bcba529 org: Fix functionality of org-insert-heading
* lisp/org.el (org-insert-heading): Fix insertion of headings when
  point is before any heading in the case of "respect content" insertion.

Kudos to Victor Stoichita. https://orgmode.org/list/87lf4594t3.fsf@svictor.net/
2021-09-18 14:54:09 +02:00
TEC b02f1eae19
oc: Allow citations following an item bullet
* lisp/oc.el (org-cite--allowed-p): Expand the allowed cases to include
"item", which lets one insert a citation following a bullet, e.g. "- ".
We just have to check to make sure the citation actually is at least one
character away from the bullet, or five if a checkbox is present.
2021-09-18 13:41:21 +08:00
Stefan Kangas 7aeadf2504 Backport commit 3f9f3ba43 from Emacs
* lisp/org-timer.el (org-timer-set-timer):
* lisp/ox.el (org-export-dispatch-last-position): Use command
substitution for 'universal-argument' instead of raw "C-u".

Docfix: use command substitution for 'universal-argument'
3f9f3ba4370bd4d0f33392befb35328327d73b1e
Stefan Kangas
Thu Sep 16 20:05:48 2021 +0200
2021-09-18 01:40:56 -04:00
Stefan Kangas b4ce4d6d82 Backport commit 25ebb9374 from Emacs
; More minor docfixes found by checkdoc
25ebb9374bdadf66153727831fc7ff131c8cf299
Stefan Kangas
Tue Sep 14 07:57:14 2021 +0200
2021-09-18 01:39:24 -04:00
Stefan Kangas 215d80d02b
Fix a small number of typos 2021-09-17 17:01:57 +08:00
Stefan Kangas 51cdd6e30f Various minor docfixes found by checkdoc 2021-09-16 21:24:59 +02:00
Marco Wahl a7a69b954c org: Simplify doc
* lisp/org.el (org-end-of-meta-data): Drop unnecessary part around
"regular drawer".

Issue reported by Tom Davey.  https://orgmode.org/list/014801d7aa5c$c9057450$5b105cf0$@tomdavey.com
2021-09-16 10:41:47 +02:00
Kyle Meyer a246a13187 Merge branch 'km/from-emacs-master' 2021-09-12 23:35:16 -04:00
Eli Zaretskii d2deb188a6 Backport commit ff4de1bd8 from Emacs
* lisp/org.el:
* lisp/org-list.el (org-list-to-generic):
* lisp/org-compat.el: In comments, quote 'like this'.

Fix quoting style in Lisp comments
ff4de1bd88b8be4a7071884910ff601eb10fbad5
Eli Zaretskii
Sun Sep 12 19:51:06 2021 +0300
2021-09-12 23:34:08 -04:00
Stefan Kangas 9961abf75a Backport commit fc4b956c7 from Emacs
; Fix symbol quoting typos
fc4b956c7cb2fba8ed2a18865a7686c6cfa5d030
Stefan Kangas
Sun Sep 12 18:36:49 2021 +0200
2021-09-12 23:34:07 -04:00
TEC d70f280678
org-macs: Allow for nil ffap-url-regexp
* lisp/org-macs.el (org-url-p): `ffap-url-regexp' is allowed to be nil,
which is taken to mean urls should not be matched.  When this is set,
`string-match-p' errors.  To consider this case correctly, we check that
`ffap-url-regexp' is non-nil before calling `string-match-p'.

Reported-by: "Peder Stray" <peder.stray@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2021-09/msg00004.html>
2021-09-01 22:43:07 +08:00
Nick Dokos 1690fbd88f
org-colview: Fix dynblock match/maxlevel conflict
* lisp/org-coplview.el (org-columns--capture-view): Combine the match
and maxlevel arguments properly to construct the MATCH argument of
`org-map-entries'.

Specifying both `maxlevel' and `match' in a columnview dynamic block
does not work: the `match' argument is ignored in that case.  See the
link below for a (not so minimal) ECM.

Reported-by: Pablo A Perez-Fernandez
Link: https://emacs.stackexchange.com/questions/66658/filter-columnview-dblock-on-properties-or-tags
2021-08-31 22:40:34 +08:00
Yasushi SHOJI 18bc3a65b2
ob-core: Document the option 'none' for :results handling
The commit d4b739fbf2 added the "none" header argument but didn't
add it to the `org-babel-insert-result' documentation string.  Put it
in the doc string so that users can discover it.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-08-31 21:40:51 +08:00
Marco Wahl b1a74d4c7a agenda: Fix whitespace 2021-08-31 00:07:59 +02:00
TEC a3ba79cd3a
oc-csl: Prevent ' from being a LaTeX active char
* lisp/oc-csl.el (org-cite-csl-finalizer): The hanging LaTeX package
we're using also affects punctuation and makes `,.'"`?!:;' active
characters throughout the entire document.  That means a LaTeX snippet
like \(f'(x)\) will now make the document fail to compile.
See <https://tex.stackexchange.com/questions/61732/hanging-package-chokes-on-apostrophes>
for more information.  Adding the [notquote] option stops \(f'(x)\) from
being an issue.

In time it could be worth looking into replacing the hanging package
with some use of \parshape.
2021-08-23 18:34:30 +08:00
TEC 818bec57eb
oc-csl: Define \citeprocitem for LaTeX export
* lisp/oc-csl.el (org-cite-csl-finalizer): In order for
citeproc-generated references to be treated the same as bib(la)tex
references by hyperref, we need to make use of \hyper@linkstart.
However, this requires \makeatletter and \makeatother, which can only be
used in the preamble.  To allow citeproc-el to use \hyper@linkstart, we
add a command definition in the preamble, \citeprocitem.
2021-08-23 18:34:30 +08:00
Marco Wahl 3664447eb2 org-compat: Silence byte compiler for Emacsversion < 28
Check availablility of function directory-empty-p directly instead of
relying on Emacs version.

Thanks Maxim and Kyle for the help.  See
https://orgmode.org/list/87pmun8t2o.fsf@kyleam.com/ .
2021-08-15 11:01:39 +02:00
DPDmancul f51bf65f0f ox: Italian smart quotes
* ox.el (org-export-smart-quotes-alist): Added support for italian smart quotes.
2021-08-11 22:44:32 +02:00
Nicolas Goaziou e7454ceb79 oc: Call select-style function with a citation argument
* lisp/oc.el (org-cite--keys-to-citation): New function.
(org-cite-make-insert-processor): Use new function.  Change signature
of SELECT-STYLE.

Reported-by: "Bruce D'Arcus" <bdarcus@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-07/msg00638.html>
2021-08-11 12:11:34 +02:00