Commit Graph

24566 Commits

Author SHA1 Message Date
Nicolas Goaziou 30a6126bb9 oc: Fix `org-cite-fontify-default' docstring and simplify code
* lisp/oc.el (org-cite-fontify-default): We don't need to assume
activate processor may be used on a citation reference: that will not
happen.
2021-11-24 22:50:09 +01:00
Nicolas Goaziou 308f4cb570 oc: Ensure activation returns a non-nil value
* lisp/oc.el (org-cite-activate): Return a non-nil value when
successful, even if citation processor doesn't.
2021-11-24 22:39:50 +01:00
Ihor Radchenko 9044b300ee
org-test: Fix ERC errors using latest Emacs master
* testing/lisp/test-ob-C.el:
* testing/lisp/test-ob-awk.el:
* testing/lisp/test-ob-sed.el: Add missing provide.
* testing/lisp/test-property-inheritance.el: Fix incorrect feature
name.
* testing/org-test.el (org-test-load): Use `require' instead of
`load-file' to load tests.  `load-file' can lead to duplicate test
definitions that now trigger ERC errors.

See https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-11/msg01968.html
2021-11-24 20:06:15 +08:00
Ihor Radchenko 0d7cf4e402
test-ob.el: Remove duplicate test 2021-11-24 20:06:07 +08:00
Ihor Radchenko ce0f5c3beb
org-manual.org: Clarify how to handle markup ambiguity
* doc/org-manual.org (Emphasis and Monospace): Advice users to insert
zero width space to force Org ignore emphasis markers.
2021-11-23 21:41:11 +08:00
Ihor Radchenko 4b1def3c5c
org-table.el: Do not create new field when at EOL after table line
* lisp/org-table.el (org-table-justify-field-maybe): Do not treat "|$"
as unclosed table field.

Fixes https://orgmode.org/list/trinity-2561db57-1561-470b-982f-0d91ddf4f145-1629900012884@3c-app-mailcom-lxa06
2021-11-23 21:40:58 +08:00
Stefan Kangas c5d6656328 Backport commit 42d4e24ff from Emacs
; Fix typos
42d4e24ff3f13ccbd401d93d70ecdee99b88a26d
Stefan Kangas
Fri Nov 12 13:59:58 2021 +0100
2021-11-20 13:03:45 -05:00
Nicolas Goaziou a51e4dc710 ox-icalendar: Fix error dangling footnotes
* lisp/ox-icalendar.el (icalendar): Add an inner-template function so
as to not use "ox-ascii"'s.
(org-icalendar-inner-template): New function.

This fixes <https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg01478.html>
and <http://lists.gnu.org/r/emacs-orgmode/2021-11/msg00395.html>.

