From 27621a5b03beb3d164b815eb7268d160de1c6d2e Mon Sep 17 00:00:00 2001 From: Bastien Date: Wed, 12 May 2021 06:30:22 +0200 Subject: [PATCH 01/23] Add Luc Pellissier as maintainer for two ob-* files * lisp/ob-coq.el: Add a maintainer. * lisp/ob-asymptote.el: Ditto. --- lisp/ob-asymptote.el | 1 + lisp/ob-coq.el | 1 + 2 files changed, 2 insertions(+) diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index bfb5b7914..5c89c5d83 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2009-2021 Free Software Foundation, Inc. ;; Author: Eric Schulte +;; Maintainer: Luc Pellissier ;; Keywords: literate programming, reproducible research ;; Homepage: https://orgmode.org diff --git a/lisp/ob-coq.el b/lisp/ob-coq.el index c77e8c9af..61746a26e 100644 --- a/lisp/ob-coq.el +++ b/lisp/ob-coq.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2010-2021 Free Software Foundation, Inc. ;; Author: Eric Schulte +;; Maintainer: Luc Pellissier ;; Keywords: literate programming, reproducible research ;; Homepage: https://orgmode.org From 34bbb03cca747a99fecdd5b0d17c8c0da9b27467 Mon Sep 17 00:00:00 2001 From: Bastien Date: Fri, 14 May 2021 05:15:20 +0200 Subject: [PATCH 02/23] CONTRIBUTE: Small enhancements --- CONTRIBUTE | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTE b/CONTRIBUTE index fc52216a0..8c4447406 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -1,3 +1,5 @@ +-*- mode: org; fill-column:70 -*- + The text below explains the rules for participating in Org mode development. @@ -9,8 +11,7 @@ Org maintenance is explained on Worg: see [[https://orgmode.org/worg/org-mainten 1. The master git repository is hosted publicly at [[https://orgmode.org][orgmode.org]]. - Anyone can get a clone of the current repository state using the - command + Anyone can get a clone of the current repository like this: : git clone https://code.orgmode.org/bzg/org-mode.git @@ -19,16 +20,15 @@ Org maintenance is explained on Worg: see [[https://orgmode.org/worg/org-mainten repository. 2. People who are interested in participating to the Org mode - development can do so by sending patches to this address: + development can do so by sending patches to the mailing list: : emacs-orgmode@gnu.org -3. An interested developer can also request push access to the central - repository by creating an account on code.orgmode.org and by - sending her/his user info to the maintainer. +3. An interested developer can also request push access to the + repository by sending an email to the maintainer to request an + account on code.orgmode.org. - After you have been added as a user with push privileges, clone the - repository through ssh using + After you have been added as a user with push privileges: : git clone git@code.orgmode.org:bzg/org-mode.git @@ -69,6 +69,6 @@ effectively. * The =contrib/= directory -The git repository used to contain a =contrib/= directory, which was -moved to https://git.sr.ht/~bzg/org-contrib before Org 9.5, which see. - +The git repository used to contain a =contrib/= directory. Files in +this directory where moved to a new [[https://git.sr.ht/~bzg/org-contrib][org-contrib]] repository before Org +9.5. You can install the new =org-contrib= from [[https://elpa.nongnu.org/nongnu/][NonGNU ELPA]]. From 78e39d58d499299c810de3dca890ebeb0842911a Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 09:57:45 +0200 Subject: [PATCH 03/23] lisp/org-id.el: Small enhancements * lisp/org-id.el (org-id-locations-load, org-id-add-location): Update messages. (org-id-hash-to-alist, org-id-paste-tracker, org-id-find-id-file): Docstring minor enhancements. (org-id-new): Tiny refactoring. --- lisp/org-id.el | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lisp/org-id.el b/lisp/org-id.el index c3d274dce..784f41ccd 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -382,17 +382,15 @@ So a typical ID could look like \"Org:4nd91V40HI\"." (setq unique (org-id-uuid)))) ((eq org-id-method 'org) (let* ((etime (org-reverse-string (org-id-time-to-b36))) - (postfix (if org-id-include-domain - (progn - (require 'message) - (concat "@" (message-make-fqdn)))))) + (postfix (when org-id-include-domain + (require 'message) + (concat "@" (message-make-fqdn))))) (setq unique (concat etime postfix)))) ((eq org-id-method 'ts) (let ((ts (format-time-string org-id-ts-format)) - (postfix (if org-id-include-domain - (progn - (require 'message) - (concat "@" (message-make-fqdn)))))) + (postfix (when org-id-include-domain + (require 'message) + (concat "@" (message-make-fqdn))))) (setq unique (concat ts postfix)))) (t (error "Invalid `org-id-method'"))) (concat prefix unique))) @@ -591,7 +589,7 @@ When FILES is given, scan also these files." (setf (car item) (expand-file-name (car item) loc)))) org-id-locations))) (error - (message "Could not read org-id-values from %s. Setting it to nil." + (message "Could not read `org-id-values' from %s, setting it to nil" org-id-locations-file)))) (setq org-id-files (mapcar 'car org-id-locations)) (setq org-id-locations (org-id-alist-to-hash org-id-locations)))) @@ -600,7 +598,7 @@ When FILES is given, scan also these files." "Add the ID with location FILE to the database of ID locations." ;; Only if global tracking is on, and when the buffer has a file (unless file - (error "bug: org-id-get expects a file-visiting buffer")) + (error "`org-id-get' expects a file-visiting buffer")) (let ((afile (abbreviate-file-name file))) (when (and org-id-track-globally id) (unless org-id-locations (org-id-locations-load)) @@ -612,7 +610,8 @@ When FILES is given, scan also these files." (add-hook 'kill-emacs-hook 'org-id-locations-save)) (defun org-id-hash-to-alist (hash) - "Turn an org-id hash into an alist, so that it can be written to a file." + "Turn an org-id hash into an alist. +This is to be able to write it to a file." (let (res x) (maphash (lambda (k v) @@ -636,7 +635,7 @@ When FILES is given, scan also these files." res)) (defun org-id-paste-tracker (txt &optional buffer-or-file) - "Update any IDs in TXT and assign BUFFER-OR-FILE to them." + "Update any ids in TXT and assign BUFFER-OR-FILE to them." (when org-id-track-globally (save-match-data (setq buffer-or-file (or buffer-or-file (current-buffer))) @@ -655,7 +654,7 @@ When FILES is given, scan also these files." ;;;###autoload (defun org-id-find-id-file (id) - "Query the id database for the file in which this ID is located." + "Query the id database for the file in which ID is located." (unless org-id-locations (org-id-locations-load)) (or (and org-id-locations (hash-table-p org-id-locations) From f98e3ef65a3cb1ad1b6421103559a51aa697b6c5 Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 10:02:09 +0200 Subject: [PATCH 04/23] lisp/ox-md.el: Mark some arguments as unused * lisp/ox-md.el (org-md-latex-environment) (org-md-latex-fragment): Mark some arguments as unused. --- lisp/ox-md.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ox-md.el b/lisp/ox-md.el index a19664a00..d288aba4c 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -465,7 +465,7 @@ channel." ;;;; Latex Environment -(defun org-md-latex-environment (latex-environment contents info) +(defun org-md-latex-environment (latex-environment _contents info) "Transcode a LATEX-ENVIRONMENT object from Org to Markdown. CONTENTS is nil. INFO is a plist holding contextual information." (when (plist-get info :with-latex) @@ -480,7 +480,7 @@ CONTENTS is nil. INFO is a plist holding contextual information." ;;;; Latex Fragment -(defun org-md-latex-fragment (latex-fragment contents info) +(defun org-md-latex-fragment (latex-fragment _contents info) "Transcode a LATEX-FRAGMENT object from Org to Markdown. CONTENTS is nil. INFO is a plist holding contextual information." (when (plist-get info :with-latex) From b2c5028e5bbecf14f3f30c36197c8b00685bbdd9 Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 10:25:40 +0200 Subject: [PATCH 05/23] lisp/org.el: Minor aesthetic clean-up --- lisp/org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a9a2bef55..8463c335a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -653,8 +653,10 @@ defined in org-duration.el.") "Hook that is run after org.el has been loaded." :group 'org :type 'hook) -(make-obsolete-variable 'org-load-hook - "use `with-eval-after-load' instead." "Org 9.5") + +(make-obsolete-variable + 'org-load-hook + "use `with-eval-after-load' instead." "Org 9.5") (defcustom org-log-buffer-setup-hook nil "Hook that is run after an Org log buffer is created." From 8b0b206b52769b1be0c8aad9a05807ade3513138 Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 13:55:12 +0200 Subject: [PATCH 06/23] lisp/org.el: Use "[BUG]" instead of "Bug:" for bug reports * lisp/org.el (org-submit-bug-report): Use "[BUG]" as the subject prefix. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index c597219a7..04abb7366 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18469,7 +18469,7 @@ Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------") (save-excursion (when (re-search-backward "^\\(Subject: \\)Org mode version \\(.*?\\);[ \t]*\\(.*\\)" nil t) - (replace-match "\\1Bug: \\3 [\\2]"))))) + (replace-match "\\1[BUG] \\3 [\\2]"))))) (defun org-install-agenda-files-menu () From ba273278a5da0b746ebbe39050b51613961364a8 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 6 May 2021 14:13:20 +0800 Subject: [PATCH 07/23] Use cache in org-up-heading-safe * lisp/org.el (org-up-heading-safe): Use buffer-local cache to store positions of parent headings. The cache is invalidated when buffer text is changed, according to `buffer-chars-modified-tick'. (org--up-heading-cache): Buffer-local hash-table storing the cache. (org--up-heading-cache-tick): The buffer modification state for currently active `org--up-heading-cache'. The optimisation is critical when running agenda or org-entry-get queries using property/tag inheritance. In such scenarios `org-up-heading-safe' can be called thousands of times. For example, building todo agenda on large number of headings lead to the following benchmark results: Benchmark: 1. (elp-instrument-function #'org-up-heading-safe) 2. Run agenda 3. (elp-results) ;; function, # calls, total time, avg time Without cache: org-up-heading-safe 27555 8.4234025759 0.0003056941 With cache, first run: org-up-heading-safe 23227 0.5300747539 2.282...e-05 With cache, second run on unchanged buffer: org-up-heading-safe 23227 0.1447754880 6.233...e-06 The final speedup is 1-2 orders of magnitude (~15-56 times). --- lisp/org.el | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 04abb7366..a30dbed6a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20460,6 +20460,10 @@ This function considers both visible and invisible heading lines. With argument, move up ARG levels." (outline-up-heading arg t)) +(defvar-local org--up-heading-cache nil + "Buffer-local `org-up-heading-safe' cache.") +(defvar-local org--up-heading-cache-tick nil + "Buffer `buffer-chars-modified-tick' in `org--up-heading-cache'.") (defun org-up-heading-safe () "Move to the heading line of which the present line is a subheading. This version will not throw an error. It will return the level of the @@ -20469,10 +20473,28 @@ Also, this function will be a lot faster than `outline-up-heading', because it relies on stars being the outline starters. This can really make a significant difference in outlines with very many siblings." (when (ignore-errors (org-back-to-heading t)) - (let ((level-up (1- (funcall outline-level)))) - (and (> level-up 0) - (re-search-backward (format "^\\*\\{1,%d\\} " level-up) nil t) - (funcall outline-level))))) + (let (level-cache) + (unless org--up-heading-cache + (setq org--up-heading-cache (make-hash-table))) + (if (and (eq (buffer-chars-modified-tick) org--up-heading-cache-tick) + (setq level-cache (gethash (point) org--up-heading-cache))) + (when (<= (point-min) (car level-cache) (point-max)) + ;; Parent is inside accessible part of the buffer. + (progn (goto-char (car level-cache)) + (cdr level-cache))) + ;; Buffer modified. Invalidate cache. + (unless (eq (buffer-chars-modified-tick) org--up-heading-cache-tick) + (setq-local org--up-heading-cache-tick + (buffer-chars-modified-tick)) + (clrhash org--up-heading-cache)) + (let* ((level-up (1- (funcall outline-level))) + (pos (point)) + (result (and (> level-up 0) + (re-search-backward + (format "^\\*\\{1,%d\\} " level-up) nil t) + (funcall outline-level)))) + (when result (puthash pos (cons (point) result) org--up-heading-cache)) + result))))) (defun org-up-heading-or-point-min () "Move to the heading line of which the present is a subheading, or point-min. From 9e127a720c624570b5916499a0e5a6f7d45fd043 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sat, 15 May 2021 14:07:03 +0200 Subject: [PATCH 08/23] New command `org-refile-reverse' bound to C-c C-M-w * lisp/org-refile.el (org-refile-reverse): New command. * lisp/org-keys.el (org-mode-map): Bind C-c C-M-w to `org-refile-reverse'. * doc/org-manual.org (Refile and Copy): Document `org-refile-reverse'. * etc/ORG-NEWS (New command ~org-refile-reverse~ (=C-c C-M-w=)): Announce the new command. Link: https://orgmode.org/list/20200830001047.21362-1-orgmode@adamspiers.org/ --- doc/org-manual.org | 10 ++++++++++ etc/ORG-NEWS | 10 ++++++++++ lisp/org-keys.el | 1 + lisp/org-refile.el | 11 +++++++++++ 4 files changed, 32 insertions(+) diff --git a/doc/org-manual.org b/doc/org-manual.org index ab12fa70a..a4baf5271 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -7246,6 +7246,16 @@ special command: Copying works like refiling, except that the original note is not deleted. +- {{{kbd(C-c C-M-w)}}} (~org-refile-reverse~) :: + + #+kindex: C-c C-M-w + #+findex: org-refile-reverse + Works like refiling, except that it temporarily toggles how the + value of ~org-reverse-note-order~ applies to the current buffer. So + if ~org-refile~ would append the entry as the last entry under the + target header, ~org-refile-reverse~ will prepend it as the first + entry, and vice-versa. + ** Archiving :PROPERTIES: :DESCRIPTION: What to do with finished products. diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 669a7c3c2..b987b7aa9 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -230,6 +230,16 @@ package, to convert pandas Dataframes into orgmode tables: | 2 | 3 | 6 | #+end_src +*** New command ~org-refile-reverse~ (=C-c C-M-w=) + +You can now use =C-c C-M-w= to run ~org-refile-reverse~. + +It is almost identical to ~org-refile~, except that it temporarily +toggles how ~org-reverse-note-order~ applies to the current buffer. +So if ~org-refile~ would append the entry as the last entry under the +target heading, ~org-refile-reverse~ will prepend it as the first +entry, and vice-versa. + *** New startup options =#+startup: showlevels= These startup options complement the existing =overview=, =content=, diff --git a/lisp/org-keys.el b/lisp/org-keys.el index f04f87de0..12d6226ba 100644 --- a/lisp/org-keys.el +++ b/lisp/org-keys.el @@ -581,6 +581,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." (org-defkey org-mode-map (kbd "C-c ;") #'org-toggle-comment) (org-defkey org-mode-map (kbd "C-c C-w") #'org-refile) (org-defkey org-mode-map (kbd "C-c M-w") #'org-refile-copy) +(org-defkey org-mode-map (kbd "C-c C-M-w") #'org-refile-reverse) (org-defkey org-mode-map (kbd "C-c /") #'org-sparse-tree) ;minor-mode reserved (org-defkey org-mode-map (kbd "C-c \\") #'org-match-sparse-tree) ;minor-mode r. (org-defkey org-mode-map (kbd "C-c RET") #'org-ctrl-c-ret) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 2900be27e..bffad0a81 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -383,8 +383,19 @@ the *old* location.") (let ((org-refile-keep t)) (org-refile nil nil nil "Copy"))) +;;;###autoload +(defun org-refile-reverse (&optional arg default-buffer rfloc msg) + "Refile while temporarily toggling `org-reverse-note-order'. +So if `org-refile' would append the entry as the last entry under +the target heading, `org-refile-reverse' will prepend it as the +first entry, and vice-versa." + (interactive "P") + (let ((org-reverse-note-order (not (org-notes-order-reversed-p)))) + (org-refile arg default-buffer rfloc msg))) + (defvar org-capture-last-stored-marker) + ;;;###autoload (defun org-refile (&optional arg default-buffer rfloc msg) "Move the entry or entries at point to another heading. From b72b718ac6cc09990e30f398b903c9b70207ea6f Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sat, 15 May 2021 20:27:20 +0800 Subject: [PATCH 09/23] Add a test for known bug in org-element-cache * testing/lisp/test-org-element.el (test-org-element/cache-bugs): A new test documenting a known bug: 1. Create initial file like: P0 P1 | a | b | | c | d | Note that second line of the table is not indented. Now, org-element-at-point returns table-row. 2. Modify the file to test org-element-cache P0 - item P1 | a | b | | c | d | Now, the first (indented) row of the table belongs to item. The second row should be an individual table and org-element-at-point returns table. --- testing/lisp/test-org-element.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 28e9ecd12..18991b5bc 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -3889,6 +3889,21 @@ Text :end (org-element-property :parent (org-element-at-point))) (+ parent-end 3)))))) +(ert-deftest test-org-element/cache-bugs () + "Test basic expectations and common pitfalls for cache." + :expected-result :failed + ;; Unindented second row of the table should not be re-parented by + ;; inserted item. + (should + (eq 'table + (let ((org-element-use-cache t)) + (org-test-with-temp-text + "#+begin_center\nP0\n\n\n\n P1\n | a | b |\n| c | d |\n#+end_center" + (save-excursion (search-forward "| c |") (org-element-at-point)) + (insert "- item") + (search-forward "| c |") + (beginning-of-line) + (org-element-type (org-element-at-point))))))) (provide 'test-org-element) From 34fc18040df33a52a52ce3414d20eceb58bf988b Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 15:01:55 +0200 Subject: [PATCH 10/23] lisp/org-agenda.el: Use "09:00" instead of " 9:00" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/org-agenda.el (org-get-time-of-day): Use "09:00" instead of " 9:00" when displaying as a string. This makes the string more readable, especially for users reading the agenda with a screen reader. Reported-by: Sébastien Hinderer --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 4ed196902..95848ab9b 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6995,7 +6995,7 @@ HH:MM." (h2 (if (and string mod24 (not (and (= m 0) (= h1 24)))) (mod h1 24) h1)) (t0 (+ (* 100 h2) m)) - (t1 (concat (if (>= h1 24) "+" " ") + (t1 (concat (if (>= h1 24) "+" "0") (if (and org-agenda-time-leading-zero (< t0 1000)) "0" "") (if (< t0 100) "0" "") From e0bc2b37fb79001283f684a5ddc577bd845cf599 Mon Sep 17 00:00:00 2001 From: "Thomas S. Dye" Date: Sat, 15 May 2021 15:20:35 +0200 Subject: [PATCH 11/23] lisp/ox-latex.el: Allow arbitrary float environments * lisp/ox-latex.el (org-latex--inline-image) (org-latex--decorate-table): Recognize arbitrary :float value. * etc/ORG-NEWS: Announce new :float capability. LaTeX users are able to define arbitrary float types. This patch makes them accessible from Org mode. --- etc/ORG-NEWS | 9 ++++++++- lisp/ox-latex.el | 25 +++++++++++++++++++------ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index b987b7aa9..ab96ec300 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -178,7 +178,7 @@ See [[msg:875z8njaol.fsf@protesilaos.com][this thread]]. See [[msg:87im57fh8j.fsf@gmail.com][this thread]]. -*** =ob-python= improvements to =:return= header argument +*** =ob-python= improvements to =:return= header argument The =:return= header argument in =ob-python= now works for session blocks as well as non-session blocks. Also, it now works with the @@ -250,6 +250,13 @@ Example: : #+startup: show3levels +*** LaTeX attribute ~:float~ now passes through arbitrary values + +LaTeX users are able to define arbitrary float types, e.g. with the +float package. The Org mode LaTeX exporter is now able to process and +export arbitrary float types. The user is responsible for ensuring +that Org mode configures LaTeX to process any new float type. + *** New =u= table formula flag to enable Calc units simplification mode A new =u= mode flag for Calc formulas in Org tables has been added to diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index c3fc83b1b..316bbb6f2 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2384,8 +2384,8 @@ used as a communication channel." ((string= float "sideways") 'sideways) ((string= float "multicolumn") 'multicolumn) ((and (plist-member attr :float) (not float)) 'nonfloat) - ((or float - (org-element-property :caption parent) + (float float) + ((or (org-element-property :caption parent) (org-string-nw-p (plist-get attr :caption))) 'figure) (t 'nonfloat)))) @@ -2477,6 +2477,18 @@ used as a communication channel." nil t)))) ;; Return proper string, depending on FLOAT. (pcase float + ((and (pred stringp) env-string) + (format "\\begin{%s}%s +%s%s +%s%s +%s\\end{%s}" + env-string + placement + (if caption-above-p caption "") + (if center "\\centering" "") + comment-include image-code + (if caption-above-p "" caption) + env-string)) (`wrap (format "\\begin{wrapfigure}%s %s%s %s%s @@ -3207,9 +3219,9 @@ centered." (defun org-latex--decorate-table (table attributes caption above? info) "Decorate TABLE string with caption and float environment. -ATTRIBUTES is the plist containing is LaTeX attributes. CAPTION -is its caption, as a string or nil. It is located above the -table if ABOVE? is non-nil. INFO is the plist containing current +ATTRIBUTES is the plist containing LaTeX attributes. CAPTION is +its caption, as a string or nil. It is located above the table +if ABOVE? is non-nil. INFO is the plist containing current export parameters. Return new environment, as a string." @@ -3218,7 +3230,8 @@ Return new environment, as a string." (cond ((and (not float) (plist-member attributes :float)) nil) ((member float '("sidewaystable" "sideways")) "sidewaystable") ((equal float "multicolumn") "table*") - ((or float (org-string-nw-p caption)) "table") + (float float) + ((org-string-nw-p caption) "table") (t nil)))) (placement (or (plist-get attributes :placement) From 89040fbf9512713cc6fadb80d1c51e873f044cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Mac=C3=ADas?= Date: Sat, 15 May 2021 15:44:36 +0200 Subject: [PATCH 12/23] ox-latex.el: Support specific attributes for verse block * lisp/ox-latex.el (org-latex-verse-block): Support verse-specific attributes. * doc/org-manual.org (Verse blocks in LaTeX export): New section. Link: https://orgmode.org/list/874kfdn0k5.fsf@posteo.net/ --- doc/org-manual.org | 48 +++++++++++++++++++++++++++++++++++++++++++++ lisp/ox-latex.el | 49 ++++++++++++++++++++++++++++------------------ 2 files changed, 78 insertions(+), 19 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index a4baf5271..765886a2d 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -13871,6 +13871,54 @@ The LaTeX export back-end converts horizontal rules by the specified ----- #+end_example +*** Verse blocks in LaTeX export +:PROPERTIES: +:DESCRIPTION: Attributes specific to special blocks. +:END: + +#+cindex: verse blocks, in @LaTeX{} export +#+cindex: @samp{ATTR_LATEX}, keyword + +The LaTeX export back-end accepts four attributes for verse blocks: +=:lines=, =:center=, =:versewidth= and =:latexcode=. The three first +require the external LaTeX package =verse.sty=, wich is an extension +of the standard LaTeX environment. The purpose of these attributes is +explained below. + +- =:lines= :: To add marginal verse numbering. Its value is an + integer, the sequence in which the verses should be numbered. +- =:center= :: With value =t= all the verses on the page are optically + centered (a typographic convention for poetry), taking as a + reference the longest verse, which must be indicated by the + attribute =:versewidth=. +- =:versewidth= :: Its value is a literal text string with the longest + verse. +- =:latexcode= :: It accepts any arbitrary LaTeX code that can be + included within a LaTeX =verse= environment. + +A complete example with Shakespeare's first sonnet: + +#+begin_src org +,#+ATTR_LaTeX: :center t :latexcode \color{red} :lines 5 +,#+ATTR_LaTeX: :versewidth Feed’st thy light’st flame with self-substantial fuel, +,#+begin_verse +From fairest creatures we desire increase, +That thereby beauty’s rose might never die, +But as the riper should by time decrease, +His tender heir mught bear his memeory: +But thou, contracted to thine own bright eyes, +Feed’st thy light’st flame with self-substantial fuel, +Making a famine where abundance lies, +Thyself thy foe, to thy sweet self too cruel. +Thou that art now the world’s fresh ornament +And only herald to the gaudy spring, +Within thine own bud buriest thy content +And, tender churl, makest waste in niggarding. +Pity the world, or else this glutton be, +To eat the world’s due, by the grave and thee. +,#+end_verse +#+end_src + ** Markdown Export :PROPERTIES: :DESCRIPTION: Exporting to Markdown. diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 316bbb6f2..b9ecf070a 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -3526,26 +3526,37 @@ channel." "Transcode a VERSE-BLOCK element from Org to LaTeX. CONTENTS is verse block contents. INFO is a plist holding contextual information." - (concat - (org-latex--wrap-label - verse-block - ;; In a verse environment, add a line break to each newline - ;; character and change each white space at beginning of a line - ;; into a space of 1 em. Also change each blank line with - ;; a vertical space of 1 em. - (format "\\begin{verse}\n%s\\end{verse}" - (replace-regexp-in-string - "^[ \t]+" (lambda (m) (format "\\hspace*{%dem}" (length m))) - (replace-regexp-in-string - "^[ \t]*\\\\\\\\$" "\\vspace*{1em}" + (let* ((lin (org-export-read-attribute :attr_latex verse-block :lines)) + (latcode (org-export-read-attribute :attr_latex verse-block :latexcode)) + (cent (org-export-read-attribute :attr_latex verse-block :center)) + (attr (concat + (if cent "[\\versewidth]" "") + (if lin (format "\n\\poemlines{%s}" lin) "") + (if latcode (format "\n%s" latcode) ""))) + (versewidth (org-export-read-attribute :attr_latex verse-block :versewidth)) + (vwidth (if versewidth (format "\\settowidth{\\versewidth}{%s}\n" versewidth) "")) + (linreset (if lin "\n\\poemlines{0}" ""))) + (concat + (org-latex--wrap-label + verse-block + ;; In a verse environment, add a line break to each newline + ;; character and change each white space at beginning of a line + ;; into a space of 1 em. Also change each blank line with + ;; a vertical space of 1 em. + (format "%s\\begin{verse}%s\n%s\\end{verse}%s" + vwidth + attr (replace-regexp-in-string - "\\([ \t]*\\\\\\\\\\)?[ \t]*\n" "\\\\\n" - contents nil t) nil t) nil t)) - info) - ;; Insert footnote definitions, if any, after the environment, so - ;; the special formatting above is not applied to them. - (org-latex--delayed-footnotes-definitions verse-block info))) - + "^[ \t]+" (lambda (m) (format "\\hspace*{%dem}" (length m))) + (replace-regexp-in-string + "^[ \t]*\\\\\\\\$" "\\vspace*{1em}" + (replace-regexp-in-string + "\\([ \t]*\\\\\\\\\\)?[ \t]*\n" "\\\\\n" + contents nil t) nil t) nil t) linreset) + info) + ;; Insert footnote definitions, if any, after the environment, so + ;; the special formatting above is not applied to them. + (org-latex--delayed-footnotes-definitions verse-block info)))) ;;; End-user functions From bfb350777dfd9bdfc7a0078dd8d5bbedae3c78fa Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 15:44:43 +0200 Subject: [PATCH 13/23] etc/ORG-NEWS: Various enhancements --- etc/ORG-NEWS | 141 +++++++++++++++++++++++++++------------------------ 1 file changed, 75 insertions(+), 66 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index ab96ec300..d9000de41 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -178,7 +178,81 @@ See [[msg:875z8njaol.fsf@protesilaos.com][this thread]]. See [[msg:87im57fh8j.fsf@gmail.com][this thread]]. -*** =ob-python= improvements to =:return= header argument +*** New command =org-refile-reverse= bound to =C-c C-M-w= + +You can now use =C-c C-M-w= to run ~org-refile-reverse~. + +It is almost identical to ~org-refile~, except that it temporarily +toggles how ~org-reverse-note-order~ applies to the current buffer. +So if ~org-refile~ would append the entry as the last entry under the +target heading, ~org-refile-reverse~ will prepend it as the first +entry, and vice-versa. + +*** Add a new ~:refile-targets~ template option + +When exiting capture mode via ~org-capture-refile~, the variable +~org-refile-targets~ will be temporarily bound to the value of this +template option. + +*** New startup options =#+startup: showlevels= + +These startup options complement the existing =overview=, =content=, +=showall=, =showeverything= with a way to start the document with n +levels shown, where n goes from 2 to 5. + +Example: + +: #+startup: show3levels + +*** New =u= table formula flag to enable Calc units simplification mode + +A new =u= mode flag for Calc formulas in Org tables has been added to +enable Calc units simplification mode. + +*** Support exporting DOI links + +Org now supports export for DOI links, through its new =ol-doi.el= +library. For backward compatibility, it is loaded by default. + +*** LaTeX attribute ~:float~ now passes through arbitrary values + +LaTeX users are able to define arbitrary float types, e.g. with the +float package. The Org mode LaTeX exporter is now able to process and +export arbitrary float types. The user is responsible for ensuring +that Org mode configures LaTeX to process any new float type. + +*** Support verse blocks in LaTeX export + +The LaTeX export back-end accepts four attributes for verse blocks: +=:lines=, =:center=, =:versewidth= and =:latexcode=. The three first +require the external LaTeX package =verse.sty=, wich is an extension +of the standard LaTeX environment. The purpose of these attributes is +explained below. + +*** =org-set-tags-command= selects tags from ~org-global-tags-completion-table~ + +Let ~org-set-tags-command~ TAB fast tag completion interface complete +tags including from both buffer local and user defined persistent +global list (~org-tag-alist~ and ~org-tag-persistent-alist~). Now +option ~org-complete-tags-always-offer-all-agenda-tags~ is honored. + +*** Clocktable option =:formula %= now shows the per-file time percentages + +This change only has an effect when multiple files are contributing to +a given clocktable (such as when =:scope agenda= has been specified). +The existing behavior is that such tables have an extra 'File' column, +and each individual file that contributes has its own summary line +with the headline value '*File time*'. Those summary rows also +produce a rollup time value for the file in the 'Time' column. + +Prior to this change, the built-in =%= formula did not produce a +calculation for those per-file times in the '%' column (the relevant +cells in the '%' column were blank). With this change, the percentage +contribution of each individual file time to the total time is shown. + +The more agenda files you have, the more useful this behavior becomes. + +*** =ob-python.el= improvements to =:return= header argument The =:return= header argument in =ob-python= now works for session blocks as well as non-session blocks. Also, it now works with the @@ -230,71 +304,6 @@ package, to convert pandas Dataframes into orgmode tables: | 2 | 3 | 6 | #+end_src -*** New command ~org-refile-reverse~ (=C-c C-M-w=) - -You can now use =C-c C-M-w= to run ~org-refile-reverse~. - -It is almost identical to ~org-refile~, except that it temporarily -toggles how ~org-reverse-note-order~ applies to the current buffer. -So if ~org-refile~ would append the entry as the last entry under the -target heading, ~org-refile-reverse~ will prepend it as the first -entry, and vice-versa. - -*** New startup options =#+startup: showlevels= - -These startup options complement the existing =overview=, =content=, -=showall=, =showeverything= with a way to start the document with n -levels shown, where n goes from 2 to 5. - -Example: - -: #+startup: show3levels - -*** LaTeX attribute ~:float~ now passes through arbitrary values - -LaTeX users are able to define arbitrary float types, e.g. with the -float package. The Org mode LaTeX exporter is now able to process and -export arbitrary float types. The user is responsible for ensuring -that Org mode configures LaTeX to process any new float type. - -*** New =u= table formula flag to enable Calc units simplification mode - -A new =u= mode flag for Calc formulas in Org tables has been added to -enable Calc units simplification mode. - -*** Add a new :refile-targets template option - -When exiting capture mode via ~org-capture-refile~, the variable -~org-refile-targets~ will be temporarily bound to the value of this -template option. - -*** Export DOI links -Org now supports export for DOI links, through its new =ol-doi.el= -library. For backward compatibility, it is loaded by default. -*** =org-set-tags-command= select tags from ~org-global-tags-completion-table~ - -Let ~org-set-tags-command~ TAB fast tag completion interface complete -tags including from both buffer local and user defined persistent -global list (~org-tag-alist~ and ~org-tag-persistent-alist~). Now -option ~org-complete-tags-always-offer-all-agenda-tags~ is honored. - -*** Clocktable option =:formula %= now shows the per-file time percentages - -This change only has an effect when multiple files are contributing to -a given clocktable (such as when =:scope agenda= has been specified). -The existing behavior is that such tables have an extra 'File' column, -and each individual file that contributes has its own summary line -with the headline value '*File time*'. Those summary rows also -produce a rollup time value for the file in the 'Time' column. - -Prior to this change, the built-in =%= formula did not produce a -calculation for those per-file times in the '%' column (the relevant -cells in the '%' column were blank). With this change, the -percentage contribution of each individual file time to the total -time is shown. - -The more agenda files you have, the more useful this behavior becomes. - ** Miscellaneous *** Missing or empty placeholders in "eval" macros are now =nil= They used to be the empty string. From bab1b26eb1da0b2d9f574a8cbc313ee00757742d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Mac=C3=ADas?= Date: Sat, 15 May 2021 16:06:59 +0200 Subject: [PATCH 14/23] lisp/org-attach-git.el: New option `org-attach-git-dir' * lisp/org-attach-git.el (org-attach-git-dir): New option to allow using the attachment directory of the current node as a Git repository, if correctly initialized. (org-attach-git-use-annex, org-attach-git-annex-get-maybe) (org-attach-git-commit): Use the new option. * etc/ORG-NEWS: Announce the new option. Link: https://orgmode.org/list/87y2g8rj7s.fsf@posteo.net/ --- etc/ORG-NEWS | 6 ++++++ lisp/org-attach-git.el | 33 ++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index d9000de41..0baf93a60 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -169,6 +169,12 @@ step that runs inkscape text-to-path replacement over the output file. ~org-html-scripts~ and ~org-html-style-default~ used to be constants, you can now configure them. +*** New option ~org-attach-git-dir~ + +~org-attach-git-dir~ will decide whether to use ~org-attach-git-dir~ +(the default) or use the attachment directory of the current node, if +it is correctly configured as a Git repository. + *** Some faces now use fixed-pitch See [[msg:875z8njaol.fsf@protesilaos.com][this thread]]. diff --git a/lisp/org-attach-git.el b/lisp/org-attach-git.el index 2091cbc61..4c6bdc902 100644 --- a/lisp/org-attach-git.el +++ b/lisp/org-attach-git.el @@ -24,7 +24,7 @@ ;;; Commentary: ;; An extension to org-attach. If `org-attach-id-dir' is initialized -;; as a Git repository, then org-attach-git will automatically commit +;; as a Git repository, then `org-attach-git' will automatically commit ;; changes when it sees them. Requires git-annex. ;;; Code: @@ -52,9 +52,25 @@ If \\='ask, prompt using `y-or-n-p'. If t, always get. If nil, never get." (const :tag "always get from annex if necessary" t) (const :tag "never get from annex" nil))) +(defcustom org-attach-git-dir 'default + "Attachment directory with the Git repository to use. +The default value is to use `org-attach-id-dir'. When set to +`individual-repository', then the directory attached to the +current node, if correctly initialized as a Git repository, will +be used instead." + :group 'org-attach + :package-version '(Org . "9.5") + :type '(choice + (const :tag "Default" default) + (const :tag "Individual repository" individual-repository))) + (defun org-attach-git-use-annex () "Return non-nil if git annex can be used." - (let ((git-dir (vc-git-root (expand-file-name org-attach-id-dir)))) + (let ((git-dir (vc-git-root + (cond ((eq org-attach-git-dir 'default) + (expand-file-name org-attach-id-dir)) + ((eq org-attach-git-dir 'individual-repository) + (org-attach-dir)))))) (and org-attach-git-annex-cutoff (or (file-exists-p (expand-file-name "annex" git-dir)) (file-exists-p (expand-file-name ".git/annex" git-dir)))))) @@ -62,7 +78,11 @@ If \\='ask, prompt using `y-or-n-p'. If t, always get. If nil, never get." (defun org-attach-git-annex-get-maybe (path) "Call git annex get PATH (via shell) if using git annex. Signals an error if the file content is not available and it was not retrieved." - (let* ((default-directory (expand-file-name org-attach-id-dir)) + (let* ((default-directory + (cond ((eq org-attach-git-dir 'default) + (expand-file-name org-attach-id-dir)) + ((eq org-attach-git-dir 'individual-repository) + (org-attach-dir)))) (path-relative (file-relative-name path))) (when (and (org-attach-git-use-annex) (not @@ -86,7 +106,10 @@ This checks for the existence of a \".git\" directory in that directory. Takes an unused optional argument for the sake of being compatible with hook `org-attach-after-change-hook'." - (let* ((dir (expand-file-name org-attach-id-dir)) + (let* ((dir (cond ((eq org-attach-git-dir 'default) + (expand-file-name org-attach-id-dir)) + ((eq org-attach-git-dir 'individual-repository) + (org-attach-dir)))) (git-dir (vc-git-root dir)) (use-annex (org-attach-git-use-annex)) (changes 0)) @@ -102,7 +125,7 @@ with hook `org-attach-after-change-hook'." org-attach-git-annex-cutoff)) (call-process "git" nil nil nil "annex" "add" new-or-modified) (call-process "git" nil nil nil "add" new-or-modified)) - (cl-incf changes)) + (cl-incf changes)) (dolist (deleted (split-string (shell-command-to-string "git ls-files -z --deleted") "\0" t)) From 702fefe9f60414ccbb1e4ae3810d30a610ed1da9 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 15 May 2021 16:45:23 +0200 Subject: [PATCH 15/23] ox-html: Fix typography in a docstring * lisp/ox-html.el (org-html-link-org-files-as-html): Replace org-mode with Org mode and org-mode file with Org file. --- lisp/ox-html.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index e48afe27d..8f8470bb9 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -826,13 +826,13 @@ e.g. \"tex:mathjax\". Allowed values are: ;;;; Links :: Generic (defcustom org-html-link-org-files-as-html t - "Non-nil means make file links to `file.org' point to `file.html'. -When `org-mode' is exporting an `org-mode' file to HTML, links to -non-html files are directly put into a href tag in HTML. -However, links to other Org files (recognized by the extension -\".org\") should become links to the corresponding HTML -file, assuming that the linked `org-mode' file will also be -converted to HTML. + "Non-nil means make file links to \"file.org\" point to \"file.html\". + +When Org mode is exporting an Org file to HTML, links to non-HTML files +are directly put into a \"href\" tag in HTML. However, links to other Org files +(recognized by the extension \".org\") should become links to the corresponding +HTML file, assuming that the linked Org file will also be converted to HTML. + When nil, the links still point to the plain \".org\" file." :group 'org-export-html :type 'boolean) From e860fbf22a22dcbde83c6d131c17ff0b71be6991 Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 22:03:47 +0200 Subject: [PATCH 16/23] lisp/org-list.el: Fix bug wrt updating statistics * lisp/org-list.el (org-update-checkbox-count): Don't update statistics when toggling a checkbox witin a heading that has COOKIE_DATA set to "todo". Reported-by: Michael Brand Link: https://orgmode.org/list/CALn3zohYfoyDm6w-AYWsVRSbOCndBPZQyb+YvHcaEby3JEhWMw@mail.gmail.com --- lisp/org-list.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index 39122e7ce..3a31ae30b 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2484,10 +2484,10 @@ With optional prefix argument ALL, do this for the whole buffer." (let* ((cookie-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)") (box-re "^[ \t]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[ \t]+\ \\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?\\(\\[[- X]\\]\\)") + (cookie-data (or (org-entry-get nil "COOKIE_DATA") "")) (recursivep (or (not org-checkbox-hierarchical-statistics) - (string-match "\\" - (or (org-entry-get nil "COOKIE_DATA") "")))) + (string-match-p "\\" cookie-data))) (within-inlinetask (and (not all) (featurep 'org-inlinetask) (org-inlinetask-in-task-p))) @@ -2533,7 +2533,8 @@ With optional prefix argument ALL, do this for the whole buffer." (while (re-search-forward cookie-re end t) (let ((context (save-excursion (backward-char) (save-match-data (org-element-context))))) - (when (eq (org-element-type context) 'statistics-cookie) + (when (and (eq (org-element-type context) 'statistics-cookie) + (not (string-match-p "\\" cookie-data))) (push (append (list (match-beginning 1) (match-end 1) (match-end 2)) From 5c8e735af458add0f5066a0367b7b655470f9c2c Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 22:03:47 +0200 Subject: [PATCH 17/23] lisp/org-list.el: Fix bug wrt updating statistics * lisp/org-list.el (org-update-checkbox-count): Don't update statistics when toggling a checkbox witin a heading that has COOKIE_DATA set to "todo". Reported-by: Michael Brand Link: https://orgmode.org/list/CALn3zohYfoyDm6w-AYWsVRSbOCndBPZQyb+YvHcaEby3JEhWMw@mail.gmail.com --- lisp/org-list.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index 55eb478be..d2ce1297c 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2476,10 +2476,10 @@ With optional prefix argument ALL, do this for the whole buffer." (let* ((cookie-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)") (box-re "^[ \t]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[ \t]+\ \\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?\\(\\[[- X]\\]\\)") + (cookie-data (or (org-entry-get nil "COOKIE_DATA") "")) (recursivep (or (not org-checkbox-hierarchical-statistics) - (string-match "\\" - (or (org-entry-get nil "COOKIE_DATA") "")))) + (string-match-p "\\" cookie-data))) (within-inlinetask (and (not all) (featurep 'org-inlinetask) (org-inlinetask-in-task-p))) @@ -2525,7 +2525,8 @@ With optional prefix argument ALL, do this for the whole buffer." (while (re-search-forward cookie-re end t) (let ((context (save-excursion (backward-char) (save-match-data (org-element-context))))) - (when (eq (org-element-type context) 'statistics-cookie) + (when (and (eq (org-element-type context) 'statistics-cookie) + (not (string-match-p "\\" cookie-data))) (push (append (list (match-beginning 1) (match-end 1) (match-end 2)) From 747b10c2e04cc876f7b51b6f2b13bfec9e2eb3cf Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 22:21:48 +0200 Subject: [PATCH 18/23] etc/ORG-NEWS: Add a news entry about ditaa.jar not being bundled --- etc/ORG-NEWS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 0baf93a60..1e96c69f0 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -23,7 +23,8 @@ The old contents of the =contrib/= directory now lives in a separate repository at https://git.sr.ht/~bzg/org-contrib. You can install this repository by cloning it and updating your -~load-path~ accordingly. +~load-path~ accordingly. You can also install =org-contrib= as a +[[https://elpa.nongnu.org/nongnu/][NonGNU ELPA]] package. *** Org ELPA and Org archives won't be available for Org > 9.5 @@ -41,6 +42,11 @@ latest unstable Org, please install from the Git repository. See https://orgmode.org/org.html#Installation for the details. +*** =ditaa.jar= is not bundled with Org anymore + +=ditaa.jar= used to be bundled with Org but it is not anymore. +See [[https://github.com/stathissideris/ditaa][the ditaa repository]] on how to install it. + *** ~org-adapt-indentation~ now defaults to =nil= If you want to automatically indent headlines' metadata, set it to From 1d99f5a65ae109f89cc8be5d16f4ad3304ca9a94 Mon Sep 17 00:00:00 2001 From: Bastien Date: Sat, 15 May 2021 23:07:50 +0200 Subject: [PATCH 19/23] lisp/org.el: Minor enhancement to `org-priority' * lisp/org.el (org-priority): When the set of numeric priorities only comprises single digits, ask for a single char event. --- lisp/org.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index af5b952f6..1df68629e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11258,10 +11258,13 @@ or a character." (setq new (if nump - (string-to-number - (read-string (format "Priority %s-%s, SPC to remove: " - (number-to-string org-priority-highest) - (number-to-string org-priority-lowest)))) + (let ((msg (format "Priority %s-%s, SPC to remove: " + (number-to-string org-priority-highest) + (number-to-string org-priority-lowest)))) + (if (< 9 org-priority-lowest) + (string-to-number (read-string msg)) + (message msg) + (string-to-number (char-to-string (read-char-exclusive))))) (progn (message "Priority %c-%c, SPC to remove: " org-priority-highest org-priority-lowest) (save-match-data From 589962b7308daf1367453101042f2991afc1645e Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 16 May 2021 07:48:01 +0200 Subject: [PATCH 20/23] lisp/org.el: Fix bug in `org-sort-remove-invisible' * lisp/org.el (org-sort-remove-invisible): Rewrite using `org-element-interpret-data' to clean invisible parts more rigorously. Link: https://orgmode.org/list/87a6qg1rjx.fsf@posteo.net/ --- lisp/org.el | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ccdd8e84f..d732b48fa 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8096,14 +8096,37 @@ Optional argument WITH-CASE means sort case-sensitively." with-case)) (defun org-sort-remove-invisible (s) - "Remove invisible part of links and emphasis markers from string S." - (remove-text-properties 0 (length s) org-rm-props s) - (replace-regexp-in-string - org-verbatim-re (lambda (m) (format "%s " (match-string 4 m))) - (replace-regexp-in-string - org-emph-re (lambda (m) (format " %s " (match-string 4 m))) - (org-link-display-format s) - t t) t t)) + "Remove emphasis markers and any invisible property from string S. +Assume S may contain only objects." + ;; org-element-interpret-data clears any text property, including + ;; invisible part. + (org-element-interpret-data + (let ((tree (org-element-parse-secondary-string + s (org-element-restriction 'paragraph)))) + (org-element-map tree '(bold code italic link strike-through underline verbatim) + (lambda (o) + (pcase (org-element-type o) + ;; Terminal object. Replace it with its value. + ((or `code `verbatim) + (let ((new (org-element-property :value o))) + (org-element-insert-before new o) + (org-element-put-property + new :post-blank (org-element-property :post-blank o)))) + ;; Non-terminal objects. Splice contents. + (type + (let ((contents + (or (org-element-contents o) + (and (eq type 'link) + (list (org-element-property :raw-link o))))) + (c nil)) + (while contents + (setq c (pop contents)) + (org-element-insert-before c o)) + (org-element-put-property + c :post-blank (org-element-property :post-blank o))))) + (org-element-extract-element o))) + ;; Return modified tree. + tree))) (defvar org-after-sorting-entries-or-items-hook nil "Hook that is run after a bunch of entries or items have been sorted. From 60fccc752e8b236818da31d2c58a8538643c5d6e Mon Sep 17 00:00:00 2001 From: Bastien Date: Sun, 16 May 2021 08:02:29 +0200 Subject: [PATCH 21/23] lisp/org.el: Explicit the docstrings of org-priority-highest/lowest * lisp/org.el (org-priority-highest, org-priority-lowest): Make the docstring more explicit. --- lisp/org.el | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index f7d30b78e..7b4512b4f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -2448,8 +2448,20 @@ set a priority." (defcustom org-priority-highest ?A "The highest priority of TODO items. + A character like ?A, ?B, etc., or a numeric value like 1, 2, etc. -Must be smaller than `org-priority-lowest'." + +The default is the character ?A, which is 65 as a numeric value. + +If you set `org-priority-highest' to a numeric value inferior to +65, Org assumes you want to use digits for the priority cookie. +If you set it to >=65, Org assumes you want to use alphabetical +characters. + +In both cases, the value of `org-priority-highest' must be +smaller than `org-priority-lowest': for example, if \"A\" is the +highest priority, it is smaller than the lowest \"C\" priority: +65 < 67." :group 'org-priorities :type '(choice (character :tag "Character") @@ -2458,8 +2470,20 @@ Must be smaller than `org-priority-lowest'." (defvaralias 'org-lowest-priority 'org-priority-lowest) (defcustom org-priority-lowest ?C "The lowest priority of TODO items. -A character like ?A, ?B, etc., or a numeric value like 1, 2, etc. -Must be higher than `org-priority-highest'." + +A character like ?C, ?B, etc., or a numeric value like 9, 8, etc. + +The default is the character ?C, which is 67 as a numeric value. + +If you set `org-priority-lowest' to a numeric value inferior to +65, Org assumes you want to use digits for the priority cookie. +If you set it to >=65, Org assumes you want to use alphabetical +characters. + +In both cases, the value of `org-priority-lowest' must be greater +than `org-priority-highest': for example, if \"C\" is the lowest +priority, it is greater than the highest \"A\" priority: 67 > +65." :group 'org-priorities :type '(choice (character :tag "Character") From c50c92bc4559c1aab00393fbb1ab46ac17905874 Mon Sep 17 00:00:00 2001 From: Bastien Date: Sun, 16 May 2021 08:28:53 +0200 Subject: [PATCH 22/23] lisp/ol.el: Enhance message when the link has already been stored * lisp/ol.el (org-store-link): Enhance message when the link has already been stored. --- lisp/ol.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ol.el b/lisp/ol.el index 9d86241fa..1eeb2bce1 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -1720,7 +1720,7 @@ non-nil." (if (not (and interactive? link)) (or agenda-link (and link (org-link-make-string link desc))) (if (member (list link desc) org-stored-links) - (message "This link already exists") + (message "This link has already been stored") (push (list link desc) org-stored-links) (message "Stored: %s" (or desc link)) (when custom-id From e444181ee35eebfd65977f7b2249d0fea9007946 Mon Sep 17 00:00:00 2001 From: Bastien Date: Sun, 16 May 2021 08:57:08 +0200 Subject: [PATCH 23/23] lisp/*: Use version number when obsoleting * lisp/org-compat.el: * lisp/org-agenda.el: * lisp/org-macs.el: * lisp/org.el: * lisp/ob-sqlite.el: Use version number when obsoleting. --- lisp/ob-sqlite.el | 2 +- lisp/org-agenda.el | 4 +- lisp/org-compat.el | 282 ++++++++++++++++++++++----------------------- lisp/org-macs.el | 2 +- lisp/org.el | 2 +- 5 files changed, 146 insertions(+), 146 deletions(-) diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el index d227ba69d..7bfb66cf6 100644 --- a/lisp/ob-sqlite.el +++ b/lisp/ob-sqlite.el @@ -114,7 +114,7 @@ This function is called by `org-babel-execute-src-block'." (defun org-babel-sqlite-expand-vars (body vars) "Expand the variables held in VARS in BODY." - (declare (obsolete "use `org-babel-sql-expand-vars' instead." "Org 9.5")) + (declare (obsolete "use `org-babel-sql-expand-vars' instead." "9.5")) (org-babel-sql-expand-vars body vars t)) (defun org-babel-sqlite-table-or-scalar (result) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index bf917d321..2186ab69c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3247,11 +3247,11 @@ s Search for keywords M Like m, but only TODO entries (defvar org-agenda-overriding-cmd-arguments nil) (defun org-let (list &rest body) ;FIXME: So many kittens are suffering here. - (declare (indent 1) (obsolete cl-progv "Mar 2021")) + (declare (indent 1) (obsolete cl-progv "2021")) (eval (cons 'let (cons list body)))) (defun org-let2 (list1 list2 &rest body) ;FIXME: Where did our karma go? - (declare (indent 2) (obsolete cl-progv "Mar 2021")) + (declare (indent 2) (obsolete cl-progv "2021")) (eval (cons 'let (cons list1 (list (cons 'let (cons list2 body))))))) (defun org-agenda-run-series (name series) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index b6eef5a2f..9da9cea6c 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -143,7 +143,7 @@ extension beyond end of line was not controllable." (funcall in l1 l2)))) (define-obsolete-function-alias 'org-babel-edit-distance 'org-string-distance - "Org 9.5") + "9.5") ;;; Emacs < 26.1 compatibility @@ -238,38 +238,38 @@ Case is significant." ;;; Obsolete aliases (remove them after the next major release). ;;;; XEmacs compatibility, now removed. -(define-obsolete-function-alias 'org-activate-mark 'activate-mark "Org 9.0") -(define-obsolete-function-alias 'org-add-hook 'add-hook "Org 9.0") -(define-obsolete-function-alias 'org-bound-and-true-p 'bound-and-true-p "Org 9.0") -(define-obsolete-function-alias 'org-decompose-region 'decompose-region "Org 9.0") -(define-obsolete-function-alias 'org-defvaralias 'defvaralias "Org 9.0") -(define-obsolete-function-alias 'org-detach-overlay 'delete-overlay "Org 9.0") -(define-obsolete-function-alias 'org-file-equal-p 'file-equal-p "Org 9.0") -(define-obsolete-function-alias 'org-float-time 'float-time "Org 9.0") -(define-obsolete-function-alias 'org-indent-line-to 'indent-line-to "Org 9.0") -(define-obsolete-function-alias 'org-indent-to-column 'indent-to-column "Org 9.0") -(define-obsolete-function-alias 'org-looking-at-p 'looking-at-p "Org 9.0") -(define-obsolete-function-alias 'org-looking-back 'looking-back "Org 9.0") -(define-obsolete-function-alias 'org-match-string-no-properties 'match-string-no-properties "Org 9.0") -(define-obsolete-function-alias 'org-propertize 'propertize "Org 9.0") -(define-obsolete-function-alias 'org-select-frame-set-input-focus 'select-frame-set-input-focus "Org 9.0") -(define-obsolete-function-alias 'org-file-remote-p 'file-remote-p "Org 9.2") +(define-obsolete-function-alias 'org-activate-mark 'activate-mark "9.0") +(define-obsolete-function-alias 'org-add-hook 'add-hook "9.0") +(define-obsolete-function-alias 'org-bound-and-true-p 'bound-and-true-p "9.0") +(define-obsolete-function-alias 'org-decompose-region 'decompose-region "9.0") +(define-obsolete-function-alias 'org-defvaralias 'defvaralias "9.0") +(define-obsolete-function-alias 'org-detach-overlay 'delete-overlay "9.0") +(define-obsolete-function-alias 'org-file-equal-p 'file-equal-p "9.0") +(define-obsolete-function-alias 'org-float-time 'float-time "9.0") +(define-obsolete-function-alias 'org-indent-line-to 'indent-line-to "9.0") +(define-obsolete-function-alias 'org-indent-to-column 'indent-to-column "9.0") +(define-obsolete-function-alias 'org-looking-at-p 'looking-at-p "9.0") +(define-obsolete-function-alias 'org-looking-back 'looking-back "9.0") +(define-obsolete-function-alias 'org-match-string-no-properties 'match-string-no-properties "9.0") +(define-obsolete-function-alias 'org-propertize 'propertize "9.0") +(define-obsolete-function-alias 'org-select-frame-set-input-focus 'select-frame-set-input-focus "9.0") +(define-obsolete-function-alias 'org-file-remote-p 'file-remote-p "9.2") (defmacro org-re (s) "Replace posix classes in regular expression S." (declare (debug (form)) - (obsolete "you can safely remove it." "Org 9.0")) + (obsolete "you can safely remove it." "9.0")) s) ;;;; Functions from cl-lib that Org used to have its own implementation of. -(define-obsolete-function-alias 'org-count 'cl-count "Org 9.0") -(define-obsolete-function-alias 'org-every 'cl-every "Org 9.0") -(define-obsolete-function-alias 'org-find-if 'cl-find-if "Org 9.0") -(define-obsolete-function-alias 'org-reduce 'cl-reduce "Org 9.0") -(define-obsolete-function-alias 'org-remove-if 'cl-remove-if "Org 9.0") -(define-obsolete-function-alias 'org-remove-if-not 'cl-remove-if-not "Org 9.0") -(define-obsolete-function-alias 'org-some 'cl-some "Org 9.0") -(define-obsolete-function-alias 'org-floor* 'cl-floor "Org 9.0") +(define-obsolete-function-alias 'org-count 'cl-count "9.0") +(define-obsolete-function-alias 'org-every 'cl-every "9.0") +(define-obsolete-function-alias 'org-find-if 'cl-find-if "9.0") +(define-obsolete-function-alias 'org-reduce 'cl-reduce "9.0") +(define-obsolete-function-alias 'org-remove-if 'cl-remove-if "9.0") +(define-obsolete-function-alias 'org-remove-if-not 'cl-remove-if-not "9.0") +(define-obsolete-function-alias 'org-some 'cl-some "9.0") +(define-obsolete-function-alias 'org-floor* 'cl-floor "9.0") (defun org-sublist (list start end) "Return a section of LIST, from START to END. @@ -277,89 +277,89 @@ Counting starts at 1." (cl-subseq list (1- start) end)) (make-obsolete 'org-sublist "use cl-subseq (note the 0-based counting)." - "Org 9.0") + "9.0") ;;;; Functions available since Emacs 24.3 -(define-obsolete-function-alias 'org-buffer-narrowed-p 'buffer-narrowed-p "Org 9.0") -(define-obsolete-function-alias 'org-called-interactively-p 'called-interactively-p "Org 9.0") -(define-obsolete-function-alias 'org-char-to-string 'char-to-string "Org 9.0") -(define-obsolete-function-alias 'org-delete-directory 'delete-directory "Org 9.0") -(define-obsolete-function-alias 'org-format-seconds 'format-seconds "Org 9.0") -(define-obsolete-function-alias 'org-link-escape-browser 'url-encode-url "Org 9.0") -(define-obsolete-function-alias 'org-no-warnings 'with-no-warnings "Org 9.0") -(define-obsolete-function-alias 'org-number-sequence 'number-sequence "Org 9.0") -(define-obsolete-function-alias 'org-pop-to-buffer-same-window 'pop-to-buffer-same-window "Org 9.0") -(define-obsolete-function-alias 'org-string-match-p 'string-match-p "Org 9.0") +(define-obsolete-function-alias 'org-buffer-narrowed-p 'buffer-narrowed-p "9.0") +(define-obsolete-function-alias 'org-called-interactively-p 'called-interactively-p "9.0") +(define-obsolete-function-alias 'org-char-to-string 'char-to-string "9.0") +(define-obsolete-function-alias 'org-delete-directory 'delete-directory "9.0") +(define-obsolete-function-alias 'org-format-seconds 'format-seconds "9.0") +(define-obsolete-function-alias 'org-link-escape-browser 'url-encode-url "9.0") +(define-obsolete-function-alias 'org-no-warnings 'with-no-warnings "9.0") +(define-obsolete-function-alias 'org-number-sequence 'number-sequence "9.0") +(define-obsolete-function-alias 'org-pop-to-buffer-same-window 'pop-to-buffer-same-window "9.0") +(define-obsolete-function-alias 'org-string-match-p 'string-match-p "9.0") ;;;; Functions and variables from previous releases now obsolete. (define-obsolete-function-alias 'org-element-remove-indentation - 'org-remove-indentation "Org 9.0") + 'org-remove-indentation "9.0") (define-obsolete-variable-alias 'org-latex-create-formula-image-program - 'org-preview-latex-default-process "Org 9.0") + 'org-preview-latex-default-process "9.0") (define-obsolete-variable-alias 'org-latex-preview-ltxpng-directory - 'org-preview-latex-image-directory "Org 9.0") -(define-obsolete-function-alias 'org-table-p 'org-at-table-p "Org 9.0") -(define-obsolete-function-alias 'org-on-heading-p 'org-at-heading-p "Org 9.0") -(define-obsolete-function-alias 'org-at-regexp-p 'org-in-regexp "Org 8.3") + 'org-preview-latex-image-directory "9.0") +(define-obsolete-function-alias 'org-table-p 'org-at-table-p "9.0") +(define-obsolete-function-alias 'org-on-heading-p 'org-at-heading-p "9.0") +(define-obsolete-function-alias 'org-at-regexp-p 'org-in-regexp "8.3") (define-obsolete-function-alias 'org-image-file-name-regexp - 'image-file-name-regexp "Org 9.0") + 'image-file-name-regexp "9.0") (define-obsolete-function-alias 'org-completing-read-no-i - 'completing-read "Org 9.0") + 'completing-read "9.0") (define-obsolete-function-alias 'org-icompleting-read - 'completing-read "Org 9.0") -(define-obsolete-function-alias 'org-iread-file-name 'read-file-name "Org 9.0") + 'completing-read "9.0") +(define-obsolete-function-alias 'org-iread-file-name 'read-file-name "9.0") (define-obsolete-function-alias 'org-days-to-time - 'org-time-stamp-to-now "Org 8.2") + 'org-time-stamp-to-now "8.2") (define-obsolete-variable-alias 'org-agenda-ignore-drawer-properties - 'org-agenda-ignore-properties "Org 9.0") + 'org-agenda-ignore-properties "9.0") (define-obsolete-function-alias 'org-preview-latex-fragment - 'org-toggle-latex-fragment "Org 8.3") + 'org-toggle-latex-fragment "8.3") (define-obsolete-function-alias 'org-export-get-genealogy - 'org-element-lineage "Org 9.0") + 'org-element-lineage "9.0") (define-obsolete-variable-alias 'org-latex-with-hyperref - 'org-latex-hyperref-template "Org 9.0") -(define-obsolete-variable-alias 'hfy-optimisations 'hfy-optimizations "Org 9.0") + 'org-latex-hyperref-template "9.0") +(define-obsolete-variable-alias 'hfy-optimisations 'hfy-optimizations "9.0") (define-obsolete-variable-alias 'org-export-htmlized-org-css-url - 'org-org-htmlized-css-url "Org 8.2") -(define-obsolete-function-alias 'org-list-parse-list 'org-list-to-lisp "Org 9.0") + 'org-org-htmlized-css-url "8.2") +(define-obsolete-function-alias 'org-list-parse-list 'org-list-to-lisp "9.0") (define-obsolete-function-alias 'org-agenda-todayp - 'org-agenda-today-p "Org 9.0") + 'org-agenda-today-p "9.0") (define-obsolete-function-alias 'org-babel-examplize-region - 'org-babel-examplify-region "Org 9.0") + 'org-babel-examplify-region "9.0") (define-obsolete-variable-alias 'org-babel-capitalize-example-region-markers - 'org-babel-uppercase-example-markers "Org 9.1") + 'org-babel-uppercase-example-markers "9.1") -(define-obsolete-function-alias 'org-babel-trim 'org-trim "Org 9.0") +(define-obsolete-function-alias 'org-babel-trim 'org-trim "9.0") (define-obsolete-variable-alias 'org-html-style 'org-html-head "24.4") (define-obsolete-function-alias 'org-insert-columns-dblock - 'org-columns-insert-dblock "Org 9.0") + 'org-columns-insert-dblock "9.0") (define-obsolete-variable-alias 'org-export-babel-evaluate - 'org-export-use-babel "Org 9.1") + 'org-export-use-babel "9.1") (define-obsolete-function-alias 'org-activate-bracket-links - 'org-activate-links "Org 9.0") -(define-obsolete-function-alias 'org-activate-plain-links 'ignore "Org 9.0") -(define-obsolete-function-alias 'org-activate-angle-links 'ignore "Org 9.0") -(define-obsolete-function-alias 'org-remove-double-quotes 'org-strip-quotes "Org 9.0") + 'org-activate-links "9.0") +(define-obsolete-function-alias 'org-activate-plain-links 'ignore "9.0") +(define-obsolete-function-alias 'org-activate-angle-links 'ignore "9.0") +(define-obsolete-function-alias 'org-remove-double-quotes 'org-strip-quotes "9.0") (define-obsolete-function-alias 'org-get-indentation - 'current-indentation "Org 9.2") -(define-obsolete-function-alias 'org-capture-member 'org-capture-get "Org 9.2") + 'current-indentation "9.2") +(define-obsolete-function-alias 'org-capture-member 'org-capture-get "9.2") (define-obsolete-function-alias 'org-remove-from-invisibility-spec - 'remove-from-invisibility-spec "Org 9.2") + 'remove-from-invisibility-spec "9.2") (define-obsolete-variable-alias 'org-effort-durations 'org-duration-units - "Org 9.2") + "9.2") (define-obsolete-function-alias 'org-toggle-latex-fragment 'org-latex-preview - "Org 9.3") + "9.3") (define-obsolete-function-alias 'org-remove-latex-fragment-image-overlays - 'org-clear-latex-preview "Org 9.3") + 'org-clear-latex-preview "9.3") (define-obsolete-variable-alias 'org-attach-directory - 'org-attach-id-dir "Org 9.3") -(make-obsolete 'org-attach-store-link "No longer used" "Org 9.4") -(make-obsolete 'org-attach-expand-link "No longer used" "Org 9.4") + 'org-attach-id-dir "9.3") +(make-obsolete 'org-attach-store-link "No longer used" "9.4") +(make-obsolete 'org-attach-expand-link "No longer used" "9.4") (defun org-in-fixed-width-region-p () "Non-nil if point in a fixed-width region." @@ -367,7 +367,7 @@ Counting starts at 1." (eq 'fixed-width (org-element-type (org-element-at-point))))) (make-obsolete 'org-in-fixed-width-region-p "use `org-element' library" - "Org 9.0") + "9.0") (defun org-compatible-face (inherits specs) "Make a compatible face specification. @@ -378,7 +378,7 @@ is, use SPECS to define the face." (if (facep inherits) (list (list t :inherit inherits)) specs)) -(make-obsolete 'org-compatible-face "you can remove it." "Org 9.0") +(make-obsolete 'org-compatible-face "you can remove it." "9.0") (defun org-add-link-type (type &optional follow export) "Add a new TYPE link. @@ -409,7 +409,7 @@ See `org-link-parameters' for documentation on the other parameters." (org-link-set-parameters type :follow follow :export export) (message "Created %s link." type)) -(make-obsolete 'org-add-link-type "use `org-link-set-parameters' instead." "Org 9.0") +(make-obsolete 'org-add-link-type "use `org-link-set-parameters' instead." "9.0") ;;;; Functions unused in Org core. (defun org-table-recognize-table.el () @@ -433,12 +433,12 @@ See `org-link-parameters' for documentation on the other parameters." ;; Not used since commit 6d1e3082, Feb 2010. (make-obsolete 'org-table-recognize-table.el "please notify Org mailing list if you use this function." - "Org 9.0") + "9.0") (defmacro org-preserve-lc (&rest body) (declare (debug (body)) (obsolete "please notify Org mailing list if you use this function." - "Org 9.2")) + "9.2")) (org-with-gensyms (line col) `(let ((,line (org-current-line)) (,col (current-column))) @@ -450,12 +450,12 @@ See `org-link-parameters' for documentation on the other parameters." (defun org-version-check (version &rest _) "Non-nil if VERSION is lower (older) than `emacs-version'." (declare (obsolete "use `version<' or `fboundp' instead." - "Org 9.2")) + "9.2")) (version< version emacs-version)) (defun org-remove-angle-brackets (s) (org-unbracket-string "<" ">" s)) -(make-obsolete 'org-remove-angle-brackets 'org-unbracket-string "Org 9.0") +(make-obsolete 'org-remove-angle-brackets 'org-unbracket-string "9.0") (defcustom org-publish-sitemap-file-entry-format "%t" "Format string for site-map file entry. @@ -469,7 +469,7 @@ You could use brackets to delimit on what part the link will be. (make-obsolete-variable 'org-publish-sitemap-file-entry-format "set `:sitemap-format-entry' in `org-publish-project-alist' instead." - "Org 9.1") + "9.1") (defvar org-agenda-skip-regexp) (defun org-agenda-skip-entry-when-regexp-matches () @@ -478,7 +478,7 @@ If yes, it returns the end position of this entry, causing agenda commands to skip the entry but continuing the search in the subtree. This is a function that can be put into `org-agenda-skip-function' for the duration of a command." - (declare (obsolete "use `org-agenda-skip-if' instead." "Org 9.1")) + (declare (obsolete "use `org-agenda-skip-if' instead." "9.1")) (let ((end (save-excursion (org-end-of-subtree t))) skip) (save-excursion @@ -490,7 +490,7 @@ of a command." If yes, it returns the end position of this tree, causing agenda commands to skip this subtree. This is a function that can be put into `org-agenda-skip-function' for the duration of a command." - (declare (obsolete "use `org-agenda-skip-if' instead." "Org 9.1")) + (declare (obsolete "use `org-agenda-skip-if' instead." "9.1")) (let ((end (save-excursion (org-end-of-subtree t))) skip) (save-excursion @@ -504,7 +504,7 @@ causing agenda commands to skip the entry but continuing the search in the subtree. This is a function that can be put into `org-agenda-skip-function' for the duration of a command. An important use of this function is for the stuck project list." - (declare (obsolete "use `org-agenda-skip-if' instead." "Org 9.1")) + (declare (obsolete "use `org-agenda-skip-if' instead." "9.1")) (let ((end (save-excursion (org-end-of-subtree t))) (entry-end (save-excursion (outline-next-heading) (1- (point)))) skip) @@ -513,126 +513,126 @@ use of this function is for the stuck project list." (and skip entry-end))) (define-obsolete-function-alias 'org-minutes-to-clocksum-string - 'org-duration-from-minutes "Org 9.1") + 'org-duration-from-minutes "9.1") (define-obsolete-function-alias 'org-hh:mm-string-to-minutes - 'org-duration-to-minutes "Org 9.1") + 'org-duration-to-minutes "9.1") (define-obsolete-function-alias 'org-duration-string-to-minutes - 'org-duration-to-minutes "Org 9.1") + 'org-duration-to-minutes "9.1") (make-obsolete-variable 'org-time-clocksum-format - "set `org-duration-format' instead." "Org 9.1") + "set `org-duration-format' instead." "9.1") (make-obsolete-variable 'org-time-clocksum-use-fractional - "set `org-duration-format' instead." "Org 9.1") + "set `org-duration-format' instead." "9.1") (make-obsolete-variable 'org-time-clocksum-fractional-format - "set `org-duration-format' instead." "Org 9.1") + "set `org-duration-format' instead." "9.1") (make-obsolete-variable 'org-time-clocksum-use-effort-durations - "set `org-duration-units' instead." "Org 9.1") + "set `org-duration-units' instead." "9.1") (define-obsolete-function-alias 'org-babel-number-p - 'org-babel--string-to-number "Org 9.0") + 'org-babel--string-to-number "9.0") (define-obsolete-variable-alias 'org-usenet-links-prefer-google - 'org-gnus-prefer-web-links "Org 9.1") + 'org-gnus-prefer-web-links "9.1") (define-obsolete-variable-alias 'org-texinfo-def-table-markup - 'org-texinfo-table-default-markup "Org 9.1") + 'org-texinfo-table-default-markup "9.1") (define-obsolete-variable-alias 'org-agenda-overriding-columns-format - 'org-overriding-columns-format "Org 9.2.2") + 'org-overriding-columns-format "9.2.2") (define-obsolete-variable-alias 'org-doi-server-url - 'org-link-doi-server-url "Org 9.3") + 'org-link-doi-server-url "9.3") (define-obsolete-variable-alias 'org-email-link-description-format - 'org-link-email-description-format "Org 9.3") + 'org-link-email-description-format "9.3") (define-obsolete-variable-alias 'org-make-link-description-function - 'org-link-make-description-function "Org 9.3") + 'org-link-make-description-function "9.3") (define-obsolete-variable-alias 'org-from-is-user-regexp - 'org-link-from-user-regexp "Org 9.3") + 'org-link-from-user-regexp "9.3") (define-obsolete-variable-alias 'org-descriptive-links - 'org-link-descriptive "Org 9.3") + 'org-link-descriptive "9.3") (define-obsolete-variable-alias 'org-context-in-file-links - 'org-link-context-for-files "Org 9.3") + 'org-link-context-for-files "9.3") (define-obsolete-variable-alias 'org-keep-stored-link-after-insertion - 'org-link-keep-stored-after-insertion "Org 9.3") + 'org-link-keep-stored-after-insertion "9.3") (define-obsolete-variable-alias 'org-display-internal-link-with-indirect-buffer - 'org-link-use-indirect-buffer-for-internals "Org 9.3") + 'org-link-use-indirect-buffer-for-internals "9.3") (define-obsolete-variable-alias 'org-confirm-shell-link-function - 'org-link-shell-confirm-function "Org 9.3") + 'org-link-shell-confirm-function "9.3") (define-obsolete-variable-alias 'org-confirm-shell-link-not-regexp - 'org-link-shell-skip-confirm-regexp "Org 9.3") + 'org-link-shell-skip-confirm-regexp "9.3") (define-obsolete-variable-alias 'org-confirm-elisp-link-function - 'org-link-elisp-confirm-function "Org 9.3") + 'org-link-elisp-confirm-function "9.3") (define-obsolete-variable-alias 'org-confirm-elisp-link-not-regexp - 'org-link-elisp-skip-confirm-regexp "Org 9.3") + 'org-link-elisp-skip-confirm-regexp "9.3") (define-obsolete-function-alias 'org-file-complete-link - 'org-link-complete-file "Org 9.3") + 'org-link-complete-file "9.3") (define-obsolete-function-alias 'org-email-link-description - 'org-link-email-description "Org 9.3") + 'org-link-email-description "9.3") (define-obsolete-function-alias 'org-make-link-string - 'org-link-make-string "Org 9.3") + 'org-link-make-string "9.3") (define-obsolete-function-alias 'org-store-link-props - 'org-link-store-props "Org 9.3") + 'org-link-store-props "9.3") (define-obsolete-function-alias 'org-add-link-props - 'org-link-add-props "Org 9.3") + 'org-link-add-props "9.3") (define-obsolete-function-alias 'org-make-org-heading-search-string - 'org-link-heading-search-string "Org 9.3") + 'org-link-heading-search-string "9.3") (define-obsolete-function-alias 'org-make-link-regexps - 'org-link-make-regexps "Org 9.3") + 'org-link-make-regexps "9.3") (define-obsolete-function-alias 'org-property-global-value - 'org-property-global-or-keyword-value "Org 9.3") + 'org-property-global-or-keyword-value "9.3") -(make-obsolete-variable 'org-file-properties 'org-keyword-properties "Org 9.3") +(make-obsolete-variable 'org-file-properties 'org-keyword-properties "9.3") (define-obsolete-variable-alias 'org-angle-link-re - 'org-link-angle-re "Org 9.3") + 'org-link-angle-re "9.3") (define-obsolete-variable-alias 'org-plain-link-re - 'org-link-plain-re "Org 9.3") + 'org-link-plain-re "9.3") (define-obsolete-variable-alias 'org-bracket-link-regexp - 'org-link-bracket-re "Org 9.3") + 'org-link-bracket-re "9.3") (define-obsolete-variable-alias 'org-bracket-link-analytic-regexp - 'org-link-bracket-re "Org 9.3") + 'org-link-bracket-re "9.3") (define-obsolete-variable-alias 'org-any-link-re - 'org-link-any-re "Org 9.3") + 'org-link-any-re "9.3") (define-obsolete-function-alias 'org-open-link-from-string - 'org-link-open-from-string "Org 9.3") + 'org-link-open-from-string "9.3") (define-obsolete-function-alias 'org-add-angle-brackets - 'org-link-add-angle-brackets "Org 9.3") + 'org-link-add-angle-brackets "9.3") ;; The function was made obsolete by commit 65399674d5 of 2013-02-22. ;; This make-obsolete call was added 2016-09-01. (make-obsolete 'org-capture-import-remember-templates "use the `org-capture-templates' variable instead." - "Org 9.0") + "9.0") (defun org-show-block-all () "Unfold all blocks in the current buffer." @@ -641,34 +641,34 @@ use of this function is for the stuck project list." (make-obsolete 'org-show-block-all "use `org-show-all' instead." - "Org 9.2") + "9.2") -(define-obsolete-function-alias 'org-get-tags-at 'org-get-tags "Org 9.2") +(define-obsolete-function-alias 'org-get-tags-at 'org-get-tags "9.2") (defun org-get-local-tags () "Get a list of tags defined in the current headline." - (declare (obsolete "use `org-get-tags' instead." "Org 9.2")) + (declare (obsolete "use `org-get-tags' instead." "9.2")) (org-get-tags nil 'local)) (defun org-get-local-tags-at (&optional pos) "Get a list of tags defined in the current headline." - (declare (obsolete "use `org-get-tags' instead." "Org 9.2")) + (declare (obsolete "use `org-get-tags' instead." "9.2")) (org-get-tags pos 'local)) (defun org-get-tags-string () "Get the TAGS string in the current headline." - (declare (obsolete "use `org-make-tag-string' instead." "Org 9.2")) + (declare (obsolete "use `org-make-tag-string' instead." "9.2")) (org-make-tag-string (org-get-tags nil t))) -(define-obsolete-function-alias 'org-set-tags-to 'org-set-tags "Org 9.2") +(define-obsolete-function-alias 'org-set-tags-to 'org-set-tags "9.2") (defun org-align-all-tags () "Align the tags in all headings." - (declare (obsolete "use `org-align-tags' instead." "Org 9.2")) + (declare (obsolete "use `org-align-tags' instead." "9.2")) (org-align-tags t)) (define-obsolete-function-alias - 'org-at-property-block-p 'org-at-property-drawer-p "Org 9.4") + 'org-at-property-block-p 'org-at-property-drawer-p "9.4") (defun org-flag-drawer (flag &optional element beg end) "When FLAG is non-nil, hide the drawer we are at. @@ -679,7 +679,7 @@ When optional argument ELEMENT is a parsed drawer, as returned by When buffer positions BEG and END are provided, hide or show that region as a drawer without further ado." - (declare (obsolete "use `org-hide-drawer-toggle' instead." "Org 9.4")) + (declare (obsolete "use `org-hide-drawer-toggle' instead." "9.4")) (if (and beg end) (org-flag-region beg end flag 'outline) (let ((drawer (or element @@ -704,14 +704,14 @@ region as a drawer without further ado." "Toggle visibility of block at point. Unlike to `org-hide-block-toggle', this function does not throw an error. Return a non-nil value when toggling is successful." - (declare (obsolete "use `org-hide-block-toggle' instead." "Org 9.4")) + (declare (obsolete "use `org-hide-block-toggle' instead." "9.4")) (interactive) (org-hide-block-toggle nil t)) (defun org-hide-block-toggle-all () "Toggle the visibility of all blocks in the current buffer." (declare (obsolete "please notify Org mailing list if you use this function." - "Org 9.4")) + "9.4")) (let ((start (point-min)) (end (point-max))) (save-excursion @@ -729,17 +729,17 @@ an error. Return a non-nil value when toggling is successful." Calls `org-table-next-row' or `newline-and-indent', depending on context. See the individual commands for more information." (declare (obsolete "use `org-return' with INDENT set to t instead." - "Org 9.4")) + "9.4")) (interactive) (org-return t)) (defmacro org-with-silent-modifications (&rest body) - (declare (obsolete "use `with-silent-modifications' instead." "Org 9.2") + (declare (obsolete "use `with-silent-modifications' instead." "9.2") (debug (body))) `(with-silent-modifications ,@body)) (define-obsolete-function-alias 'org-babel-strip-quotes - 'org-strip-quotes "Org 9.2") + 'org-strip-quotes "9.2") (define-obsolete-variable-alias 'org-sort-agenda-notime-is-late 'org-agenda-sort-notime-is-late "9.4") @@ -756,9 +756,9 @@ context. See the individual commands for more information." (make-obsolete-variable 'org-maybe-keyword-time-regexp "use `org-planning-line-re', followed by `org-ts-regexp-both' instead." - "Org 9.4") + "9.4") -(define-obsolete-function-alias 'org-copy 'org-refile-copy "Org 9.4") +(define-obsolete-function-alias 'org-copy 'org-refile-copy "9.4") ;;;; Obsolete link types diff --git a/lisp/org-macs.el b/lisp/org-macs.el index cd9fd1d83..f21baeb5b 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -172,7 +172,7 @@ because otherwise all these markers will point to nowhere." ,@body))) (defmacro org-eval-in-environment (environment form) - (declare (debug (form form)) (indent 1) (obsolete cl-progv "Mar 2021")) + (declare (debug (form form)) (indent 1) (obsolete cl-progv "2021")) `(eval (list 'let ,environment ',form))) ;;;###autoload diff --git a/lisp/org.el b/lisp/org.el index 7b4512b4f..9ff134965 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -656,7 +656,7 @@ defined in org-duration.el.") (make-obsolete-variable 'org-load-hook - "use `with-eval-after-load' instead." "Org 9.5") + "use `with-eval-after-load' instead." "9.5") (defcustom org-log-buffer-setup-hook nil "Hook that is run after an Org log buffer is created."