[elpa] externals-release/org 06c064e 2/4: lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo'
branch: externals-release/org commit 06c064e97c329bf8271ce71f00f39d5441ebd7c9 Author: Samim Pezeshki Commit: Bastien lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo' * lisp/org-agenda.el (org-agenda-highlight-todo): Skip formatting the to-do keyword when `org-agenda-todo-keyword-format' is the empty string. TINYCHANGE --- lisp/org-agenda.el | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 205225a..b7a5d40 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7063,12 +7063,13 @@ The optional argument TYPE tells the agenda type." (setq x (concat (substring x 0 (match-end 1)) - (format org-agenda-todo-keyword-format - (match-string 2 x)) - ;; Remove `display' property as the icon could leak - ;; on the white space. - (org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display)) + (unless (string-empty-p org-agenda-todo-keyword-format) +(format org-agenda-todo-keyword-format +(match-string 2 x)) +;; Remove `display' property as the icon could leak +;; on the white space. +(org-add-props " " (org-plist-delete (text-properties-at 0 x) + 'display))) (substring x (match-end 3))) x)))
[elpa] externals-release/org 8544f55 1/4: lisp/org-inlinetask.el: Silent the byte-compiler
branch: externals-release/org commit 8544f555ac04ebc3fb55cd5bc522deadfb9970f8 Author: Bastien Commit: Bastien lisp/org-inlinetask.el: Silent the byte-compiler * lisp/org-inlinetask.el (org-inlinetask-promote) (org-inlinetask-demote): Fix calls to `looking-back'. --- lisp/org-inlinetask.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index a1e4ef2..d5e01fe 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -238,7 +238,7 @@ going below `org-inlinetask-min-level'." (setq beg (point)) (replace-match down-task nil t nil 1) (org-inlinetask-goto-end) - (if (and (eobp) (looking-back "END\\s-*")) + (if (and (eobp) (looking-back "END\\s-*" (point-at-bol))) (beginning-of-line) (forward-line -1)) (unless (= (point) beg) @@ -264,7 +264,7 @@ If the task has an end part, also demote it." (setq beg (point)) (replace-match down-task nil t nil 1) (org-inlinetask-goto-end) -(if (and (eobp) (looking-back "END\\s-*")) +(if (and (eobp) (looking-back "END\\s-*" (point-at-bol))) (beginning-of-line) (forward-line -1)) (unless (= (point) beg)
[elpa] externals/org 5a1a1eb 4/6: Merge branch 'maint'
branch: externals/org commit 5a1a1ebdebc2fb1f7db27602e584db9f7f5fb979 Merge: f98e3ef 06c064e Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org-agenda.el | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index cbae3c0..b45b855 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7144,12 +7144,13 @@ The optional argument TYPE tells the agenda type." (setq x (concat (substring x 0 (match-end 1)) - (format org-agenda-todo-keyword-format - (match-string 2 x)) - ;; Remove `display' property as the icon could leak - ;; on the white space. - (org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display)) + (unless (string-empty-p org-agenda-todo-keyword-format) +(format org-agenda-todo-keyword-format +(match-string 2 x)) +;; Remove `display' property as the icon could leak +;; on the white space. +(org-add-props " " (org-plist-delete (text-properties-at 0 x) + 'display))) (substring x (match-end 3))) x)))
[elpa] externals/org b2c5028 5/6: lisp/org.el: Minor aesthetic clean-up
branch: externals/org commit b2c5028e5bbecf14f3f30c36197c8b00685bbdd9 Author: Bastien Commit: Bastien 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 a9a2bef..8463c33 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."
[elpa] externals-release/org updated (8b18405 -> f313b81)
elpasync pushed a change to branch externals-release/org. from 8b18405 Throw user errors when trying to drag inline tasks new 8544f55 lisp/org-inlinetask.el: Silent the byte-compiler new 06c064e lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo' new d285831 org-refile.el: Fix the case of emtpy buffer name new f313b81 Improve org-link-plain-re Summary of changes: lisp/ol.el | 41 +- lisp/org-agenda.el | 13 +++--- lisp/org-inlinetask.el | 4 +- lisp/org-refile.el | 13 +++--- testing/lisp/test-ol.el | 110 5 files changed, 158 insertions(+), 23 deletions(-)
[elpa] externals-release/org d285831 3/4: org-refile.el: Fix the case of emtpy buffer name
branch: externals-release/org commit d285831af391be0045cd70650f1ec87d9a3e3000 Author: satotake Commit: Bastien org-refile.el: Fix the case of emtpy buffer name * lisp/org-refile.el (org-refile-get-targets): Ensure that the arguments of `file-name-nondirectory' and `file-truename' are not nil. This prevents errors from being raised when calling `org-refile' in a buffer that is not visiting a file. TINYCHANGE --- lisp/org-refile.el | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 1e6872b..e4f000d 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -310,11 +310,13 @@ converted to a headline before refiling." (setq f (buffer-file-name (buffer-base-buffer f (setq f (and f (expand-file-name f))) (when (eq org-refile-use-outline-path 'file) -(push (list (file-name-nondirectory f) f nil nil) tgs)) +(push (list (and f (file-name-nondirectory f)) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'buffer-name) (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'full-file-path) -(push (list (file-truename (buffer-file-name (buffer-base-buffer))) f nil nil) tgs)) +(push (list (and (buffer-file-name (buffer-base-buffer)) + (file-truename (buffer-file-name (buffer-base-buffer + f nil nil) tgs)) (org-with-wide-buffer (goto-char (point-min)) (setq org-outline-path-cache nil) @@ -337,9 +339,10 @@ converted to a headline before refiling." #'identity (append (pcase org-refile-use-outline-path - (`file (list (file-name-nondirectory -(buffer-file-name - (buffer-base-buffer) + (`file (list + (and (buffer-file-name (buffer-base-buffer)) +(file-name-nondirectory + (buffer-file-name (buffer-base-buffer)) (`full-file-path (list (buffer-file-name (buffer-base-buffer
[elpa] externals/org updated (34bbb03 -> e2cf436)
elpasync pushed a change to branch externals/org. from 34bbb03 CONTRIBUTE: Small enhancements new 78e39d5 lisp/org-id.el: Small enhancements new 8544f55 lisp/org-inlinetask.el: Silent the byte-compiler new c6d4c93 Merge branch 'maint' new f98e3ef lisp/ox-md.el: Mark some arguments as unused new 06c064e lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo' new 5a1a1eb Merge branch 'maint' new b2c5028 lisp/org.el: Minor aesthetic clean-up new d285831 org-refile.el: Fix the case of emtpy buffer name new f313b81 Improve org-link-plain-re new e2cf436 Merge branch 'maint' Summary of changes: lisp/ol.el | 41 +- lisp/org-agenda.el | 13 +++--- lisp/org-id.el | 25 ++- lisp/org-inlinetask.el | 4 +- lisp/org-refile.el | 13 +++--- lisp/org.el | 6 ++- lisp/ox-md.el | 4 +- testing/lisp/test-ol.el | 110 8 files changed, 176 insertions(+), 40 deletions(-)
[elpa] externals/org c6d4c93 2/6: Merge branch 'maint'
branch: externals/org commit c6d4c9344c57ed45eee9f7bf563751330d9e13b4 Merge: 78e39d5 8544f55 Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org-inlinetask.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index 79146d2..f19353b 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -238,7 +238,7 @@ going below `org-inlinetask-min-level'." (setq beg (point)) (replace-match down-task nil t nil 1) (org-inlinetask-goto-end) - (if (and (eobp) (looking-back "END\\s-*")) + (if (and (eobp) (looking-back "END\\s-*" (point-at-bol))) (beginning-of-line) (forward-line -1)) (unless (= (point) beg) @@ -264,7 +264,7 @@ If the task has an end part, also demote it." (setq beg (point)) (replace-match down-task nil t nil 1) (org-inlinetask-goto-end) -(if (and (eobp) (looking-back "END\\s-*")) +(if (and (eobp) (looking-back "END\\s-*" (point-at-bol))) (beginning-of-line) (forward-line -1)) (unless (= (point) beg)
[elpa] externals-release/org f313b81 4/4: Improve org-link-plain-re
branch: externals-release/org commit f313b8184129090395f1ac774c1287ca7453d948 Author: Ihor Radchenko Commit: Bastien Improve org-link-plain-re * lisp/ol.el (org-link-make-regexps): Allow URLs with up to two levels of nested brackets. * lisp/org.el (org-link-plain-re): Update docstring. * testing/lisp/test-ol.el: Add tests for the plain link regular expression. (org-link-plain-re): Update docstring. Now, Now, URLs like [1] can be matched. The new regexp is based on [2]. The docstring of `org-link-plain-re' explicitly mentions that the regexp must contain groups for the link type and the path. [1] https://doi.org/10.1016/0160-791x(79)90023-x [2] https://daringfireball.net/2010/07/improved_regex_for_matching_urls --- lisp/ol.el | 41 +- testing/lisp/test-ol.el | 110 2 files changed, 141 insertions(+), 10 deletions(-) diff --git a/lisp/ol.el b/lisp/ol.el index d37dc85..60c1bbe 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -514,7 +514,10 @@ links more efficient." "Matches link with angular brackets, spaces are allowed.") (defvar org-link-plain-re nil - "Matches plain link, without spaces.") + "Matches plain link, without spaces. +Group 1 must contain the link type (i.e. https). +Group 2 must contain the link path (i.e. //example.com). +Used by `org-element-link-parser'.") (defvar org-link-bracket-re nil "Matches a link in double brackets.") @@ -802,15 +805,33 @@ This should be called after the variable `org-link-parameters' has changed." (format "<%s:\\([^>\n]*\\(?:\n[ \t]*[^> \t\n][^>\n]*\\)*\\)>" types-re) org-link-plain-re - (concat - "\\<" types-re ":" - "\\([^][ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)") - ;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)") - org-link-bracket-re - (rx (seq "[[" - ;; URI part: match group 1. - (group - (one-or-more + (let* ((non-space-bracket "[^][ \t\n()<>]") +(parenthesis + `(seq "(" + (0+ (or (regex ,non-space-bracket) + (seq "(" +(0+ (regex ,non-space-bracket)) +")"))) + ")"))) + ;; Heuristics for an URL link inspired by + ;; https://daringfireball.net/2010/07/improved_regex_for_matching_urls + (rx-to-string +`(seq word-start + ;; Link type: match group 1. + (regexp ,types-re) + ":" + ;; Link path: match group 2. + (group + (1+ (or (regex ,non-space-bracket) + ,parenthesis)) + (or (regexp "[^[:punct:] \t\n]") + ?/ + ,parenthesis) + org-link-bracket-re + (rx (seq "[[" + ;; URI part: match group 1. + (group + (one-or-more (or (not (any "[]\\")) (and "\\" (zero-or-more "") (any "[]")) (and (one-or-more "\\") (not (any "[]")) diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el index 5b7dc51..ddcc570 100644 --- a/testing/lisp/test-ol.el +++ b/testing/lisp/test-ol.el @@ -491,5 +491,115 @@ (org-previous-link)) (buffer-substring (point) (line-end-position)) + +;;; Link regexps + + +(defmacro test-ol-parse-link-in-text (text) + "Return list of :type and :path of link parsed in TEXT. +\"\" string must be at the beginning of the link to be parsed." + (declare (indent 1)) + `(org-test-with-temp-text ,text + (list (org-element-property :type (org-element-link-parser)) + (org-element-property :path (org-element-link-parser) + +(ert-deftest test-ol/plain-link-re () + "Test `org-link-plain-re'." + (should + (equal +'("https" "//example.com") +(test-ol-parse-link-in-text +"(https://example.com)"))) + (should + (equal +'("https" "//example.com/qwe()") +(test-ol-parse-link-in-text +"(Some text https://example.com/qwe())"))) + (should + (equal +'("https" "//doi.org/10.1016/0160-791x(79)90023-x") +(test-ol-parse-link-in-text +"https://doi.org/10.1016/0160-791x(79)90023-x"))) + (should + (equal +'("file" "aa") +(test-ol-parse-link-in-text +"The file:aa link"))) + (should + (equal +'("file" "a(b)c") +(test-ol-parse-link-in-text +"The file:a(b)c link"))) + (should + (equal +'("file" "a()") +(test-ol-parse-link-in-text +"The file:a() link"))) + (should + (equal +'("file" "aa((a))") +(test-ol-parse-li
[elpa] externals/org f98e3ef 3/6: lisp/ox-md.el: Mark some arguments as unused
branch: externals/org commit f98e3ef65a3cb1ad1b6421103559a51aa697b6c5 Author: Bastien Commit: Bastien 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 a19664a..d288aba 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)
[elpa] externals/org e2cf436 6/6: Merge branch 'maint'
branch: externals/org commit e2cf4369d69e1db7efb295921596acd4416cfd7c Merge: b2c5028 f313b81 Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/ol.el | 41 +- lisp/org-refile.el | 13 +++--- testing/lisp/test-ol.el | 110 3 files changed, 149 insertions(+), 15 deletions(-) diff --git a/lisp/ol.el b/lisp/ol.el index e6ba6e4..9d86241 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -512,7 +512,10 @@ links more efficient." "Matches link with angular brackets, spaces are allowed.") (defvar org-link-plain-re nil - "Matches plain link, without spaces.") + "Matches plain link, without spaces. +Group 1 must contain the link type (i.e. https). +Group 2 must contain the link path (i.e. //example.com). +Used by `org-element-link-parser'.") (defvar org-link-bracket-re nil "Matches a link in double brackets.") @@ -800,15 +803,33 @@ This should be called after the variable `org-link-parameters' has changed." (format "<%s:\\([^>\n]*\\(?:\n[ \t]*[^> \t\n][^>\n]*\\)*\\)>" types-re) org-link-plain-re - (concat - "\\<" types-re ":" - "\\([^][ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)") - ;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)") - org-link-bracket-re - (rx (seq "[[" - ;; URI part: match group 1. - (group - (one-or-more + (let* ((non-space-bracket "[^][ \t\n()<>]") +(parenthesis + `(seq "(" + (0+ (or (regex ,non-space-bracket) + (seq "(" +(0+ (regex ,non-space-bracket)) +")"))) + ")"))) + ;; Heuristics for an URL link inspired by + ;; https://daringfireball.net/2010/07/improved_regex_for_matching_urls + (rx-to-string +`(seq word-start + ;; Link type: match group 1. + (regexp ,types-re) + ":" + ;; Link path: match group 2. + (group + (1+ (or (regex ,non-space-bracket) + ,parenthesis)) + (or (regexp "[^[:punct:] \t\n]") + ?/ + ,parenthesis) + org-link-bracket-re + (rx (seq "[[" + ;; URI part: match group 1. + (group + (one-or-more (or (not (any "[]\\")) (and "\\" (zero-or-more "") (any "[]")) (and (one-or-more "\\") (not (any "[]")) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 24a1bde..2900be2 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -310,11 +310,13 @@ converted to a headline before refiling." (setq f (buffer-file-name (buffer-base-buffer f (setq f (and f (expand-file-name f))) (when (eq org-refile-use-outline-path 'file) -(push (list (file-name-nondirectory f) f nil nil) tgs)) +(push (list (and f (file-name-nondirectory f)) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'buffer-name) (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs)) (when (eq org-refile-use-outline-path 'full-file-path) -(push (list (file-truename (buffer-file-name (buffer-base-buffer))) f nil nil) tgs)) +(push (list (and (buffer-file-name (buffer-base-buffer)) + (file-truename (buffer-file-name (buffer-base-buffer + f nil nil) tgs)) (org-with-wide-buffer (goto-char (point-min)) (setq org-outline-path-cache nil) @@ -337,9 +339,10 @@ converted to a headline before refiling." #'identity (append (pcase org-refile-use-outline-path - (`file (list (file-name-nondirectory -(buffer-file-name - (buffer-base-buffer) + (`file (list + (and (buffer-file-name (buffer-base-buffer)) +(file-name-nondirectory + (buffer-file-name (buffer-base-buffer)) (`full-file-path (list (buffer-file-name (buffer-base-buffer diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el index 5b7dc51
[elpa] externals-release/org d37e8a1: lisp/org.el: Fix indenting of planning line
branch: externals-release/org commit d37e8a14b740158297580ad93d50db62f7eaa738 Author: Bastien Commit: Bastien lisp/org.el: Fix indenting of planning line * lisp/org.el (org-indent-line): Fix indenting of planning line. --- lisp/org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b55189d..f977c53 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19000,13 +19000,13 @@ Also align node properties according to `org-property-format'." (interactive) (unless (or (org-at-heading-p) (and (eq org-adapt-indentation 'headline-data) - (not (org-at-clock-log-p)) + (not (or (org-at-clock-log-p) +(org-at-planning-p))) (save-excursion (beginning-of-line 1) (skip-chars-backward "\n") (or (org-at-heading-p) - (looking-back ":END:.*" (point-at-bol)) - (org-at-planning-p) + (looking-back ":END:.*" (point-at-bol)) (let* ((element (save-excursion (beginning-of-line) (org-element-at-point))) (type (org-element-type element))) (cond ((and (memq type '(plain-list item))
[elpa] externals/org updated (e2cf436 -> b923a23)
elpasync pushed a change to branch externals/org. from e2cf436 Merge branch 'maint' new d37e8a1 lisp/org.el: Fix indenting of planning line new b923a23 Merge branch 'maint' Summary of changes: lisp/org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
[elpa] externals/org b923a23: Merge branch 'maint'
branch: externals/org commit b923a23221795bf0b8f218170f96b5394bc70ce7 Merge: e2cf436 d37e8a1 Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 8463c33..350d047 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19081,13 +19081,13 @@ Also align node properties according to `org-property-format'." (interactive) (unless (or (org-at-heading-p) (and (eq org-adapt-indentation 'headline-data) - (not (org-at-clock-log-p)) + (not (or (org-at-clock-log-p) +(org-at-planning-p))) (save-excursion (beginning-of-line 1) (skip-chars-backward "\n") (or (org-at-heading-p) - (looking-back ":END:.*" (point-at-bol)) - (org-at-planning-p) + (looking-back ":END:.*" (point-at-bol)) (let* ((element (save-excursion (beginning-of-line) (org-element-at-point))) (type (org-element-type element))) (cond ((and (memq type '(plain-list item))
[elpa] externals-release/org updated (d37e8a1 -> 6ab5299)
elpasync pushed a change to branch externals-release/org. from d37e8a1 lisp/org.el: Fix indenting of planning line new 4ce7881 lisp/org.el: Don't let RET indent in source code blocks new 6ab5299 Fix test-org-element/cache "Preserve local structures when re-parenting." Summary of changes: lisp/org.el | 15 ++- testing/lisp/test-org-element.el | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-)
[elpa] externals-release/org 6ab5299 2/2: Fix test-org-element/cache "Preserve local structures when re-parenting."
branch: externals-release/org commit 6ab5299e5b2d879eb550350da6436a906bca5231 Author: Ihor Radchenko Commit: Bastien Fix test-org-element/cache "Preserve local structures when re-parenting." * testing/lisp/test-org-element.el (test-org-element/cache): Add spaces to make the "abcd" table a single table. The old version uses example org text with two tables and was passing because of another bug in org-element-cache. Testing the old version with org-element-use-cache set to nil would yield error, while it should not. --- testing/lisp/test-org-element.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index cfd8406..bc21df3 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -3770,7 +3770,7 @@ Text (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" +"#+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 |")
[elpa] externals/org 402bd49 2/3: Merge branch 'maint'
branch: externals/org commit 402bd498ab95ab91ac26932de7c1508165691ec5 Merge: dc45e84 6ab5299 Author: Bastien Commit: Bastien Merge branch 'maint' --- testing/lisp/test-org-element.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 4f10875..28e9ecd 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -3770,7 +3770,7 @@ Text (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" +"#+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 |")
[elpa] externals/org 8b0b206 3/3: lisp/org.el: Use "[BUG]" instead of "Bug:" for bug reports
branch: externals/org commit 8b0b206b52769b1be0c8aad9a05807ade3513138 Author: Bastien Commit: Bastien 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 c597219..04abb73 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 ()
[elpa] externals-release/org 4ce7881 1/2: lisp/org.el: Don't let RET indent in source code blocks
branch: externals-release/org commit 4ce78810ac96ab86b18cb71bd8a76571ac067514 Author: Bastien Commit: Bastien lisp/org.el: Don't let RET indent in source code blocks * lisp/org.el (org-return): Don't try to indent in source code blocks. Reported-by: Nathaniel W Griswold Link: https://orgmode.org/list/5DCBAF63-0E88-44AC-B892-1260F37E7E00@manicmind.earth/ --- lisp/org.el | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index f977c53..a197b5f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17816,12 +17816,13 @@ will not happen if point is in a table or on a \"dead\" object (e.g., within a comment). In these case, you need to use `org-open-at-point' directly." (interactive "i\nP\np") - (let ((context (if org-return-follows-link (org-element-context) - (org-element-at-point + (let* ((context (if org-return-follows-link (org-element-context) + (org-element-at-point))) + (element-type (org-element-type context))) (cond ;; In a table, call `org-table-next-row'. However, before first ;; column or after last one, split the table. - ((or (and (eq 'table (org-element-type context)) + ((or (and (eq 'table element-type) (not (eq 'table.el (org-element-property :type context))) (>= (point) (org-element-property :contents-begin context)) (< (point) (org-element-property :contents-end context))) @@ -17835,7 +17836,7 @@ object (e.g., within a comment). In these case, you need to use ;; `org-return-follows-link' allows it. Tolerate fuzzy ;; locations, e.g., in a comment, as `org-open-at-point'. ((and org-return-follows-link - (or (and (eq 'link (org-element-type context)) + (or (and (eq 'link element-type) ;; Ensure point is not on the white spaces after ;; the link. (let ((origin (point))) @@ -17875,6 +17876,10 @@ object (e.g., within a comment). In these case, you need to use (delete-and-extract-region (point) (line-end-position (org--newline indent arg interactive) (save-excursion (insert trailing-data + ;; FIXME: In a source block, don't try to indent as it may result + ;; in weird results due to `electric-indent-mode' being `t'. + ((eq element-type 'src-block) + (org--newline nil nil nil)) (t ;; Do not auto-fill when point is in an Org property drawer. (let ((auto-fill-function (and (not (org-at-property-p)) @@ -19021,7 +19026,7 @@ Also align node properties according to `org-property-format'." (line-beginning-position 2 nil) ((and (eq type 'src-block) - org-src-tab-acts-natively + org-src-tab-acts-natively (> (line-beginning-position) (org-element-property :post-affiliated element)) (< (line-beginning-position)
[elpa] externals/org dc45e84 1/3: Merge branch 'maint'
branch: externals/org commit dc45e84a0671a1c1ef809104db2d91dedb063104 Merge: b923a23 4ce7881 Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org.el | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 350d047..c597219 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17898,12 +17898,13 @@ will not happen if point is in a table or on a \"dead\" object (e.g., within a comment). In these case, you need to use `org-open-at-point' directly." (interactive "i\nP\np") - (let ((context (if org-return-follows-link (org-element-context) - (org-element-at-point + (let* ((context (if org-return-follows-link (org-element-context) + (org-element-at-point))) + (element-type (org-element-type context))) (cond ;; In a table, call `org-table-next-row'. However, before first ;; column or after last one, split the table. - ((or (and (eq 'table (org-element-type context)) + ((or (and (eq 'table element-type) (not (eq 'table.el (org-element-property :type context))) (>= (point) (org-element-property :contents-begin context)) (< (point) (org-element-property :contents-end context))) @@ -17917,7 +17918,7 @@ object (e.g., within a comment). In these case, you need to use ;; `org-return-follows-link' allows it. Tolerate fuzzy ;; locations, e.g., in a comment, as `org-open-at-point'. ((and org-return-follows-link - (or (and (eq 'link (org-element-type context)) + (or (and (eq 'link element-type) ;; Ensure point is not on the white spaces after ;; the link. (let ((origin (point))) @@ -17957,6 +17958,10 @@ object (e.g., within a comment). In these case, you need to use (delete-and-extract-region (point) (line-end-position (org--newline indent arg interactive) (save-excursion (insert trailing-data + ;; FIXME: In a source block, don't try to indent as it may result + ;; in weird results due to `electric-indent-mode' being `t'. + ((eq element-type 'src-block) + (org--newline nil nil nil)) (t ;; Do not auto-fill when point is in an Org property drawer. (let ((auto-fill-function (and (not (org-at-property-p)) @@ -19102,7 +19107,7 @@ Also align node properties according to `org-property-format'." (line-beginning-position 2 nil) ((and (eq type 'src-block) - org-src-tab-acts-natively + org-src-tab-acts-natively (> (line-beginning-position) (org-element-property :post-affiliated element)) (< (line-beginning-position)
[elpa] externals/org updated (b923a23 -> 8b0b206)
elpasync pushed a change to branch externals/org. from b923a23 Merge branch 'maint' new 4ce7881 lisp/org.el: Don't let RET indent in source code blocks new dc45e84 Merge branch 'maint' new 6ab5299 Fix test-org-element/cache "Preserve local structures when re-parenting." new 402bd49 Merge branch 'maint' new 8b0b206 lisp/org.el: Use "[BUG]" instead of "Bug:" for bug reports Summary of changes: lisp/org.el | 17 +++-- testing/lisp/test-org-element.el | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-)
[elpa] externals-release/org 77213ac 1/4: Fix code typo in 06c064e9
branch: externals-release/org commit 77213acb8f110af184da1cf5931d538d0b671550 Author: Bastien Commit: Bastien Fix code typo in 06c064e9 --- lisp/org-agenda.el | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b7a5d40..559d114 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7065,12 +7065,12 @@ The optional argument TYPE tells the agenda type." (substring x 0 (match-end 1)) (unless (string-empty-p org-agenda-todo-keyword-format) (format org-agenda-todo-keyword-format -(match-string 2 x)) -;; Remove `display' property as the icon could leak -;; on the white space. -(org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display))) - (substring x (match-end 3))) +(match-string 2 x))) + ;; Remove `display' property as the icon could leak + ;; on the white space. + (org-add-props " " (org-plist-delete (text-properties-at 0 x) + 'display))) + (substring x (match-end 3)) x))) (defsubst org-cmp-values (a b property)
[elpa] externals-release/org updated (6ab5299 -> 4764a2f)
elpasync pushed a change to branch externals-release/org. from 6ab5299 Fix test-org-element/cache "Preserve local structures when re-parenting." new 77213ac Fix code typo in 06c064e9 new ed5e289 Fix code typo in 06c064e9 (take 2) new d85f415 Set org-adapt-indentation explicitly in some tests new 4764a2f Set org-adapt-indentation explicitly in some tests Summary of changes: lisp/org-agenda.el | 12 ++-- testing/lisp/test-org.el | 168 +-- 2 files changed, 96 insertions(+), 84 deletions(-)
[elpa] externals-release/org ed5e289 2/4: Fix code typo in 06c064e9 (take 2)
branch: externals-release/org commit ed5e28939b42053d5ca80c009741e0ea207d9320 Author: Bastien Commit: Bastien Fix code typo in 06c064e9 (take 2) --- lisp/org-agenda.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 559d114..d057947 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7069,8 +7069,8 @@ The optional argument TYPE tells the agenda type." ;; Remove `display' property as the icon could leak ;; on the white space. (org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display))) - (substring x (match-end 3)) + 'display)) + (substring x (match-end 3))) x))) (defsubst org-cmp-values (a b property)
[elpa] externals-release/org d85f415 3/4: Set org-adapt-indentation explicitly in some tests
branch: externals-release/org commit d85f4158e2b7aaa1ac242e1615e5959343942435 Author: Kévin Le Gouguec Commit: Bastien Set org-adapt-indentation explicitly in some tests * testing/lisp/test-org.el (test-org/with-electric-indent) (test-org/without-electric-indent): Make sure `org-adapt-indentation' is consistent with expected results. --- testing/lisp/test-org.el | 42 -- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index f71118d..f79086f 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -1404,12 +1404,14 @@ (electric-indent-local-mode 1) (call-interactively 'org-return) (buffer-string - (should - (equal "* heading\n body" - (org-test-with-temp-text "* headingbody" - (electric-indent-local-mode 1) - (call-interactively 'org-return) - (buffer-string + ;; TODO: test more values of `org-adapt-indentation'. + (let ((org-adapt-indentation t)) +(should + (equal "* heading\n body" + (org-test-with-temp-text "* headingbody" + (electric-indent-local-mode 1) + (call-interactively 'org-return) + (buffer-string) ;; C-j, like `electric-newline-and-maybe-indent', should not indent. (should (equal " Para\ngraph" @@ -1423,12 +1425,14 @@ (electric-indent-local-mode 1) (call-interactively 'org-return-and-maybe-indent) (buffer-string - (should - (equal "* heading\nbody" - (org-test-with-temp-text "* headingbody" - (electric-indent-local-mode 1) - (call-interactively 'org-return-and-maybe-indent) - (buffer-string) + ;; TODO: test more values of `org-adapt-indentation'. + (let ((org-adapt-indentation t)) +(should + (equal "* heading\nbody" + (org-test-with-temp-text "* headingbody" + (electric-indent-local-mode 1) + (call-interactively 'org-return-and-maybe-indent) + (buffer-string)) (ert-deftest test-org/without-electric-indent () "Test RET and C-j specifications with `electric-indent-mode' off." @@ -1467,12 +1471,14 @@ (electric-indent-local-mode 0) (call-interactively 'org-return-and-maybe-indent) (buffer-string - (should - (equal "* heading\n body" - (org-test-with-temp-text "* headingbody" - (electric-indent-local-mode 0) - (call-interactively 'org-return-and-maybe-indent) - (buffer-string) + ;; TODO: test more values of `org-adapt-indentation'. + (let ((org-adapt-indentation t)) +(should + (equal "* heading\n body" + (org-test-with-temp-text "* headingbody" + (electric-indent-local-mode 0) + (call-interactively 'org-return-and-maybe-indent) + (buffer-string)) (ert-deftest test-org/meta-return () "Test M-RET (`org-meta-return') specifications."
[elpa] externals/org 405d82e 3/6: Merge branch 'maint'
branch: externals/org commit 405d82ed38fba3fb2eaf0e229bf0625fda2dd930 Merge: 9e127a7 77213ac Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org-agenda.el | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b45b855..ccd3c5f 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7146,12 +7146,12 @@ The optional argument TYPE tells the agenda type." (substring x 0 (match-end 1)) (unless (string-empty-p org-agenda-todo-keyword-format) (format org-agenda-todo-keyword-format -(match-string 2 x)) -;; Remove `display' property as the icon could leak -;; on the white space. -(org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display))) - (substring x (match-end 3))) +(match-string 2 x))) + ;; Remove `display' property as the icon could leak + ;; on the white space. + (org-add-props " " (org-plist-delete (text-properties-at 0 x) + 'display))) + (substring x (match-end 3)) x))) (defsubst org-cmp-values (a b property)
[elpa] externals/org b72b718 5/6: Add a test for known bug in org-element-cache
branch: externals/org commit b72b718ac6cc09990e30f398b903c9b70207ea6f Author: Ihor Radchenko Commit: Bastien 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 28e9ecd..18991b5 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)
[elpa] externals-release/org 4764a2f 4/4: Set org-adapt-indentation explicitly in some tests
branch: externals-release/org commit 4764a2fbf9619c8af06682e34e6492c48e9fb6eb Author: Kévin Le Gouguec Commit: Bastien Set org-adapt-indentation explicitly in some tests * testing/lisp/test-org.el (test-org/indent-line) (test-org/indent-region): Make sure `org-adapt-indentation' is consistent with expected results. --- testing/lisp/test-org.el | 126 +-- 1 file changed, 66 insertions(+), 60 deletions(-) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index f79086f..2383131 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -1007,22 +1007,23 @@ ;; At the first line of an element, indent like previous element's ;; first line, ignoring footnotes definitions and inline tasks, or ;; according to parent. - (should - (= 2 - (org-test-with-temp-text "A\n\n B\n\nC" - (org-indent-line) - (org-get-indentation - (should - (= 1 - (org-test-with-temp-text " A\n\n[fn:1] B\n\n\nC" - (org-indent-line) - (org-get-indentation - (should - (= 1 - (org-test-with-temp-text - " #+BEGIN_CENTER\n Contents\n#+END_CENTER" - (org-indent-line) - (org-get-indentation + (let ((org-adapt-indentation t)) +(should + (= 2 +(org-test-with-temp-text "A\n\n B\n\nC" +(org-indent-line) +(org-get-indentation +(should + (= 1 +(org-test-with-temp-text " A\n\n[fn:1] B\n\n\nC" +(org-indent-line) +(org-get-indentation +(should + (= 1 +(org-test-with-temp-text +" #+BEGIN_CENTER\n Contents\n#+END_CENTER" +(org-indent-line) +(org-get-indentation) ;; Within code part of a source block, use language major mode if ;; `org-src-tab-acts-natively' is non-nil. Otherwise, indent ;; according to line above. @@ -1066,11 +1067,12 @@ (ert-deftest test-org/indent-region () "Test `org-indent-region' specifications." ;; Indent paragraph. - (should - (equal "A\nB\nC" - (org-test-with-temp-text " A\nB\n C" - (org-indent-region (point-min) (point-max)) - (buffer-string + (let ((org-adapt-indentation t)) +(should + (equal "A\nB\nC" + (org-test-with-temp-text " A\nB\n C" +(org-indent-region (point-min) (point-max)) +(buffer-string) ;; Indent greater elements along with their contents. (should (equal "#+BEGIN_CENTER\nA\nB\n#+END_CENTER" @@ -1083,11 +1085,12 @@ (org-test-with-temp-text "#+BEGIN_VERSE\n A\n B\n#+END_VERSE" (org-indent-region (point-min) (point-max)) (buffer-string - (should - (equal "#+BEGIN_VERSE\n A\n B\n#+END_VERSE" - (org-test-with-temp-text " #+BEGIN_VERSE\n A\n B\n #+END_VERSE" - (org-indent-region (point-min) (point-max)) - (buffer-string + (let ((org-adapt-indentation t)) +(should + (equal "#+BEGIN_VERSE\n A\n B\n#+END_VERSE" + (org-test-with-temp-text " #+BEGIN_VERSE\n A\n B\n #+END_VERSE" +(org-indent-region (point-min) (point-max)) +(buffer-string) ;; Indent example blocks as a single block, unless indentation ;; should be preserved. In this case only indent the block markers. (should @@ -1095,36 +1098,38 @@ (org-test-with-temp-text "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" (org-indent-region (point-min) (point-max)) (buffer-string - (should - (equal "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" - (org-test-with-temp-text " #+BEGIN_EXAMPLE\n A\n B\n #+END_EXAMPLE" - (org-indent-region (point-min) (point-max)) - (buffer-string - (should - (equal "#+BEGIN_EXAMPLE -i\n A\n B\n#+END_EXAMPLE" - (org-test-with-temp-text - " #+BEGIN_EXAMPLE -i\n A\n B\n #+END_EXAMPLE" - (org-indent-region (point-min) (point-max)) - (buffer-string - (should - (equal "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" - (org-test-with-temp-text - " #+BEGIN_EXAMPLE\n A\n B\n #+END_EXAMPLE" - (let ((org-src-preserve-indentation t)) - (org-indent-region (point-min) (point-max))) - (buffer-string + (let ((org-adapt-indentation t)) +(should + (equal "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" + (org-test-with-temp-text " #+BEGIN_EXAMPLE\n A\n B\n #+END_EXAMPLE" +(org-indent-region (point-min) (point-max)) +(buffer-string +(should + (equal "#+BEGIN_EXAMPLE -i\n A\n B\n#+END_EXAMPLE" + (org-test-with-temp-text +" #+BEGIN_EXAMPLE -
[elpa] externals/org updated (8b0b206 -> 65de88b)
elpasync pushed a change to branch externals/org. from 8b0b206 lisp/org.el: Use "[BUG]" instead of "Bug:" for bug reports new ba27327 Use cache in org-up-heading-safe new 9e127a7 New command `org-refile-reverse' bound to C-c C-M-w new 77213ac Fix code typo in 06c064e9 new 405d82e Merge branch 'maint' new ed5e289 Fix code typo in 06c064e9 (take 2) new 937a0d8 Merge branch 'maint' new b72b718 Add a test for known bug in org-element-cache new d85f415 Set org-adapt-indentation explicitly in some tests new 4764a2f Set org-adapt-indentation explicitly in some tests new 65de88b Merge branch 'maint' Summary of changes: doc/org-manual.org | 10 +++ etc/ORG-NEWS | 10 +++ lisp/org-agenda.el | 12 +-- lisp/org-keys.el | 1 + lisp/org-refile.el | 11 +++ lisp/org.el | 30 ++- testing/lisp/test-org-element.el | 15 testing/lisp/test-org.el | 168 +-- 8 files changed, 169 insertions(+), 88 deletions(-)
[elpa] externals/org 9e127a7 2/6: New command `org-refile-reverse' bound to C-c C-M-w
branch: externals/org commit 9e127a720c624570b5916499a0e5a6f7d45fd043 Author: Adam Spiers Commit: Bastien 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-orgm...@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 ab12fa7..a4baf52 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 669a7c3..b987b7a 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 f04f87d..12d6226 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 2900be2..bffad0a 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.
[elpa] externals/org ba27327 1/6: Use cache in org-up-heading-safe
branch: externals/org commit ba273278a5da0b746ebbe39050b51613961364a8 Author: Ihor Radchenko Commit: Bastien 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 04abb73..a30dbed 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.
[elpa] externals/org 65de88b 6/6: Merge branch 'maint'
branch: externals/org commit 65de88bebfa748c26d68083e5157f3952150b75d Merge: b72b718 4764a2f Author: Bastien Commit: Bastien Merge branch 'maint' --- testing/lisp/test-org.el | 168 +-- 1 file changed, 90 insertions(+), 78 deletions(-) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 9f0ede1..95ffb0a 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -1007,22 +1007,23 @@ ;; At the first line of an element, indent like previous element's ;; first line, ignoring footnotes definitions and inline tasks, or ;; according to parent. - (should - (= 2 - (org-test-with-temp-text "A\n\n B\n\nC" - (org-indent-line) - (org-get-indentation - (should - (= 1 - (org-test-with-temp-text " A\n\n[fn:1] B\n\n\nC" - (org-indent-line) - (org-get-indentation - (should - (= 1 - (org-test-with-temp-text - " #+BEGIN_CENTER\n Contents\n#+END_CENTER" - (org-indent-line) - (org-get-indentation + (let ((org-adapt-indentation t)) +(should + (= 2 +(org-test-with-temp-text "A\n\n B\n\nC" +(org-indent-line) +(org-get-indentation +(should + (= 1 +(org-test-with-temp-text " A\n\n[fn:1] B\n\n\nC" +(org-indent-line) +(org-get-indentation +(should + (= 1 +(org-test-with-temp-text +" #+BEGIN_CENTER\n Contents\n#+END_CENTER" +(org-indent-line) +(org-get-indentation) ;; Within code part of a source block, use language major mode if ;; `org-src-tab-acts-natively' is non-nil. Otherwise, indent ;; according to line above. @@ -1066,11 +1067,12 @@ (ert-deftest test-org/indent-region () "Test `org-indent-region' specifications." ;; Indent paragraph. - (should - (equal "A\nB\nC" - (org-test-with-temp-text " A\nB\n C" - (org-indent-region (point-min) (point-max)) - (buffer-string + (let ((org-adapt-indentation t)) +(should + (equal "A\nB\nC" + (org-test-with-temp-text " A\nB\n C" +(org-indent-region (point-min) (point-max)) +(buffer-string) ;; Indent greater elements along with their contents. (should (equal "#+BEGIN_CENTER\nA\nB\n#+END_CENTER" @@ -1083,11 +1085,12 @@ (org-test-with-temp-text "#+BEGIN_VERSE\n A\n B\n#+END_VERSE" (org-indent-region (point-min) (point-max)) (buffer-string - (should - (equal "#+BEGIN_VERSE\n A\n B\n#+END_VERSE" - (org-test-with-temp-text " #+BEGIN_VERSE\n A\n B\n #+END_VERSE" - (org-indent-region (point-min) (point-max)) - (buffer-string + (let ((org-adapt-indentation t)) +(should + (equal "#+BEGIN_VERSE\n A\n B\n#+END_VERSE" + (org-test-with-temp-text " #+BEGIN_VERSE\n A\n B\n #+END_VERSE" +(org-indent-region (point-min) (point-max)) +(buffer-string) ;; Indent example blocks as a single block, unless indentation ;; should be preserved. In this case only indent the block markers. (should @@ -1095,36 +1098,38 @@ (org-test-with-temp-text "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" (org-indent-region (point-min) (point-max)) (buffer-string - (should - (equal "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" - (org-test-with-temp-text " #+BEGIN_EXAMPLE\n A\n B\n #+END_EXAMPLE" - (org-indent-region (point-min) (point-max)) - (buffer-string - (should - (equal "#+BEGIN_EXAMPLE -i\n A\n B\n#+END_EXAMPLE" - (org-test-with-temp-text - " #+BEGIN_EXAMPLE -i\n A\n B\n #+END_EXAMPLE" - (org-indent-region (point-min) (point-max)) - (buffer-string - (should - (equal "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" - (org-test-with-temp-text - " #+BEGIN_EXAMPLE\n A\n B\n #+END_EXAMPLE" - (let ((org-src-preserve-indentation t)) - (org-indent-region (point-min) (point-max))) - (buffer-string + (let ((org-adapt-indentation t)) +(should + (equal "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE" + (org-test-with-temp-text " #+BEGIN_EXAMPLE\n A\n B\n #+END_EXAMPLE" +(org-indent-region (point-min) (point-max)) +(buffer-string +(should + (equal "#+BEGIN_EXAMPLE -i\n A\n B\n#+END_EXAMPLE" + (org-test-with-temp-text +" #+BEGIN_EXAMPLE -i\n A\n B\n #+END_EXAMPLE" +(org-indent-region (point-min) (point-max)) +(buffer-string +(should + (equal "#+BEGIN_EXAMPLE\n A\n B\n#+END_EXAMPLE"
[elpa] externals/org 937a0d8 4/6: Merge branch 'maint'
branch: externals/org commit 937a0d8598ae069de9b9c87922f702f36ba66989 Merge: 405d82e ed5e289 Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org-agenda.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index ccd3c5f..4ed1969 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7150,8 +7150,8 @@ The optional argument TYPE tells the agenda type." ;; Remove `display' property as the icon could leak ;; on the white space. (org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display))) - (substring x (match-end 3)) + 'display)) + (substring x (match-end 3))) x))) (defsubst org-cmp-values (a b property)
[elpa] externals/ivy e8ac2e2 1/2: Consider character widths when inserting prompt
branch: externals/ivy commit e8ac2e23ffccb23600c5a3883805560927a54202 Author: Basil L. Contovounesios Commit: Basil L. Contovounesios Consider character widths when inserting prompt * ivy.el (ivy--insert-prompt): Use string-width instead of length when comparing prompt to window width. This avoids hscrolling the minibuffer, but does not fix imperfect line wrapping (#2869). --- ivy.el | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ivy.el b/ivy.el index 256aeaa..a8d2682 100644 --- a/ivy.el +++ b/ivy.el @@ -3108,13 +3108,13 @@ parts beyond their respective faces `ivy-confirm-face' and (save-excursion (goto-char (point-min)) (delete-region (point-min) (minibuffer-prompt-end)) - (let ((len-n (length n-str)) -(len-d (length d-str)) + (let ((wid-n (string-width n-str)) +(wid-d (string-width d-str)) (ww (window-width))) (setq n-str - (cond ((> (+ len-n len-d) ww) + (cond ((> (+ wid-n wid-d) ww) (concat n-str "\n" d-str "\n")) -((> (+ len-n len-d (length ivy-text)) ww) +((> (+ wid-n wid-d (string-width ivy-text)) ww) (concat n-str d-str "\n")) (t (concat n-str d-str) @@ -3122,6 +3122,9 @@ parts beyond their respective faces `ivy-confirm-face' and (setq n-str (concat (funcall ivy-pre-prompt-function) n-str))) (when ivy-add-newline-after-prompt (setq n-str (concat n-str "\n"))) + ;; FIXME: This does not take character widths into account! + ;; Should ideally let the display engine wrap text, otherwise + ;; use `window-text-pixel-size'. See e.g. #2869. (let ((regex (format "\\([^\n]\\{%d\\}\\)[^\n]" (window-width (while (string-match regex n-str) (setq n-str (replace-match
[elpa] externals/ivy updated (4ec25a5 -> 4db4001)
blc pushed a change to branch externals/ivy. from 4ec25a5 Merge branch 'master' into externals/ivy adds b68f91b counsel-locate: honor locate-command adds 929da00 Document use of locate-command adds 11444e8 Fix pathological swiper-isearch-backward new e8ac2e2 Consider character widths when inserting prompt new 4db4001 Merge branch 'master' into externals/ivy Summary of changes: ivy.el | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-)
[elpa] externals/ivy 4db4001 2/2: Merge branch 'master' into externals/ivy
branch: externals/ivy commit 4db400113f0bdd58220f71eca67ce71f8c314b0f Merge: 4ec25a5 e8ac2e2 Author: Basil L. Contovounesios Commit: Basil L. Contovounesios Merge branch 'master' into externals/ivy --- ivy.el | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ivy.el b/ivy.el index 256aeaa..a8d2682 100644 --- a/ivy.el +++ b/ivy.el @@ -3108,13 +3108,13 @@ parts beyond their respective faces `ivy-confirm-face' and (save-excursion (goto-char (point-min)) (delete-region (point-min) (minibuffer-prompt-end)) - (let ((len-n (length n-str)) -(len-d (length d-str)) + (let ((wid-n (string-width n-str)) +(wid-d (string-width d-str)) (ww (window-width))) (setq n-str - (cond ((> (+ len-n len-d) ww) + (cond ((> (+ wid-n wid-d) ww) (concat n-str "\n" d-str "\n")) -((> (+ len-n len-d (length ivy-text)) ww) +((> (+ wid-n wid-d (string-width ivy-text)) ww) (concat n-str d-str "\n")) (t (concat n-str d-str) @@ -3122,6 +3122,9 @@ parts beyond their respective faces `ivy-confirm-face' and (setq n-str (concat (funcall ivy-pre-prompt-function) n-str))) (when ivy-add-newline-after-prompt (setq n-str (concat n-str "\n"))) + ;; FIXME: This does not take character widths into account! + ;; Should ideally let the display engine wrap text, otherwise + ;; use `window-text-pixel-size'. See e.g. #2869. (let ((regex (format "\\([^\n]\\{%d\\}\\)[^\n]" (window-width (while (string-match regex n-str) (setq n-str (replace-match
[elpa] externals-release/org 4da4b3a: Allow moving inlinetasks using org-metaup/down
branch: externals-release/org commit 4da4b3aa668c6ce37f7769cc3b5abdcc24bb1dbf Author: Ihor Radchenko Commit: Bastien Allow moving inlinetasks using org-metaup/down * lisp/org.el (org-metaup, org-metadown): Use `org-drag-elementbackward'/`org-drag-element-forward' to move inlinetasks. --- lisp/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a197b5f..ccdd8e8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17090,7 +17090,7 @@ for more information." ((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up)) ((and (featurep 'org-inlinetask) (org-inlinetask-in-task-p)) -(user-error "Dragging inline tasks is not supported")) +(org-drag-element-backward)) ((org-at-heading-p) (call-interactively 'org-move-subtree-up)) ((org-at-item-p) (call-interactively 'org-move-item-up)) (t (org-drag-element-backward @@ -17123,7 +17123,7 @@ commands for more information." ((org-at-table-p) (call-interactively 'org-table-move-row)) ((and (featurep 'org-inlinetask) (org-inlinetask-in-task-p)) -(user-error "Dragging inline tasks is not supported")) +(org-drag-element-forward)) ((org-at-heading-p) (call-interactively 'org-move-subtree-down)) ((org-at-item-p) (call-interactively 'org-move-item-down)) (t (org-drag-element-forward
[elpa] externals/org 200f454 2/5: Merge branch 'maint'
branch: externals/org commit 200f4547149b347c835282337ff4845ed909ef63 Merge: 34fc180 4da4b3a Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a30dbed..af5b952 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17165,7 +17165,7 @@ for more information." ((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up)) ((and (featurep 'org-inlinetask) (org-inlinetask-in-task-p)) -(user-error "Dragging inline tasks is not supported")) +(org-drag-element-backward)) ((org-at-heading-p) (call-interactively 'org-move-subtree-up)) ((org-at-item-p) (call-interactively 'org-move-item-up)) (t (org-drag-element-backward @@ -17198,7 +17198,7 @@ commands for more information." ((org-at-table-p) (call-interactively 'org-table-move-row)) ((and (featurep 'org-inlinetask) (org-inlinetask-in-task-p)) -(user-error "Dragging inline tasks is not supported")) +(org-drag-element-forward)) ((org-at-heading-p) (call-interactively 'org-move-subtree-down)) ((org-at-item-p) (call-interactively 'org-move-item-down)) (t (org-drag-element-forward
[elpa] externals/org 34fc180 1/5: lisp/org-agenda.el: Use "09:00" instead of " 9:00"
branch: externals/org commit 34fc18040df33a52a52ce3414d20eceb58bf988b Author: Bastien Commit: Bastien lisp/org-agenda.el: Use "09:00" instead of " 9:00" * 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 4ed1969..95848ab 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" "")
[elpa] externals/org e0bc2b3 3/5: lisp/ox-latex.el: Allow arbitrary float environments
branch: externals/org commit e0bc2b37fb79001283f684a5ddc577bd845cf599 Author: Thomas S. Dye Commit: Bastien 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 b987b7a..ab96ec3 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -178,7 +178,7 @@ See [[msg:875z8njaol@protesilaos.com][this thread]]. See [[msg:87im57fh8j@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 c3fc83b..316bbb6 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)
[elpa] externals/org 89040fb 4/5: ox-latex.el: Support specific attributes for verse block
branch: externals/org commit 89040fbf9512713cc6fadb80d1c51e873f044cd1 Author: Juan Manuel Macías Commit: Bastien 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@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 a4baf52..765886a 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 316bbb6..b9ecf07 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 sp
[elpa] externals/org bfb3507 5/5: etc/ORG-NEWS: Various enhancements
branch: externals/org commit bfb350777dfd9bdfc7a0078dd8d5bbedae3c78fa Author: Bastien Commit: Bastien 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 ab96ec3..d9000de 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -178,7 +178,81 @@ See [[msg:875z8njaol@protesilaos.com][this thread]]. See [[msg:87im57fh8j@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
[elpa] externals/org updated (65de88b -> bfb3507)
elpasync pushed a change to branch externals/org. from 65de88b Merge branch 'maint' new 34fc180 lisp/org-agenda.el: Use "09:00" instead of " 9:00" new 4da4b3a Allow moving inlinetasks using org-metaup/down new 200f454 Merge branch 'maint' new e0bc2b3 lisp/ox-latex.el: Allow arbitrary float environments new 89040fb ox-latex.el: Support specific attributes for verse block new bfb3507 etc/ORG-NEWS: Various enhancements Summary of changes: doc/org-manual.org | 48 +++ etc/ORG-NEWS | 134 ++--- lisp/org-agenda.el | 2 +- lisp/org.el| 4 +- lisp/ox-latex.el | 74 +++-- 5 files changed, 175 insertions(+), 87 deletions(-)
[elpa] externals/hyperbole d47af74: Remove warnings for variables part1 (#85)
branch: externals/hyperbole commit d47af74999dea3e5819fde00bde07ba4f0c3bcd6 Author: Mats Lidell Commit: GitHub Remove warnings for variables part1 (#85) * Declare unknown variables to silence byte-compiler warnings --- ChangeLog | 17 + hib-debbugs.el | 1 + hibtypes.el| 2 ++ hmouse-drv.el | 4 hmouse-sh.el | 10 ++ hmouse-tag.el | 7 +++ hrmail.el | 5 + hsmail.el | 5 + kotl/kmenu.el | 5 + 9 files changed, 56 insertions(+) diff --git a/ChangeLog b/ChangeLog index 82ebb43..d47b42a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,22 @@ 2021-05-14 Mats Lidell +* hsmail.el (mail-reply-buffer): Declare variable. + +* hrmail.el (rmail-old-text): Declare variable. + +* hmouse-tag.el (br-env-spec, br-lang-prefix, buffer-tag-table) +(jedi-mode, java-class-def-name-grpn, java-class-def-regexp): Declare +variables. + +* hmouse-sh.el (br-env-spec, br-lang-prefix, company-active-map) +(java-class-def-name-grpn, java-class-def-regexp, jedi-mode): Declare +variables. + +* hmouse-drv.el (aw-dispatch-alist, aw-frame-size, aw-keys): Declare +variables. + +* hib-debbugs.el (debbugs-port): Declare variable. + * hbut.el (ebut:delimit): Use hproperty:but-face. * hui-em-but.el (hproperty:but): Remove variable only used in one place. diff --git a/hib-debbugs.el b/hib-debbugs.el index 3c82555..d3a13a7 100644 --- a/hib-debbugs.el +++ b/hib-debbugs.el @@ -88,6 +88,7 @@ (declare-function debbugs-gnu-select-report "ext:debbugs") (declare-function debbugs-gnu-show-reports "ext:debbugs") (defvar debbugs-gnu-current-query) +(defvar debbugs-port) ;;; ;;; Public implicit button types diff --git a/hibtypes.el b/hibtypes.el index 7b3e6c8..934540a 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -84,6 +84,8 @@ (declare-function markdown-reference-goto-link "ext:markdown") (declare-function markdown-wiki-link-p "ext:markdown") (declare-function markdown-footnote-text-positions "ext:markdown") +(defvar markdown-regex-link-reference) +(defvar markdown-regex-reference-definition) ;;; ;;; Public implicit button types diff --git a/hmouse-drv.el b/hmouse-drv.el index b74182c..a9f6884 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -120,6 +120,10 @@ This permits the Smart Keys to behave as paste keys.") (declare-function ace-window-display-mode "ext:ace-window") (declare-function aw-select "ext:ace-window") +(defvar aw-dispatch-alist) +(defvar aw-frame-size) +(defvar aw-keys) + ;;; ;;; Private variables ;;; diff --git a/hmouse-sh.el b/hmouse-sh.el index 442206b..81cf8bc 100644 --- a/hmouse-sh.el +++ b/hmouse-sh.el @@ -21,6 +21,16 @@ (require 'hvar) ;;; +;;; Public declarations +;;; +(defvar br-env-spec) +(defvar br-lang-prefix) +(defvar company-active-map) +(defvar java-class-def-name-grpn) +(defvar java-class-def-regexp) +(defvar jedi-mode) + +;;; ;;; Public functions ;;; diff --git a/hmouse-tag.el b/hmouse-tag.el index 76c92d2..24a5061 100644 --- a/hmouse-tag.el +++ b/hmouse-tag.el @@ -134,6 +134,13 @@ Keyword matched is grouping 1. Referent is grouping 2.") (declare-function br-edit "ext:br") (declare-function br-edit-feature "ext:br-ftr") +(defvar br-env-spec) +(defvar br-lang-prefix) +(defvar buffer-tag-table) +(defvar jedi-mode) +(defvar java-class-def-name-grpn) +(defvar java-class-def-regexp) + ;;; ;;; Public functions ;;; diff --git a/hrmail.el b/hrmail.el index d5f8c8c..b8f7ebe 100644 --- a/hrmail.el +++ b/hrmail.el @@ -32,6 +32,11 @@ ;;; ;;; +;;; Public declarations +;;; +(defvar rmail-old-text) + +;;; ;;; Public functions ;;; diff --git a/hsmail.el b/hsmail.el index bdc48dd..24c6e29 100644 --- a/hsmail.el +++ b/hsmail.el @@ -72,6 +72,11 @@ If this is nil, use indentation, as specified by `mail-indentation-spaces'.") Used by `mail-yank-original' via `mail-indent-citation'.") ;;;
[elpa] externals/org updated (bfb3507 -> 702fefe)
elpasync pushed a change to branch externals/org. from bfb3507 etc/ORG-NEWS: Various enhancements new bab1b26 lisp/org-attach-git.el: New option `org-attach-git-dir' new 307e722 org-agenda.el: Fix clocking issues regex new f4b0ce2 Merge branch 'maint' new 702fefe ox-html: Fix typography in a docstring Summary of changes: etc/ORG-NEWS | 6 ++ lisp/org-agenda.el | 2 +- lisp/org-attach-git.el | 33 - lisp/ox-html.el| 14 +++--- 4 files changed, 42 insertions(+), 13 deletions(-)
[elpa] externals/org bab1b26 1/3: lisp/org-attach-git.el: New option `org-attach-git-dir'
branch: externals/org commit bab1b26eb1da0b2d9f574a8cbc313ee00757742d Author: Juan Manuel Macías Commit: Bastien 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@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 d9000de..0baf93a 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@protesilaos.com][this thread]]. diff --git a/lisp/org-attach-git.el b/lisp/org-attach-git.el index 2091cbc..4c6bdc9 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))
[elpa] externals/org f4b0ce2 2/3: Merge branch 'maint'
branch: externals/org commit f4b0ce243c9680313617f12e1018136fa3d5db40 Merge: bab1b26 307e722 Author: Bastien Commit: Bastien Merge branch 'maint' --- 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 95848ab..bf917d3 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6059,7 +6059,7 @@ See also the user option `org-agenda-clock-consistency-checks'." '((:background "DarkRed") (:foreground "white" issue face m te ts dt ov) (goto-char (point-min)) -(while (re-search-forward " Clocked: +(-\\|\\([0-9]+:[0-9]+\\))" nil t) +(while (re-search-forward " Clocked: +(\\(?:-\\|\\([0-9]+:[0-9]+\\)\\))" nil t) (setq issue nil face def-face) (catch 'next (setq m (org-get-at-bol 'org-marker)
[elpa] externals-release/org 307e722: org-agenda.el: Fix clocking issues regex
branch: externals-release/org commit 307e722dd9947aefd3c1e03452f5913bf9d68bfe Author: mosquito-magnet <24659697+mosquito-mag...@users.noreply.github.com> Commit: Bastien org-agenda.el: Fix clocking issues regex * org-agenda.el (org-agenda-show-clocking-issues): Fix regex to prevent false-positive clocking issue detection. Regex was missing a grouping to restrict the alternative \| to the literal parentheses. TINYCHANGE --- 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 d057947..c99ee2a 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5986,7 +5986,7 @@ See also the user option `org-agenda-clock-consistency-checks'." '((:background "DarkRed") (:foreground "white" issue face m te ts dt ov) (goto-char (point-min)) -(while (re-search-forward " Clocked: +(-\\|\\([0-9]+:[0-9]+\\))" nil t) +(while (re-search-forward " Clocked: +(\\(?:-\\|\\([0-9]+:[0-9]+\\)\\))" nil t) (setq issue nil face def-face) (catch 'next (setq m (org-get-at-bol 'org-marker)
[elpa] externals/org 702fefe 3/3: ox-html: Fix typography in a docstring
branch: externals/org commit 702fefe9f60414ccbb1e4ae3810d30a610ed1da9 Author: Nicolas Goaziou Commit: Nicolas Goaziou 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 e48afe2..8f8470b 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)
[elpa] externals/hyperbole updated (d47af74 -> 1c373cf)
elpasync pushed a change to branch externals/hyperbole. from d47af74 Remove warnings for variables part1 (#85) new 06562ab Fix and use make-directory-autoloads in Emacs 27 new 5bef00b Fix hkey-ace-window-setup to use new hyperbole-mode-map new 1c373cf Remove 'interactive-only property from kotl-mode cmds to silence byte-compiler warnings Summary of changes: ChangeLog | 16 Makefile | 4 ++-- hmouse-drv.el | 2 +- hui.el| 8 +++- hycontrol.el | 3 ++- hyperbole.el | 24 +--- kotl/kotl-mode.el | 6 -- 7 files changed, 49 insertions(+), 14 deletions(-)
[elpa] externals/hyperbole 06562ab 1/3: Fix and use make-directory-autoloads in Emacs 27
branch: externals/hyperbole commit 06562abcc4e587aa9b9696b11f9e07f26d4dbe19 Author: Bob Weiner Commit: Bob Weiner Fix and use make-directory-autoloads in Emacs 27 --- Makefile | 4 ++-- hyperbole.el | 24 +--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index fd0a92b..a2f2f80 100644 --- a/Makefile +++ b/Makefile @@ -337,10 +337,10 @@ ftp: package $(pkg_dir)/hyperbole-$(HYPB_VERSION).tar.gz autoloads: hyperbole-autoloads.el kotl/kotl-autoloads.el hyperbole-autoloads.el: $(EL_COMPILE) - $(EMACS) $(BATCHFLAGS) --debug --eval "(progn (setq generated-autoload-file (expand-file-name \"hyperbole-autoloads.el\") backup-inhibited t) (update-directory-autoloads \".\"))" + $(EMACS) $(BATCHFLAGS) $(PRELOADS) --debug --eval "(progn (setq generated-autoload-file (expand-file-name \"hyperbole-autoloads.el\") backup-inhibited t) (make-directory-autoloads \".\" generated-autoload-file))" kotl/kotl-autoloads.el: $(EL_KOTL) - $(EMACS) $(BATCHFLAGS) --eval "(progn (setq generated-autoload-file (expand-file-name \"kotl/kotl-autoloads.el\") backup-inhibited t) (update-directory-autoloads \"kotl/\"))" + $(EMACS) $(BATCHFLAGS) $(PRELOADS) --eval "(progn (setq generated-autoload-file (expand-file-name \"kotl/kotl-autoloads.el\") backup-inhibited t) (make-directory-autoloads \"kotl/\" generated-autoload-file))" # Used for ftp.gnu.org tarball distributions. $(pkg_dir)/hyperbole-$(HYPB_VERSION).tar.gz: diff --git a/hyperbole.el b/hyperbole.el index b21d4ad..71bd08b 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -410,9 +410,21 @@ frame, those functions by default still return the prior frame." ;;; ;; New autoload generation function defined only in Emacs 28 -;; (unless (fboundp #'make-directory-autoloads) -;; ;; Don't use defalias on next line; causes a failure -;; (fset 'make-directory-autoloads 'update-directory-autoloads)) +(unless (fboundp #'make-directory-autoloads) + (defun make-directory-autoloads (dir output-file) +"Update autoload definitions for Lisp files in the directories DIRS. +DIR can be either a single directory or a list of +directories. (The latter usage is discouraged.) + +The autoloads will be written to OUTPUT-FILE. If any Lisp file +binds ‘generated-autoload-file’ as a file-local variable, write +its autoloads into the specified file instead. + +The function does NOT recursively descend into subdirectories of the +directory or directories specified." +;; Don't use a 'let' on this next line or it will fail. +(setq generated-autoload-file output-file) +(update-directory-autoloads dir))) ;; Koutliner autoloads in the kotl/ subdirectory are generated by 'make pkg'. ;; This next line ensures they are loaded by hyperbole-autoloads whenever @@ -674,12 +686,10 @@ This is used only when running from git source and not a package release." (al-file (expand-file-name "hyperbole-autoloads.el"))) ;; (make-local-variable 'generated-autoload-file) (with-current-buffer (find-file-noselect al-file) - (setq generated-autoload-file al-file) - (update-directory-autoloads ".")) + (make-directory-autoloads "." al-file)) (setq al-file (expand-file-name "kotl/kotl-autoloads.el")) (with-current-buffer (find-file-noselect al-file) - (setq generated-autoload-file al-file) - (update-directory-autoloads "."))) + (make-directory-autoloads "." al-file))) (unless (hyperb:autoloads-exist-p) (error (format "Hyperbole failed to generate autoload files; try running 'make src' in a shell in %s" hyperb:dir
[elpa] externals/hyperbole 5bef00b 2/3: Fix hkey-ace-window-setup to use new hyperbole-mode-map
branch: externals/hyperbole commit 5bef00be51bc05752623b1cecaeb9572ad2ee543 Author: Bob Weiner Commit: Bob Weiner Fix hkey-ace-window-setup to use new hyperbole-mode-map --- hmouse-drv.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmouse-drv.el b/hmouse-drv.el index a9f6884..05e073d 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -378,7 +378,7 @@ Then whenever point is on an item you want displayed in another window, use {M-o i } and watch the magic happen." (require 'ace-window) - (when key (global-set-key key 'ace-window)) + (when key (hkey-set-key key 'ace-window)) (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) ;; allows {i} operation to work when only 2 windows exist aw-dispatch-always t)
[elpa] externals/hyperbole 1c373cf 3/3: Remove 'interactive-only property from kotl-mode cmds to silence byte-compiler warnings
branch: externals/hyperbole commit 1c373cf5c7e60f8f0bc9f01ef6600458023d6aea Author: Bob Weiner Commit: Bob Weiner Remove 'interactive-only property from kotl-mode cmds to silence byte-compiler warnings Eliminate a few other byte-compiler warnings --- ChangeLog | 16 hui.el| 8 +++- hycontrol.el | 3 ++- kotl/kotl-mode.el | 6 -- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d47b42a..d1a0b6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2021-05-15 Bob Weiner + +* hyperbole.el (make-directory-autoloads): Fix definition for Emacs 27. + +* hmouse-drv.el (hkey-ace-window-setup): Change global key setting +to use hkey-set-key instead to set in Hyperbole's minor mode map. + +* Makefile (autoloads): Change to use make-directory-autoloads. + +* kotl/kotl-mode.el (kotl-mode-map): Remove 'interactive-only property +from kotl-mode commands that overload standard editing commands +to suppress byte-compiler warnings that these are for interactive +use only. + +* hycontrol.el (hycontrol-windows-mode): Add to :group 'hyperbole-screen. + 2021-05-14 Mats Lidell * hsmail.el (mail-reply-buffer): Declare variable. diff --git a/hui.el b/hui.el index 4cb49d0..ccac786 100644 --- a/hui.el +++ b/hui.el @@ -23,6 +23,12 @@ (eval-when-compile (require 'hactypes)) ;;; +;;; Public declarations +;;; + +(declare-function texinfo-copy-node-name "texnfo-upd") + +;;; ;;; Public variables ;;; @@ -32,7 +38,7 @@ :group 'hyperbole-buttons) (defcustom hui:ebut-prompt-for-action nil - "*Non-nil means prompt for a button-specific action when creating explicit buttons." + "*Non-nil prompts for a button-specific action on explicit button creation." :type 'boolean :group 'hyperbole-buttons) diff --git a/hycontrol.el b/hycontrol.el index 074461a..18dc3a6 100644 --- a/hycontrol.el +++ b/hycontrol.el @@ -904,7 +904,8 @@ instead of quitting HyControl." ;;;###autoload (define-global-minor-mode hycontrol-windows-mode hycontrol-local-windows-mode - (lambda () (hycontrol-local-windows-mode 1))) + (lambda () (hycontrol-local-windows-mode 1)) + :group 'hyperbole-screen) ;; These hooks run by the generated `hycontrol-windows-mode' function ;; do the global work of turning on and off the mode. diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el index a5f8db0..f9eed0a 100644 --- a/kotl/kotl-mode.el +++ b/kotl/kotl-mode.el @@ -3095,8 +3095,10 @@ Leave point at end of line now residing at START." ;; been defined and cmd is a valid function. (when (and local-cmd (fboundp cmd)) ;; Make local-cmd have the same property list as cmd, -;; e.g. so pending-delete property is the same. -(setplist local-cmd (symbol-plist cmd)) +;; e.g. so pending-delete property is the same, but delete +;; interactive-only property to suppress byte-compiler warnings. +(setplist local-cmd (copy-list (symbol-plist cmd))) +(remprop local-cmd 'interactive-only) (substitute-key-definition cmd local-cmd kotl-mode-map global-map))) '(
[elpa] externals-release/org e860fbf: lisp/org-list.el: Fix bug wrt updating statistics
branch: externals-release/org commit e860fbf22a22dcbde83c6d131c17ff0b71be6991 Author: Bastien Commit: Bastien 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+yvhcaeby3jeh...@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 39122e7..3a31ae3 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))
[elpa] externals/org 5c8e735 1/2: lisp/org-list.el: Fix bug wrt updating statistics
branch: externals/org commit 5c8e735af458add0f5066a0367b7b655470f9c2c Author: Bastien Commit: Bastien 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+yvhcaeby3jeh...@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 55eb478..d2ce129 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))
[elpa] externals/org updated (702fefe -> 747b10c)
elpasync pushed a change to branch externals/org. from 702fefe ox-html: Fix typography in a docstring new 5c8e735 lisp/org-list.el: Fix bug wrt updating statistics new 747b10c etc/ORG-NEWS: Add a news entry about ditaa.jar not being bundled Summary of changes: etc/ORG-NEWS | 8 +++- lisp/org-list.el | 7 --- 2 files changed, 11 insertions(+), 4 deletions(-)
[elpa] externals/org 747b10c 2/2: etc/ORG-NEWS: Add a news entry about ditaa.jar not being bundled
branch: externals/org commit 747b10c2e04cc876f7b51b6f2b13bfec9e2eb3cf Author: Bastien Commit: Bastien 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 0baf93a..1e96c69 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
[elpa] externals/org 1d99f5a: lisp/org.el: Minor enhancement to `org-priority'
branch: externals/org commit 1d99f5a65ae109f89cc8be5d16f4ad3304ca9a94 Author: Bastien Commit: Bastien 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 af5b952..1df6862 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
[elpa] externals/company 0331a73: Fix tooltip's 'unhide' on a visually wrapped line
branch: externals/company commit 0331a7311a4697306f5f5e4312959acb794ad8cc Author: Dmitry Gutov Commit: Dmitry Gutov Fix tooltip's 'unhide' on a visually wrapped line #1073 --- company.el | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/company.el b/company.el index 24ccbfe..1874c8f 100644 --- a/company.el +++ b/company.el @@ -3335,7 +3335,18 @@ Returns a negative number if the tooltip should be displayed above point." "`company-mode' frontend similar to a tooltip but based on overlays." (cl-case command (pre-command (company-pseudo-tooltip-hide-temporarily)) -(unhide (company-pseudo-tooltip-unhide)) +(unhide + (let ((ov company-pseudo-tooltip-overlay)) + (when (> (overlay-get ov 'company-height) 0) + ;; Sleight of hand: if the current line wraps, we adjust the + ;; start of the overlay so that the popup does not zig-zag, + ;; but don't update the popup's background. This seems just + ;; non-annoying enough to avoid the work required for the latter. + (save-excursion + (vertical-motion 1) + (unless (= (point) (overlay-start ov)) + (move-overlay ov (point) (overlay-end ov)) + (company-pseudo-tooltip-unhide)) (post-command (unless (when (overlayp company-pseudo-tooltip-overlay) (let* ((ov company-pseudo-tooltip-overlay)
[elpa] externals/hyperbole d174199 3/3: Merge branch 'master' of hyperbole
branch: externals/hyperbole commit d17419972ed73b6541d03c84838d471a954bd054 Merge: 1bf79df 3251e47 Author: Bob Weiner Commit: Bob Weiner Merge branch 'master' of hyperbole --- ChangeLog | 8 hyrolo.el | 16 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 10eabe4..74aeab7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-05-16 Mats Lidell + +* hyrolo.el (google-contacts-oauth-token, xml-node-child-string) +(xml-node-get-attribute-type, hyrolo-fgrep-logical, google-contacts) +(google-contacts-add-margin-to-text, google-contacts-build-node-list) +(google-contacts-data, google-contacts-make-buffer) +(google-contacts-margin-element): Add external dependencies. + 2021-05-15 Bob Weiner * kotl/kview.el (kcell-view:line): diff --git a/hyrolo.el b/hyrolo.el index 13ec6ac..cedff85 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -69,6 +69,22 @@ executable must be found as well (for Oauth security)." :type 'boolean :group 'hyperbole-rolo) +;;; +;;; Public declarations +;;; + +(declare-function google-contacts "ext:google-contacts") +(declare-function google-contacts-add-margin-to-text "ext:google-contacts") +(declare-function google-contacts-build-node-list "ext:google-contacts") +(declare-function google-contacts-data "ext:google-contacts") +(declare-function google-contacts-make-buffer "ext:google-contacts") +(declare-function google-contacts-margin-element "ext:google-contacts") +(declare-function google-contacts-oauth-token "ext:google-contacts") +(declare-function xml-node-child-string "ext:google-contacts") +(declare-function xml-node-get-attribute-type "ext:google-contacts") + +(declare-function hyrolo-fgrep-logical "hyrolo-logic") + (defun hyrolo-google-contacts-p () "Return non-nil if `hyrolo-google-contacts-flag' is non-nil and google-contacts package and gpg executables are available for use." (and hyrolo-google-contacts-flag
[elpa] externals/hyperbole updated (1c373cf -> d174199)
elpasync pushed a change to branch externals/hyperbole. from 1c373cf Remove 'interactive-only property from kotl-mode cmds to silence byte-compiler warnings new 1bf79df kotl-mode.el, kview.el - Simplify one clause 'if' to 'when' and '(or (not ...))' to 'unless' new 3251e47 Add external dependencies (#87) new d174199 Merge branch 'master' of hyperbole Summary of changes: ChangeLog | 14 ++ hyrolo.el | 16 ++ kotl/kotl-mode.el | 564 -- kotl/kview.el | 223 +++-- 4 files changed, 441 insertions(+), 376 deletions(-)
[elpa] externals/hyperbole 1bf79df 1/3: kotl-mode.el, kview.el - Simplify one clause 'if' to 'when' and '(or (not ...))' to 'unless'
branch: externals/hyperbole commit 1bf79df0569d9cf4723b78bca4e5cbf315e92f40 Author: Bob Weiner Commit: Bob Weiner kotl-mode.el, kview.el - Simplify one clause 'if' to 'when' and '(or (not ...))' to 'unless' Also, use cl-remprop and require cl-lib to remove interactive-only prop. Declare kotl-previous-mode to quiet byte-compiler. --- ChangeLog | 6 + kotl/kotl-mode.el | 564 -- kotl/kview.el | 223 +++-- 3 files changed, 417 insertions(+), 376 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1a0b6b..10eabe4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2021-05-15 Bob Weiner +* kotl/kview.el (kcell-view:line): + kotl/kotl-mode.el (kotl-mode): Where possible change 'if' to 'when' +and '(or (not ...))' to 'unless'. +(cl-lib): Require for cl-remprop. +(kotl-previous-mode): Declare this variable. + * hyperbole.el (make-directory-autoloads): Fix definition for Emacs 27. * hmouse-drv.el (hkey-ace-window-setup): Change global key setting diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el index f9eed0a..d6a6e29 100644 --- a/kotl/kotl-mode.el +++ b/kotl/kotl-mode.el @@ -16,7 +16,7 @@ ;;; Other required Lisp Libraries ;;; -(eval-and-compile (mapc #'require '(delsel hsettings hmail kfile kvspec kcell outline org-table kotl-orgtbl))) +(eval-and-compile (mapc #'require '(cl-lib delsel hsettings hmail kfile kvspec kcell outline org-table kotl-orgtbl))) ;;; ;;; Public variables @@ -25,6 +25,9 @@ (defvar kotl-mode-map nil "Keymap containing koutliner editing and viewing commands.") +(defvar kotl-previous-mode nil + "Default mode of koutline buffers prior to invocation of kotl-mode.") + (defcustom kotl-mode:shrink-region-flag nil "*If non-nil, Koutliner commands automatically shrink the region to within the visible bounds of a single cell before editing it. The region then falls within the first visible cell that was part of the @@ -112,8 +115,8 @@ It provides the following keys: mode-line-format (set:remove "%n" mode-line-format) outline-regexp (concat " *[0-9][0-9a-z.]*" kview:default-label-separator))) ;; - (if (fboundp 'add-to-invisibility-spec) - (add-to-invisibility-spec '(outline . t))) + (when (fboundp 'add-to-invisibility-spec) +(add-to-invisibility-spec '(outline . t))) (setq indent-line-function 'kotl-mode:indent-line indent-region-function 'kotl-mode:indent-region outline-isearch-open-invisible-function 'kotl-mode:isearch-open-invisible @@ -187,10 +190,10 @@ It provides the following keys: (let* ((example "EXAMPLE.kotl") (personal-example (expand-file-name example "~/")) (original-example (expand-file-name example (concat hyperb:dir "kotl/" -(if (file-newer-than-file-p original-example personal-example) - (if (file-exists-p personal-example) - ;; save it and use the original example file - (rename-file personal-example (expand-file-name (concat "SAVED-" example) "~/") t))) +(when (file-newer-than-file-p original-example personal-example) + (when (file-exists-p personal-example) + ;; save it and use the original example file + (rename-file personal-example (expand-file-name (concat "SAVED-" example) "~/") t))) (cond ((get-file-buffer personal-example) (switch-to-buffer (get-file-buffer personal-example))) ((file-readable-p personal-example) @@ -223,13 +226,14 @@ It provides the following keys: (defun kotl-mode:backward-kill-word (arg) "Kill up to prefix ARG words preceding point within a single cell." (interactive "*p") - (or arg (setq arg 1)) + (unless arg +(setq arg 1)) (cond ((< arg 0) -(if (kotl-mode:eocp) -(error "(kotl-mode:backward-kill-word): End of cell"))) +(when (kotl-mode:eocp) + (error "(kotl-mode:backward-kill-word): End of cell"))) ((> arg 0) -(if (kotl-mode:bocp) -(error "(kotl-mode:backward-kill-word): Beginning of cell" +(when (kotl-mode:bocp) + (error "(kotl-mode:backward-kill-word): Beginning of cell" (unless (= arg 0) (save-restriction (narrow-to-region (kcell-view:start) (kcell-view:end-contents)) @@ -254,15 +258,14 @@ the end of the text and `fill-column'." (bocp) start) (setq start (kotl-mode:to-start-of-line)) -(if (setq bocp (kotl-mode:bocp)) - (progn - ;; Add a temporary fill-prefix since this is the 1st line of the cell - ;; where label could interfere with centering. - (insert "\n\n") (insert-char ?\ indent))) +(when (setq bocp (kotl-mode:bocp)) + ;; Add a temporary fill-prefix since this is the 1st line of
[elpa] externals/hyperbole 3251e47 2/3: Add external dependencies (#87)
branch: externals/hyperbole commit 3251e47b4783e97a6f29ba15380d7b560f677a82 Author: Mats Lidell Commit: GitHub Add external dependencies (#87) --- ChangeLog | 8 hyrolo.el | 16 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index d1a0b6b..c814aae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-05-16 Mats Lidell + +* hyrolo.el (google-contacts-oauth-token, xml-node-child-string) +(xml-node-get-attribute-type, hyrolo-fgrep-logical, google-contacts) +(google-contacts-add-margin-to-text, google-contacts-build-node-list) +(google-contacts-data, google-contacts-make-buffer) +(google-contacts-margin-element): Add external dependencies. + 2021-05-15 Bob Weiner * hyperbole.el (make-directory-autoloads): Fix definition for Emacs 27. diff --git a/hyrolo.el b/hyrolo.el index 13ec6ac..cedff85 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -69,6 +69,22 @@ executable must be found as well (for Oauth security)." :type 'boolean :group 'hyperbole-rolo) +;;; +;;; Public declarations +;;; + +(declare-function google-contacts "ext:google-contacts") +(declare-function google-contacts-add-margin-to-text "ext:google-contacts") +(declare-function google-contacts-build-node-list "ext:google-contacts") +(declare-function google-contacts-data "ext:google-contacts") +(declare-function google-contacts-make-buffer "ext:google-contacts") +(declare-function google-contacts-margin-element "ext:google-contacts") +(declare-function google-contacts-oauth-token "ext:google-contacts") +(declare-function xml-node-child-string "ext:google-contacts") +(declare-function xml-node-get-attribute-type "ext:google-contacts") + +(declare-function hyrolo-fgrep-logical "hyrolo-logic") + (defun hyrolo-google-contacts-p () "Return non-nil if `hyrolo-google-contacts-flag' is non-nil and google-contacts package and gpg executables are available for use." (and hyrolo-google-contacts-flag
[elpa] externals/hyperbole 9b7e925: kotl-mode.el - Change '(when arg...)' to proper '(unless arg...)'
branch: externals/hyperbole commit 9b7e9254b727090cb7212a3c6c0c3e17d45a7872 Author: Bob Weiner Commit: Bob Weiner kotl-mode.el - Change '(when arg...)' to proper '(unless arg...)' --- ChangeLog | 5 + kotl/kotl-mode.el | 26 +- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74aeab7..f635554 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-05-15 Bob Weiner + +* kotl/kotl-mode.el: Change mistaken '(when arg...)' updates to +proper '(unless arg...)'. + 2021-05-16 Mats Lidell * hyrolo.el (google-contacts-oauth-token, xml-node-child-string) diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el index d6a6e29..f3a4a64 100644 --- a/kotl/kotl-mode.el +++ b/kotl/kotl-mode.el @@ -673,7 +673,7 @@ but it will be copied to the kill ring and then an error will be signaled." (defun kotl-mode:kill-sentence (&optional arg) "Kill up to prefix ARG (or 1) sentences following point within a single cell." (interactive "*p") - (when arg + (unless arg (setq arg 1)) (cond ((> arg 0) (when (kotl-mode:eocp) @@ -689,7 +689,7 @@ but it will be copied to the kill ring and then an error will be signaled." (defun kotl-mode:kill-word (arg) "Kill up to prefix ARG words following point within a single cell." (interactive "*p") - (when arg + (unless arg (setq arg 1)) (cond ((> arg 0) (when (kotl-mode:eocp) @@ -1293,7 +1293,7 @@ doc string for `insert-for-yank-1', which see." (if (not (eq last-command 'kotl-mode:yank)) (error "Previous command was not a yank")) (setq this-command 'kotl-mode:yank) - (when arg + (unless arg (setq arg 1)) (let ((inhibit-read-only t) (before (< (point) (mark t @@ -1347,7 +1347,7 @@ Return number of cells left to move." "Move point backward ARG (or 1) characters and return point." (interactive "p") (kotl-mode:maintain-region-highlight) - (when arg + (unless arg (setq arg 1)) (if (>= arg 0) (while (> arg 0) @@ -1392,7 +1392,7 @@ See `forward-paragraph' for more information." (error "(kotl-mode:backward-sentence): First sentence") (when (and (kotl-mode:bocp) (kcell-view:previous nil label-sep-len)) (goto-char (kcell-view:end-contents))) - (when arg + (unless arg (setq arg 1)) (save-restriction (when (= arg 1) @@ -1413,7 +1413,7 @@ See `forward-paragraph' for more information." "Move point backward ARG (or 1) words and return point." (interactive "p") (kotl-mode:maintain-region-highlight) - (when arg + (unless arg (setq arg 1)) (if (>= arg 0) (while (> arg 0) @@ -1440,7 +1440,7 @@ See `forward-paragraph' for more information." "Move point to beginning of current or ARGth - 1 prior cell and return point." (interactive "p") (kotl-mode:maintain-region-highlight) - (when arg + (unless arg (setq arg 1)) (unless (integer-or-marker-p arg) (error "(kotl-mode:beginning-of-cell): Wrong type arg, integer-or-marker, `%s'" arg)) @@ -1456,7 +1456,7 @@ See `forward-paragraph' for more information." "Move point to beginning of current or ARGth - 1 line and return point." (interactive "p") (kotl-mode:maintain-region-highlight) - (when arg + (unless arg (setq arg 1)) (unless (integer-or-marker-p arg) (error "(kotl-mode:to-start-of-line): Wrong type arg, integer-or-marker, `%s'" arg)) @@ -1519,7 +1519,7 @@ With optional ARG > 0, move to the ARGth - 1 next visible cell. With optional ARG < 0, move to the ARGth previous visible cell." (interactive "p") (kotl-mode:maintain-region-highlight) - (when arg + (unless arg (setq arg 1)) (unless (integer-or-marker-p arg) (error "(kotl-mode:end-of-cell): Wrong type arg, integer-or-marker, `%s'" arg)) @@ -1533,7 +1533,7 @@ With optional ARG < 0, move to the ARGth previous visible cell." "Move point to end of current or ARGth - 1 line and return point." (interactive "p") (kotl-mode:maintain-region-highlight) - (when arg + (unless arg (setq arg 1)) (unless (integer-or-marker-p arg) (error "(kotl-mode:to-end-of-line): Wrong type arg, integer-or-marker, `%s'" arg)) @@ -1602,7 +1602,7 @@ Return number of cells left to move." "Move point forward ARG (or 1) characters and return point." (interactive "p") (kotl-mode:maintain-region-highlight) - (when arg + (unless arg (setq arg 1)) (if (>= arg 0) (while (> arg 0) @@ -1654,7 +1654,7 @@ part of the paragraph, or the end of the buffer." (if (kotl-mode:eobp) (error "(kotl-mode:forward-sentence): Last sentence") (if (kotl-mode:eocp) (kcell-view:next nil label-sep-len)) - (when arg + (unless arg (setq arg 1)) (save-restriction (when (= arg 1) @@ -1675,7 +1675,7 @@ part of the paragraph, or the end of the buffer." "Move point forward ARG (or 1) words and return point." (int
[elpa] externals/hyperbole updated (9b7e925 -> 5871b26)
elpasync pushed a change to branch externals/hyperbole. from 9b7e925 kotl-mode.el - Change '(when arg...)' to proper '(unless arg...)' new 6f70c1e Building autoload files - remove find-file-hooks to prevent hdrs new 5871b26 Ensure kotl-autoloads.el is loaded when Hyperbole is initialized Summary of changes: ChangeLog| 8 +++- Makefile | 4 ++-- hyperbole.el | 17 +++-- 3 files changed, 24 insertions(+), 5 deletions(-)
[elpa] externals/hyperbole 6f70c1e 1/2: Building autoload files - remove find-file-hooks to prevent hdrs
branch: externals/hyperbole commit 6f70c1e9cafe464af34f110accdf2b3ade66e913 Author: Bob Weiner Commit: Bob Weiner Building autoload files - remove find-file-hooks to prevent hdrs --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a2f2f80..968b070 100644 --- a/Makefile +++ b/Makefile @@ -337,10 +337,10 @@ ftp: package $(pkg_dir)/hyperbole-$(HYPB_VERSION).tar.gz autoloads: hyperbole-autoloads.el kotl/kotl-autoloads.el hyperbole-autoloads.el: $(EL_COMPILE) - $(EMACS) $(BATCHFLAGS) $(PRELOADS) --debug --eval "(progn (setq generated-autoload-file (expand-file-name \"hyperbole-autoloads.el\") backup-inhibited t) (make-directory-autoloads \".\" generated-autoload-file))" + $(EMACS) $(BATCHFLAGS) $(PRELOADS) --debug --eval "(progn (setq generated-autoload-file (expand-file-name \"hyperbole-autoloads.el\") backup-inhibited t) (let (find-file-hooks) (make-directory-autoloads \".\" generated-autoload-file)))" kotl/kotl-autoloads.el: $(EL_KOTL) - $(EMACS) $(BATCHFLAGS) $(PRELOADS) --eval "(progn (setq generated-autoload-file (expand-file-name \"kotl/kotl-autoloads.el\") backup-inhibited t) (make-directory-autoloads \"kotl/\" generated-autoload-file))" + $(EMACS) $(BATCHFLAGS) $(PRELOADS) --eval "(progn (setq generated-autoload-file (expand-file-name \"kotl/kotl-autoloads.el\") backup-inhibited t) (let (find-file-hooks) (make-directory-autoloads \"kotl/\" generated-autoload-file)))" # Used for ftp.gnu.org tarball distributions. $(pkg_dir)/hyperbole-$(HYPB_VERSION).tar.gz:
[elpa] externals/hyperbole 5871b26 2/2: Ensure kotl-autoloads.el is loaded when Hyperbole is initialized
branch: externals/hyperbole commit 5871b26fe443bce431c9e831ebfe0aa67d61123c Author: Bob Weiner Commit: Bob Weiner Ensure kotl-autoloads.el is loaded when Hyperbole is initialized --- ChangeLog| 8 +++- hyperbole.el | 17 +++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f635554..3717a03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2021-05-15 Bob Weiner +2021-05-16 Bob Weiner + +* hyperbole.el (hyperb:maybe-load-autoloads): Add and call from hyperb:init. + +* Makefile (hyperbole-autoloads.el, kotl/kotl-autoloads.el): + hyperbole.el (hyperb:generate-autoloads): Suppress find-file-hooks +during autoload generation so no file headers are added. * kotl/kotl-mode.el: Change mistaken '(when arg...)' updates to proper '(unless arg...)'. diff --git a/hyperbole.el b/hyperbole.el index 71bd08b..a0c0f5f 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -641,9 +641,11 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden." (concat (user-login-name) (hypb:domain-name) ;; ;; When running from git source and not a release package, ensure - ;; auto-autoload.el files are already generated or generate them. + ;; *-autoloads.el files are already generated or generate them. + ;; Then ensure they are loaded. (unless noninteractive (hyperb:maybe-generate-autoloads)) + (hyperb:maybe-load-autoloads) ;; ;; Modify syntactic character pairs for use with implicit button activations. (hbut:modify-syntax) @@ -680,9 +682,10 @@ This is used only when running from git source and not a package release." (hyperb:generate-autoloads))) (defun hyperb:generate-autoloads () - "Renerate Hyperbole *-autoload.el files whether they already exist or not." + "Renerate Hyperbole *-autoloads.el files whether they already exist or not." (let* ((default-directory hyperb:dir) (backup-inhibited t) +(find-file-hooks) ;; Prevent header insertion (al-file (expand-file-name "hyperbole-autoloads.el"))) ;; (make-local-variable 'generated-autoload-file) (with-current-buffer (find-file-noselect al-file) @@ -693,6 +696,16 @@ This is used only when running from git source and not a package release." (unless (hyperb:autoloads-exist-p) (error (format "Hyperbole failed to generate autoload files; try running 'make src' in a shell in %s" hyperb:dir +(defun hyperb:maybe-load-autoloads () + "Load Hyperbole autoload files that have not already been loaded." + (let* ((default-directory hyperb:dir) +(hypb-autoloads (expand-file-name "hyperbole-autoloads.el")) +(kotl-autoloads (expand-file-name "kotl/kotl-autoloads.el"))) +(unless (featurep 'hyperbole-autoloads) + (load-file hypb-autoloads)) +(unless (featurep 'kotl-autoloads) + (load-file kotl-autoloads + ;; This call loads the rest of the Hyperbole system. (require 'hinit)
[elpa] main 8870a31: * elpa-packages (hyperbole): `kotl/kotl-autoloads.el` is not in Git any more
branch: main commit 8870a31f4058edb95564f2377aad8935377e69b8 Author: Stefan Monnier Commit: Stefan Monnier * elpa-packages (hyperbole): `kotl/kotl-autoloads.el` is not in Git any more (org-edna, realgud-jdb, realgud-trepan-ni): Fix URL. --- elpa-packages | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/elpa-packages b/elpa-packages index f131ba8..5203314 100644 --- a/elpa-packages +++ b/elpa-packages @@ -176,6 +176,7 @@ ("html5-schema" :url nil) ("hydra" :url "https://github.com/abo-abo/hydra";) ("hyperbole" :url "https://git.savannah.gnu.org/r/hyperbole.git"; + :make ("kotl/kotl-autoloads.el") :auto-sync t) ("ioccur" :url "https://github.com/thierryvolpiatto/ioccur.git";) ("iterators" :url nil) @@ -261,7 +262,7 @@ :auto-sync t) ("org-translate" :url nil) ("orgalist":url nil) - ("org-edna" :url "https://savannah.nongnu.org/projects/org-edna-el";) ;URL? + ("org-edna" :url "bzr::https://bzr.savannah.gnu.org/r/org-edna-el";) ;URL? ("osc":url nil) ("other-frame-window" :url nil) ("paced" :url "bzr::bzr://bzr.savannah.nongnu.org/paced-el/trunk") @@ -302,11 +303,11 @@ ("rcirc-menu" :url nil) ("realgud" :url "https://github.com/realgud/realgud";) ("realgud-ipdb":url "https://github.com/realgud/realgud-ipdb";) - ("realgud-jdb" :url "https://github.com/realgud/jdb";) + ("realgud-jdb" :url "https://github.com/realgud/realgud-jdb";) ("realgud-lldb":url "https://github.com/realgud/realgud-lldb";) ("realgud-node-debug" :url "https://github.com/realgud/realgud-node-debug";) ("realgud-node-inspect" :url "https://github.com/realgud/realgud-node-inspect";) - ("realgud-trepan-ni" :url "https://github.com/realgud/realgud-ni";) + ("realgud-trepan-ni" :url "https://github.com/realgud/realgud-trepan-ni";) ("rec-mode" :url "https://git.savannah.gnu.org/git/recutils/rec-mode.git"; :auto-sync t) ("register-list" :url nil)
[elpa] externals-release/org 589962b: lisp/org.el: Fix bug in `org-sort-remove-invisible'
branch: externals-release/org commit 589962b7308daf1367453101042f2991afc1645e Author: Nicolas Goaziou Commit: Bastien 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@posteo.net/ --- lisp/org.el | 39 +++ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ccdd8e8..d732b48 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.
[elpa] externals/org updated (1d99f5a -> e8116de)
elpasync pushed a change to branch externals/org. from 1d99f5a lisp/org.el: Minor enhancement to `org-priority' adds e860fbf lisp/org-list.el: Fix bug wrt updating statistics new 589962b lisp/org.el: Fix bug in `org-sort-remove-invisible' new e8116de Merge branch 'maint' Summary of changes: lisp/org.el | 39 +++ 1 file changed, 31 insertions(+), 8 deletions(-)
[elpa] externals/org e8116de: Merge branch 'maint'
branch: externals/org commit e8116dece1e44f4adac1026f099f87572cd03e6a Merge: 1d99f5a 589962b Author: Bastien Commit: Bastien Merge branch 'maint' --- lisp/org.el | 39 +++ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 1df6862..f7d30b7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8141,14 +8141,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.
[elpa] externals/org updated (e8116de -> c50c92b)
elpasync pushed a change to branch externals/org. from e8116de Merge branch 'maint' new 60fccc7 lisp/org.el: Explicit the docstrings of org-priority-highest/lowest new c50c92b lisp/ol.el: Enhance message when the link has already been stored Summary of changes: lisp/ol.el | 2 +- lisp/org.el | 30 +++--- 2 files changed, 28 insertions(+), 4 deletions(-)
[elpa] externals/org c50c92b 2/2: lisp/ol.el: Enhance message when the link has already been stored
branch: externals/org commit c50c92bc4559c1aab00393fbb1ab46ac17905874 Author: Bastien Commit: Bastien 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 9d86241..1eeb2bc 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
[elpa] externals/org 60fccc7 1/2: lisp/org.el: Explicit the docstrings of org-priority-highest/lowest
branch: externals/org commit 60fccc752e8b236818da31d2c58a8538643c5d6e Author: Bastien Commit: Bastien 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 f7d30b7..7b4512b 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")