1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00
Commit Graph

24552 Commits

Author SHA1 Message Date
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
Glenn Morris
ec22cf0a53 Backport commit 62d6cecfc from Emacs
* lisp/oc.el (org-cite-activate-processor)
(org-cite-export-processors, org-cite-follow-processor)
(org-cite-insert-processor):
* lisp/ol.el (org-link-parameters, org-link-frame-setup)
(org-link-shell-confirm-function)
(org-link-shell-skip-confirm-regexp)
(org-link-elisp-confirm-function)
(org-link-elisp-skip-confirm-regexp):
* lisp/org-num.el (org-num-format-function):
Remove bogus ":safe nil" that do nothing but propagate a
misunderstanding of the safe-local-variable property.

Remove bogus ":safe nil" custom properties
62d6cecfcd1a67e15a436c5c2b975f327d9a8b50
Glenn Morris
Sat Oct 2 10:46:29 2021 -0700
2021-10-02 13:56:50 -04:00
Kyle Meyer
df7b0eac13 Merge branch 'km/from-emacs-28' into bugfix 2021-10-02 13:45:37 -04:00
Glenn Morris
c3e8709e2d Backport commit f9111d878 from Emacs
* lisp/oc-basic.el (org-cite-basic-sorting-field)
(org-cite-basic-author-year-separator)
(org-cite-basic-max-key-distance)
(org-cite-basic-author-column-end)
(org-cite-basic-column-separator)
(org-cite-basic-mouse-over-key-face):
* lisp/oc-biblatex.el (org-cite-biblatex-options):
* lisp/oc-csl.el (org-cite-csl-link-cites)
(org-cite-csl-html-hanging-indent)
(org-cite-csl-html-label-width-per-char)
(org-cite-csl-latex-hanging-indent):
* lisp/oc.el (org-cite-adjust-note-numbers):
* lisp/org-keys.el (org-return-follows-link):
* lisp/org.el (org-fontify-todo-headline):
* lisp/ox-html.el (org-html-equation-reference-format)
(org-html-wrap-src-lines):
* lisp/ox-latex.el (org-latex-reference-command)
(org-latex-default-quote-environment): Fix :safe property.

The safe-local-variable property is a function (bug#50944)
f9111d8784bf12263abbe127cdfcbe5f409c9b3b
Glenn Morris
Sat Oct 2 10:37:42 2021 -0700
2021-10-02 13:44:34 -04:00
Kyle Meyer
e8b1aedff2 doc/doc-setup.org: Absorb header from Emacs repo
In the Emacs repository, this file's header was updated in include
copyright information in b3d310fa96 (Fixes for doc/misc org source
files, 2021-02-26).  Copy it over.
2021-10-02 13:35:46 -04:00
Max Nikulin
439359bff1 manfull.pl: Avoid silent failures
* mk/manfull.pl: Report failures of patching of single-page HTML
manuals.

It should prevent silent generating of manual pages inconsistent with
provided CSS files when output of makeinfo will change next time.
2021-10-02 19:12:28 +02:00
Max Nikulin
b7df8307ec manfull.pl: Adjust pattern for current makeinfo
* mk/manfull.pl: During patching of single-page html manuals allow
current form of table of contents headers.

Older makeinfo did not add "contents-heading" class to "<h2>" element.
Helper script failed to properly modify HTML files generated by current
version of makeinfo.  With partially patched file, CSS stiles intended
for table of contents were applied to all unordered lists, so e.g. in
"Plain Lists" section items were bold and with missed markers.
2021-10-02 19:12:28 +02:00
Kyle Meyer
06ab36eb02 etc/csl: Update files to latest versions
* etc/csl/chicago-author-date.csl:
* etc/csl/locales-en-US.xml: Catch up to latest upstream version.

chicago-author-date.csl is from commit
e22b8a566bad9b4c7f52720f60dd875057a5d210
(https://github.com/citation-style-language/styles), and
locales-en-US.xml is from commit
495f88863723df52ca10506eb4c2ed246aa37f2f
(https://github.com/citation-style-language/locales).

Link: https://list.orgmode.org/CAF-FPGO1kDOR2Nr8QOuP_jV-pxkxE=HA1Vx0TvhBjBe7M+fu4w@mail.gmail.com
2021-10-02 11:29:29 -04:00
Kyle Meyer
79f0611614 etc/csl/README: Narrow heading's scope
The text below and both repositories mention only the license and
desired attribution.
2021-10-02 11:29:29 -04:00
Lars Ingebrigtsen
881145f5ef Backport commit bd60fca2f from Emacs
* lisp/ox-koma-letter.el (org-koma-letter-export-block)
(org-koma-letter-export-snippet): Fix warning about two unused
parameter.

Fix ox-koma-letter compilation warnings
bd60fca2faa03034e89df68a69255656df6512ba
Lars Ingebrigtsen
Sat Oct 2 10:37:55 2021 +0200

[ km: This has already been taken care of in the bugfix branch by
  85e5540eb (lisp/ox-koma-letter.el: Use lexical-binding,
  2021-09-30). ]
2021-10-02 11:02:13 -04:00
Kyle Meyer
9cc7f8bd15 etc/csl: Add a README in preparation for Emacs sync
Following nearly all other subdirectories in Emacs's etc/, add a
README explaining what the files are and what license they are under.

I did not add these files, but I have verified that

 - etc/csl/chicago-author-date.csl is identical to
   9821a884d2cbf919a064426999b05aa78e98da8d:chicago-author-date.csl
   from https://github.com/citation-style-language/styles

 - etc/csl/locales-en-US.xml is identical to
   a2b76b20ee120979ec66cfdcfa798b36fc5a7f0b:locales-en-US.xml from
   https://github.com/citation-style-language/locales
2021-10-02 00:52:27 -04:00
Kyle Meyer
0f11a44e01 org-cite-csl--etc-dir: Broaden docstring description
* lisp/oc-csl.el (org-cite-csl--etc-dir): Adjust docstring to describe
purpose without tying the variable to the repository install scenario.

Since 604bfd9d7 (oc-csl: be more caution about the csl etc location,
2021-07-15), this value hasn't been limited to the repository's
etc/csl/.
2021-10-02 00:52:27 -04:00
Kyle Meyer
60b178e596 oc-csl: Locate etc/csl for system installs and Emacs repo
* lisp/oc-csl.el (org-cite-csl--etc-dir): Add `data-directory' case,
using it as the fallback.  Also, use the more specific
file-directory-p rather than file-exists-p to inspect the candidates.

When using Org from the system installation, the CSL files will be
available in the etc/org/csl/ subdirectory underneath
`data-directory'.  (This requires the etc/csl/ files to be synced to
the Emacs repo under etc/org/csl.)

Give the Org repository and package cases precedence because they are
anchored to a specific oc.el location while, for Emacs releases with
Org 9.5 or later, the data-directory files will typically always be
present.
2021-10-02 00:52:27 -04:00
Kyle Meyer
d0f774b0b4 Merge branch 'km/from-emacs-28' into bugfix 2021-10-02 00:51:56 -04:00
Ihor Radchenko
fa315986a1
org-do-emphasis-faces: Never treat closing marker as next opening marker
* lisp/org.el (org-do-emphasis-faces): Make sure that we never match
ending marker of an emphasis as a beginning marker of another
emphasis.  For example, in "(~-~) test (~+~)" "~) test (~" is a valid
code match unless we move point to the end the first code emphasis
completely during parsing.

Fixes https://orgmode.org/list/87fsujp7mc.fsf@web.de
2021-10-02 12:47:42 +08:00