From d19660b05b0bda66e8ae5ec64e25a3e06c77eafa Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 30 Sep 2021 20:40:37 +0800 Subject: [PATCH 1/7] ob-gnuplot: Honour :missing argument * lisp/ob-gnuplot.el (org-babel-gnuplot-table-to-data): Force applying `org-babel-gnuplot-quote-tsv-field' to empty table cells when converting org tables to gnuplot input. By default, `orgtbl-to-generic' ignores :fmt for empty table cells. We need to set :raw to non-nil AND :backend to non-nil to force custom formatting of empty table cells. Fixes https://orgmode.org/list/20210617211347.59e4de56@happy.intern.roklein.de --- lisp/ob-gnuplot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index 3c84e4da1..8c4a5957b 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -290,7 +290,7 @@ Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE." (orgtbl-to-generic table (org-combine-plists - '(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field) + '(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field :raw t :backend ascii) params))))) data-file) From 7dcdf98f1d760186d92b0790c111af56e27128f6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 1 Oct 2021 08:33:32 -0700 Subject: [PATCH 2/7] Backport commit f1f57a541 from Emacs * lisp/oc-csl.el (org-cite-csl-locales-dir) (org-cite-csl-styles-dir): * lisp/org-plot.el (org-plot/preset-plot-types): Fix :type. Fix some custom types f1f57a541e4c74eec68a27c47c7416ed6c7d75dd Glenn Morris Fri Oct 1 08:33:32 2021 -0700 --- lisp/oc-csl.el | 4 ++-- lisp/org-plot.el | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 50df12115..5623efcc1 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -123,7 +123,7 @@ If nil then only the fallback en-US locale will be available." :group 'org-cite :package-version '(Org . "9.5") :type '(choice - (dir :tag "Locales directory") + (directory :tag "Locales directory") (const :tag "Use en-US locale only" nil)) :safe t) @@ -134,7 +134,7 @@ directory. This variable is ignored when style file is absolute." :group 'org-cite :package-version '(Org . "9.5") :type '(choice - (dir :tag "Styles directory") + (directory :tag "Styles directory") (const :tag "Use absolute file names" nil)) :safe t) diff --git a/lisp/org-plot.el b/lisp/org-plot.el index 63176fce1..4f14c7d4c 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -392,7 +392,7 @@ be set. Accepts string, nil, or lambda function which returns string or nil. Defaults to nil." :group 'org-plot - :type '(alist :value-type (symbol group))) + :type 'alist) (defvar org--plot/radar-template "### spider plot/chart with gnuplot From e83ee601f260cb3e434da75b8c5674ec2df3c6a6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 1 Oct 2021 18:07:45 -0700 Subject: [PATCH 3/7] Backport commit d50597189 from Emacs ; Standardize some license headers d505971894d83e04e8d206be1dcee1cee5e8bb93 Glenn Morris Fri Oct 1 18:07:45 2021 -0700 --- lisp/ob-julia.el | 8 ++++---- lisp/oc-basic.el | 8 +++++--- lisp/oc-biblatex.el | 8 +++++--- lisp/oc-csl.el | 8 +++++--- lisp/oc-natbib.el | 8 +++++--- lisp/oc.el | 8 +++++--- lisp/ol-doi.el | 10 ++++++---- lisp/ox-koma-letter.el | 4 ++-- 8 files changed, 37 insertions(+), 25 deletions(-) diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el index 5ff6a7ca0..434b414b6 100644 --- a/lisp/ob-julia.el +++ b/lisp/ob-julia.el @@ -6,20 +6,20 @@ ;; Keywords: literate programming, reproducible research, scientific computing ;; Homepage: https://github.com/phrb/ob-julia -;; This file is not part of GNU Emacs. +;; This file is part of GNU Emacs. -;; This program is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el index 3b589908e..bf0153d1d 100644 --- a/lisp/oc-basic.el +++ b/lisp/oc-basic.el @@ -4,18 +4,20 @@ ;; Author: Nicolas Goaziou -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/lisp/oc-biblatex.el b/lisp/oc-biblatex.el index a27f9e9bf..224abaeee 100644 --- a/lisp/oc-biblatex.el +++ b/lisp/oc-biblatex.el @@ -4,18 +4,20 @@ ;; Author: Nicolas Goaziou -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 5623efcc1..cf3538b87 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -4,18 +4,20 @@ ;; Author: Nicolas Goaziou -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/lisp/oc-natbib.el b/lisp/oc-natbib.el index 7e2127bd8..c012ff1db 100644 --- a/lisp/oc-natbib.el +++ b/lisp/oc-natbib.el @@ -4,18 +4,20 @@ ;; Author: Nicolas Goaziou -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/lisp/oc.el b/lisp/oc.el index eb2b7a169..bb2e04d40 100644 --- a/lisp/oc.el +++ b/lisp/oc.el @@ -4,18 +4,20 @@ ;; Author: Nicolas Goaziou -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/lisp/ol-doi.el b/lisp/ol-doi.el index dfde38020..d2d16b27d 100644 --- a/lisp/ol-doi.el +++ b/lisp/ol-doi.el @@ -1,21 +1,23 @@ ;;; ol-doi.el --- DOI links support in Org -*- lexical-binding: t; -*- -;; Copyright (C) 2021 Free Software Foundation, Inc. +;; Copyright (C) 2021 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: diff --git a/lisp/ox-koma-letter.el b/lisp/ox-koma-letter.el index 96704dbb9..f6aa84aba 100644 --- a/lisp/ox-koma-letter.el +++ b/lisp/ox-koma-letter.el @@ -11,12 +11,12 @@ ;; This file is part of GNU Emacs. -;; This program is free software: you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. From fa315986a115028d289f4921281e44e35842a27b Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 1 Oct 2021 17:47:02 +0800 Subject: [PATCH 4/7] 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 --- lisp/org.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/org.el b/lisp/org.el index 2ec6566c0..b67329fc1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5113,6 +5113,7 @@ stacked delimiters is N. Escaping delimiters is not possible." '(invisible t)) (add-text-properties (match-beginning 3) (match-end 3) '(invisible t))) + (goto-char (match-end 0)) (throw :exit t)))))))) (defun org-emphasize (&optional char) From 60b178e5962cd9023026f77483a3d4d2920967ee Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 1 Oct 2021 23:25:48 -0400 Subject: [PATCH 5/7] 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. --- lisp/oc-csl.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index cf3538b87..4a6adeb06 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -183,14 +183,20 @@ Used only when `second-field-align' is activated by the used CSL style." ;;; Internal variables (defconst org-cite-csl--etc-dir - (let* ((oc-root (file-name-directory (locate-library "oc"))) - (oc-etc-dir-1 (expand-file-name "../etc/csl/" oc-root))) - ;; package.el and straight will put all of org-mode/lisp/ in org-mode/. - ;; This will cause .. to resolve to the directory above Org. - ;; To make life easier for people using package.el or straight, we can - ;; check to see if ../etc/csl exists, and if it doesn't try ./etc/csl. - (if (file-exists-p oc-etc-dir-1) oc-etc-dir-1 - (expand-file-name "etc/csl/" oc-root))) + (let ((oc-root (file-name-directory (locate-library "oc")))) + (cond + ;; First check whether it looks like we're running from the main + ;; Org repository. + ((let ((csl-org (expand-file-name "../etc/csl/" oc-root))) + (and (file-directory-p csl-org) csl-org))) + ;; Next look for the directory alongside oc.el because package.el + ;; and straight will put all of org-mode/lisp/ in org-mode/. + ((let ((csl-pkg (expand-file-name "etc/csl/" oc-root))) + (and (file-directory-p csl-pkg) csl-pkg))) + ;; Finally fall back the location used by shared system installs + ;; and when running directly from Emacs repository. + (t + (expand-file-name "org/csl/" data-directory)))) "Directory \"etc/\" from repository.") (defconst org-cite-csl--fallback-locales-dir org-cite-csl--etc-dir From 0f11a44e016991f393c5b1e77174c637c42f799b Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 1 Oct 2021 23:26:39 -0400 Subject: [PATCH 6/7] 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/. --- lisp/oc-csl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 4a6adeb06..4378ab595 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -197,7 +197,7 @@ Used only when `second-field-align' is activated by the used CSL style." ;; and when running directly from Emacs repository. (t (expand-file-name "org/csl/" data-directory)))) - "Directory \"etc/\" from repository.") + "Directory containing CSL-related data files.") (defconst org-cite-csl--fallback-locales-dir org-cite-csl--etc-dir "Fallback CSL locale files directory.") From 9cc7f8bd15b5050fd927c53fe92cf68405844018 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 2 Oct 2021 00:25:28 -0400 Subject: [PATCH 7/7] 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 --- etc/csl/README | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 etc/csl/README diff --git a/etc/csl/README b/etc/csl/README new file mode 100644 index 000000000..1d2e520c0 --- /dev/null +++ b/etc/csl/README @@ -0,0 +1,10 @@ +These data files are used by Org's oc-csl.el library. + +COPYRIGHT AND LICENSE INFORMATION + +chicago-author-date.csl +locales-en-US.xml + + Both of these files are part of the Citation Style Language (CSL) + project () and are released under the + Creative Commons Attribution-ShareAlike 3.0 Unported license.