Footnote definition is lost, but references are already removed from
the description anyway, so the problem is not worse.
2021-11-19 09:53:13 +01:00
Marco Wahl 35e21b6161
org-goto: Fix UI
* lisp/org-goto.el (org-goto-location): Drop the wrap by
`org-no-popups'.  This restores the expected functionality of org-goto
with interface type 'outline.

See ml: https://list.orgmode.org/87mtnovv7f.fsf@alphapapa.net/.
2021-11-09 00:14:10 +08:00
Kyle Meyer ada13f916c test-oc: Fix incorrect expectation
* testing/lisp/test-oc.el (test-org-cite/main-affixes): Fix spacing in
an expected string.

Link: https://list.orgmode.org/878ry1ovz8.fsf@nicolasgoaziou.fr
2021-11-06 17:10:18 -04:00
Kyle Meyer 77e2ecd71f test-oc: Add missing space to test docstring 2021-11-06 13:21:52 -04:00
Nicolas Goaziou 4e185becbf oc-basic: Use `org-cite-main-affixes' when appropriate
* lisp/oc-basic.el (org-cite-basic-export-citation): Use
`org-cite-main-affixes' when appropriate.
2021-11-03 17:49:41 +01:00
Nicolas Goaziou d0201d5801 oc-csl: Fix global affixes
* lisp/oc-csl.el (org-cite-csl--create-structure): Properly
concatenate global affixes to the first or last cite, as intended.
2021-11-03 16:50:07 +01:00
Nicolas Goaziou ad40282860 oc: Refactor affixes extraction
* lisp/oc.el (org-cite-main-affixes): New function.
* lisp/oc-natbib.el (org-cite-natbib--build-optional-arguments): Use
new function.
* testing/lisp/test-oc.el (test-org-cite/main-affixes): New test.
2021-11-03 16:27:53 +01:00
Nicolas Goaziou 37c99e0874 oc-basic: Also extract year from "date" field
* lisp/oc-basic.el (org-cite-basic--get-year): Try extracting year
from "date" field when "year" field is empty.  Add optional argument
to prevent disambiguation mechanism.
(org-cite-basic--print-entry):
(org-cite-basic--key-completion-table): Use `org-cite-basic--get-year'
instead of `org-cite-basic--get-field'.
2021-11-03 16:12:42 +01:00
Nicolas Goaziou 95ad5a954b oc-csl: Small refactoring
* lisp/oc.el (org-cite-wrap-citation): Mention return value.
* lisp/oc-csl.el (org-cite-csl--create-structure): Use return value
from `org-cite-wrap-citation' instead of using `org-element-lineage'.
2021-11-02 18:39:09 +01:00
András Simonyi 16dcfdfa80 oc-csl: Fix footnote status reporting for wrapped citations
* lisp/oc-csl.el (org-cite-csl--create-structure): Update footnote information
when citation is wrapped in a footnote.
2021-11-02 18:34:28 +01:00
Vinicius f135889ca1 macro: Fix keyword macro with multiple keywords
* lisp/org-macro.el (org-macro-initialize-templates): Properly collect
multiple keywords' values with "keyword" macro.
2021-11-02 15:07:53 +01:00
Hanno Perrey e7085eaa57 Backport commit f1c928637 from Emacs
* doc/org-manual.org (Templates in contexts): Add missing parenthesis to
code example for org-capture template contexts as documented in
docstring.

; * doc/misc/org.org: fix capture context example
f1c9286376d570e898d349200412021fd67e13d2
Hanno Perrey
Sun Oct 31 16:23:41 2021 +0100
2021-11-01 20:46:17 -04:00
Nicolas Goaziou 52e6f1cf57 macro: Properly collect multiple authors
* lisp/org-macro.el (org-macro--collect-macros): Multiple lines are
allowed for AUTHOR keyword (per `org-export-options-alist') so make
sure we collect all of them.
* testing/lisp/test-org-macro.el (test-org-macro/author): Add test.

Reported-by: Vinicius Vinicius <vinicius.vin@yandex.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-10/msg00727.html>
2021-10-23 14:32:00 +02:00
Marco Wahl 37791bb4fc org-manual: Fix one kindex entry
Reminder: the kindex can be accessed via key "i" in info.  This fixes
also the pdf generation.
2021-10-18 15:09:58 +02:00
Kyle Meyer 9bc3a2b98d ORG-NEWS: Mention org-table-blank-field keybinding removal
The keybinding was dropped in the 9.5 release by 0c4e844c8 (Remove
default binding for org-table-blank-field, 2021-04-28), but the change
didn't come with a NEWS entry.  9.5 is already out, but add an entry
anyway because it will hopefully still help some users, including
those that use the Org that ships with Emacs.

Reported-by: Michael Brand <michael.ch.brand@gmail.com>
Link: https://list.orgmode.org/87lf2wcbqs.fsf@gnu.org
2021-10-16 13:55:45 -04:00
Nicolas Goaziou 745f0913fc oc-basic: Load unconditionally
oc-basic is used for opening links and for fontifying them out of the
box.
2021-10-15 19:41:11 +02:00
Nicolas Goaziou 009900d7fa oc: Add autoload cookie for `org-cite-insert'
* lisp/oc.el (org-cite-insert): Autoload function.
2021-10-13 22:22:22 +02:00
Nicolas Goaziou c83fe001c7 oc: Fix error message
* lisp/oc.el (org-cite-insert): Fix copy-pasta in error message.
2021-10-13 22:20:11 +02:00
Nicolas Goaziou 17e25c3f14 oc-csl: Map § and §§ o section locators
* lisp/oc-csl.el (org-cite-csl--label-alist): Map § and §§ o section
locators.
2021-10-11 23:58:17 +02:00
Nicolas Goaziou 18dca3478a oc: Upon inserting citations, add a space between keys
* lisp/oc.el (org-cite-make-insert-processor): Add a space in addition
to the semicolon.
2021-10-11 11:38:18 +02:00
Nicolas Goaziou eb40091929 oc-csl: Improve an error message
* lisp/oc-csl.el (org-cite-csl--style-file): Add missing placeholder
for format string.
2021-10-11 11:21:00 +02:00
Nicolas Goaziou 3bb0cb9398 oc: Fix § locator name
* lisp/oc-csl.el (org-cite-csl--label-regexp): § is not a word start,
so adjust regexp accordingly.  Also fix mistake introduced in
c4a357f192.
(org-cite-csl--parse-reference): Ignore any space after locator name.
2021-10-11 11:18:40 +02:00
Nicolas Goaziou 596ec7a167 oc-biblatex: Fix docstring
* lisp/oc-biblatex.el (org-cite-biblatex-export-citation): Fix docstring.
2021-10-10 23:11:05 +02:00
Nicolas Goaziou c4a357f192 oc-csl: Allow nbsp after locator label
* lisp/oc-csl.el (org-cite-csl--label-regexp): Allow nbsp between
locator label and value.

Reported-by: M. ‘quintus’ Gülker <post+orgmodeml@guelker.eu>
<http://lists.gnu.org/r/emacs-orgmode/2021-10/msg00423.html>
2021-10-10 12:11:26 +02:00
Nicolas Goaziou 8dfc056fcc oc: Fix failing test about `org-cite-list-citations'
* lisp/oc.el (org-cite-list-citations): Properly implement
a simplified version of `org-export-get-footnote-definition'.
2021-10-09 23:01:35 +02:00
Nicholas Vollmer b71474ff7f lisp/org.el: (org-save-all-org-buffers): Prevent `org-mode' reload
* lisp/org.el: (org-save-all-org-buffers): Ensure `save-some-buffers' PRED returns boolean.

As of this upstream commit:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a9ad3d477441feefa3bf6107d58281cb64e0e78a

`save-some-buffers' will call its PRED argument if it returns a function.
Since (derived-mode-p 'org-mode) returns the symbol org-mode,
and org-mode is a function, org-mode is reloaded in modified Org
buffers when calling `org-save-all-org-buffers'. Among other
undesirable behavior, this will cause the buffer's visibility to be
reset to its initial visibility.
2021-10-09 15:23:33 -04:00
Nicolas Goaziou 11f450da80 oc-biblatex: Declare missing "nocite" style
* lisp/oc-biblatex.el (biblatex): Declare the processor provides
a "nocite" citation style.
2021-10-09 16:09:33 +02:00
Nicolas Goaziou f7fb7a3cf2 manual: Additional fixes to citations
* doc/org-manual.org (Citations): Mention binding for
`org-cite-insert'.  Fix spacing using non-breaking spaces.  Revert
some code uses introduced in the previous commit.
2021-10-08 22:40:23 +02:00
Nicolas Goaziou b06c6c7e78 org-manual: Typography fixes
* doc/org-manual.org (Citation export processors): Use fixed-with
areas for single-line examples.  Upcase keywords.  External commands
or symbols use code instead of verbatim.  Remove indentation when
appropriate.
2021-10-08 22:36:59 +02:00
Bastien 89968077cf lisp/ol-man.el: Add copyright header 2021-10-08 15:38:01 +02:00
Bastien 2a4dfa7e51 lisp/ol-man.el: Add lexical-binding cookie 2021-10-07 19:36:55 +02:00
Bastien 98b34ea640 lisp/ol-man.el: Restore file
This file was mistakenly removed by db67c7e92.
2021-10-07 17:47:14 +02:00
Nicolas Goaziou 7d22dca54e oc: Fix citations in footnotes when using biblatex back-end
* lisp/oc.el (org-cite-list-citations): Do not use
`org-export-get-footnote-definition' so as to not cache footnote
definitions too early, i.e., when citations are still present in the
parse tree.
* lisp/oc-biblatex.el (org-cite-biblatex--multi-arguments): Append
"\relax" unconditionally to avoid calling `org-export-data' on next
object, when citations are still present in the parse tree.

Reported-by: Elias Bounatirou <elias.bounatirou@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-09/msg00067.html>
2021-10-06 16:07:19 +02:00
Nicolas Goaziou 94b410b32c footnote: Improve last commit
* lisp/org-footnote.el (org-footnote--allow-reference-p): Improve last
commit.
2021-10-06 14:41:50 +02:00
Nicolas Goaziou 5f6e199143 footnote: Allow footnotes at footnote definition start
* lisp/org-footnote.el (org-footnote--allow-reference-p): Allow
footnotes at footnote definition start, right after label.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add
tests.
2021-10-06 14:34:14 +02:00
Nicolas Goaziou b07c312f28 oc: Allow citations at footnote definition start
* lisp/oc.el (org-cite--allowed-p): Allow citations at footnote
definition start.
* testing/lisp/test-oc.el (test-org-cite/insert-capability): Add tests.
2021-10-06 14:29:40 +02:00
Kyle Meyer 6874af8724 manual: Drop keybinding for org-table-blank-field
* doc/org-manual.org (Re-aligning and field motion): Update for
keybinding removal.

The keybinding was removed in 0c4e844c8 (Remove default binding for
org-table-blank-field, 2021-04-28).
2021-10-05 23:17:18 -04:00
Ihor Radchenko bd0493eda1
org-lint: Do not require space after : in keywords
* lisp/org-lint.el (org-lint-duplicate-name): Update regexp to conform
with org-element parsers.

Fixes https://list.orgmode.org/orgmode/87h7ee5q8u.fsf@gmail.com/
2021-10-04 14:14:16 +08:00
Nicolas Goaziou d68d8bc1f8 oc: Pacify checkdoc
* lisp/oc.el (org-cite-export-processors):
(org-cite--move-punct-before):
(org-cite-adjust-note):
(org-cite--allowed-p): Add missing argument.
2021-10-04 00:00:33 +02:00
Nicolas Goaziou d6f0e9e105 oc: Be stricter when introducing spaces before citations
* lisp/oc.el (org-cite-process-citations): Add a space before citation
only if it is preceded by a quotation mark.
* testing/lisp/test-oc.el (test-org-cite/export-capability): Add
tests.

Reported-by: Denis Maier <denismaier@mailbox.org>
<http://lists.gnu.org/r/emacs-orgmode/2021-09/msg00085.html>
2021-10-03 23:51:43 +02:00
Nicolas Goaziou 4b346e5157 oc: Fix typo in docstring
* lisp/oc.el (org-cite-adjust-note): Fix typo.
2021-10-03 23:23:37 +02:00
Kyle Meyer 10dc9debb9 Merge branch 'km/from-emacs-28' into bugfix 2021-10-02 14:22:37 -04:00
Glenn Morris 41e67cff0d Backport commit 4341e79a5 from Emacs
* lisp/oc.el (org-cite-global-bibliography)
(org-cite-note-rules, org-cite-punctuation-marks):
* lisp/oc-csl.el (org-cite-csl-locales-dir)
(org-cite-csl-styles-dir, org-cite-csl-no-citelinks-backends):
* lisp/oc-natbib.el (org-cite-natbib-options):
* lisp/org-keys.el (org-mouse-1-follows-link):
Remove bogus ":safe t" properties that would largely need to be
replaced by custom predicates.

Remove bogus ":safe t" custom properties
4341e79a5fad3e5e668a3eeb1b688d1986011481
Glenn Morris
Sat Oct 2 11:00:23 2021 -0700
2021-10-02 14:20:38 -04:00