summaryrefslogtreecommitdiff
path: root/lisp/org
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org')
-rw-r--r--lisp/org/ChangeLog.18
-rw-r--r--lisp/org/ob-core.el10
-rw-r--r--lisp/org/ob-tangle.el3
-rw-r--r--lisp/org/oc-basic.el18
-rw-r--r--lisp/org/org-element.el22
-rw-r--r--lisp/org/org-faces.el2
-rw-r--r--lisp/org/org-fold-core.el8
-rw-r--r--lisp/org/org-persist.el46
-rw-r--r--lisp/org/org-version.el2
-rw-r--r--lisp/org/org.el5
-rw-r--r--lisp/org/ox-html.el2
11 files changed, 84 insertions, 42 deletions
diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1
index 4f51c6a1ebb..e72526c3edc 100644
--- a/lisp/org/ChangeLog.1
+++ b/lisp/org/ChangeLog.1
@@ -10418,7 +10418,7 @@
* org.el (org-adaptive-fill-function): Remove occasional spurious
space character when auto-filling.
- * org.el (org-mode): Call external initalizers. Now both filling
+ * org.el (org-mode): Call external initializers. Now both filling
code and comments code have their own independent part in org.el.
(org-setup-filling): Rename from `org-set-autofill-regexps'.
(org-setup-comments-handling): New function.
@@ -15589,7 +15589,7 @@
* ob-python.el (org-babel-python-evaluate-session): Introduced a
new local function for sending input with a slight delay to allow
- pythong to re-draw the prompt. No longer removing newlines inside
+ python to re-draw the prompt. No longer removing newlines inside
code block bodies (was due to a defective regexp).
2011-07-28 Bastien Guerry <bzg@gnu.org>
@@ -17320,7 +17320,7 @@
* ob-lisp.el (org-babel-execute:lisp): Turn vectors into lists
before reading by elisp.
- (org-bable-lisp-vector-to-list): Stub of a vector->list function,
+ (org-babel-lisp-vector-to-list): Stub of a vector->list function,
should be replaced with a cl-vector->el-vector function.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
@@ -29935,7 +29935,7 @@
inserted at the correct position.
* org-publish.el (org-publish-project-alist)
- (org-publish-projects, org-publish-org-index): Change default anme
+ (org-publish-projects, org-publish-org-index): Change default name
for the index of file names to "sitemap.org".
* org-latex.el (org-export-latex-tables):
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index f69538f78c9..c2a3673752e 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -2464,7 +2464,11 @@ INFO may provide the values of these header arguments (in the
(cons 'unordered
(mapcar
(lambda (e)
- (list (if (stringp e) e (format "%S" e))))
+ (cond
+ ((stringp e) (list e))
+ ((listp e)
+ (mapcar (lambda (x) (format "%S" x)) e))
+ (t (list (format "%S" e)))))
(if (listp result) result
(split-string result "\n" t))))
'(:splicep nil :istart "- " :iend "\n")))
@@ -3183,8 +3187,8 @@ situations in which is it not appropriate."
(if (and (memq (string-to-char cell) '(?\( ?`))
(not (org-babel-confirm-evaluate
;; See `org-babel-get-src-block-info'.
- (list "emacs-lisp" (format "%S" cell)
- '((:eval . yes)) nil (format "%S" cell)
+ (list "emacs-lisp" cell
+ '((:eval . yes)) nil (format "%s" cell)
nil nil))))
;; Not allowed.
(user-error "Evaluation of elisp code %S aborted." cell)
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el
index bd17bda32ba..fd6b6f3b943 100644
--- a/lisp/org/ob-tangle.el
+++ b/lisp/org/ob-tangle.el
@@ -500,7 +500,8 @@ The PARAMS are the 3rd element of the info for the same src block."
(cl-letf (((symbol-function 'org-store-link-functions)
(lambda () nil)))
(org-store-link nil))))
- (bare (and (string-match org-link-bracket-re l)
+ (bare (and l
+ (string-match org-link-bracket-re l)
(match-string 1 l))))
(when bare
(if (and org-babel-tangle-use-relative-file-links
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index 3ef7a37e3b3..01e314bfdba 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -162,17 +162,17 @@ Return a hash table with citation references as keys and fields alist as values.
(puthash (cdr (assq 'id item))
(mapcar (pcase-lambda (`(,field . ,value))
(pcase field
- ('author
- ;; Author is an array of objects, each
- ;; of them designing a person. These
- ;; objects may contain multiple
- ;; properties, but for this basic
- ;; processor, we'll focus on `given' and
- ;; `family'.
+ ((or 'author 'editors)
+ ;; Author and editors are arrays of
+ ;; objects, each of them designing a
+ ;; person. These objects may contain
+ ;; multiple properties, but for this
+ ;; basic processor, we'll focus on
+ ;; `given' and `family'.
;;
;; For compatibility with BibTeX, add
- ;; "and" between authors.
- (cons 'author
+ ;; "and" between authors and editors.
+ (cons field
(mapconcat
(lambda (alist)
(concat (alist-get 'family alist)
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index 71c242ea658..ace1cc1a984 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -1365,7 +1365,16 @@ Assume point is at beginning of the inline task."
(priority (and (looking-at "\\[#.\\][ \t]*")
(progn (goto-char (match-end 0))
(aref (match-string 0) 2))))
- (title-start (point))
+ (commentedp
+ (and (let ((case-fold-search nil))
+ (looking-at org-element-comment-string))
+ (goto-char (match-end 0))
+ (when (looking-at-p "\\(?:[ \t]\\|$\\)")
+ (point))))
+ (title-start (prog1 (point)
+ (unless (or todo priority commentedp)
+ ;; Headline like "* :tag:"
+ (skip-chars-backward " \t"))))
(tags (when (re-search-forward
"[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
(line-end-position)
@@ -1375,6 +1384,7 @@ Assume point is at beginning of the inline task."
(title-end (point))
(raw-value (org-trim
(buffer-substring-no-properties title-start title-end)))
+ (archivedp (member org-element-archive-tag tags))
(task-end (save-excursion
(end-of-line)
(and (re-search-forward org-element-headline-re limit t)
@@ -1410,7 +1420,9 @@ Assume point is at beginning of the inline task."
:todo-keyword todo
:todo-type todo-type
:post-blank (1- (count-lines (or task-end begin) end))
- :post-affiliated begin)
+ :post-affiliated begin
+ :archivedp archivedp
+ :commentedp commentedp)
time-props
standard-props))))
(org-element-put-property
@@ -7260,18 +7272,18 @@ Each element indicates the latest `org-element--cache-change-tic' when
change did not contain gaps.")
;;;###autoload
-(defun org-element-cache-reset (&optional all no-persistance)
+(defun org-element-cache-reset (&optional all no-persistence)
"Reset cache in current buffer.
When optional argument ALL is non-nil, reset cache in all Org
buffers.
-When optional argument NO-PERSISTANCE is non-nil, do not try to update
+When optional argument NO-PERSISTENCE is non-nil, do not try to update
the cache persistence in the buffer."
(interactive "P")
(dolist (buffer (if all (buffer-list) (list (current-buffer))))
(org-with-base-buffer buffer
(when (and org-element-use-cache (derived-mode-p 'org-mode))
;; Only persist cache in file buffers.
- (when (and (buffer-file-name) (not no-persistance))
+ (when (and (buffer-file-name) (not no-persistence))
(when (not org-element-cache-persistent)
(org-persist-unregister 'org-element--headline-cache (current-buffer))
(org-persist-unregister 'org-element--cache (current-buffer)))
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el
index 0effa13a1d6..b3ee17ccdf6 100644
--- a/lisp/org/org-faces.el
+++ b/lisp/org/org-faces.el
@@ -517,7 +517,7 @@ content of these blocks will still be treated as Org syntax."
(defface org-agenda-structure-filter '((t (:inherit (org-warning org-agenda-structure))))
"Face used for the current type of task filter in the agenda.
It inherits from `org-agenda-structure' so it can adapt to
-it (e.g. if that is assigned a diffent font height or family)."
+it (e.g. if that is assigned a different font height or family)."
:group 'org-faces)
(defface org-agenda-date '((t (:inherit org-agenda-structure)))
diff --git a/lisp/org/org-fold-core.el b/lisp/org/org-fold-core.el
index ffa689d4fa1..c4d78496e55 100644
--- a/lisp/org/org-fold-core.el
+++ b/lisp/org/org-fold-core.el
@@ -145,7 +145,7 @@
;; All the folding specs can be specified by symbol representing their
;; name. However, this is not always convenient, especially if the
-;; same spec can be used for fold different syntaxical structures.
+;; same spec can be used for fold different syntactical structures.
;; Any folding spec can be additionally referenced by a symbol listed
;; in the spec's `:alias' folding spec property. For example, Org
;; mode's `org-fold-outline' folding spec can be referenced as any
@@ -189,9 +189,9 @@
;; all the processing related to buffer modifications.
;; The library also provides a way to unfold the text after some
-;; destructive changes breaking syntaxical structure of the buffer.
+;; destructive changes breaking syntactical structure of the buffer.
;; For example, Org mode automatically reveals folded drawers when the
-;; drawer becomes syntaxically incorrect:
+;; drawer becomes syntactically incorrect:
;; ------- before modification -------
;; :DRAWER:<begin fold>
;; Some folded text inside drawer
@@ -321,7 +321,7 @@ following symbols:
functions relying on this package might not be able to unfold the
edited text. For example, removed leading stars from a folded
headline in Org mode will break visibility cycling since Org mode
- will not be avare that the following folded text belonged to
+ will not be aware that the following folded text belonged to
headline.
- `ignore-modification-checks': Do not try to detect insertions in the
diff --git a/lisp/org/org-persist.el b/lisp/org/org-persist.el
index 6ccf357784e..60291e5187f 100644
--- a/lisp/org/org-persist.el
+++ b/lisp/org/org-persist.el
@@ -874,15 +874,21 @@ When IGNORE-RETURN is non-nil, just return t on success without calling
When ASSOCIATED is non-nil, only save the matching data."
(unless org-persist--index (org-persist--load-index))
(setq associated (org-persist--normalize-associated associated))
- (unless
+ (if
(and (equal 1 (length org-persist--index))
;; The single collection only contains a single container
;; in the container list.
(equal 1 (length (plist-get (car org-persist--index) :container)))
;; The container is an `index' container.
(eq 'index (caar (plist-get (car org-persist--index) :container)))
- ;; No `org-persist-directory' exists yet.
- (not (file-exists-p org-persist-directory)))
+ (or (not (file-exists-p org-persist-directory))
+ (org-directory-empty-p org-persist-directory)))
+ ;; Do not write anything, and clear up `org-persist-directory' to reduce
+ ;; clutter.
+ (when (and (file-exists-p org-persist-directory)
+ (org-directory-empty-p org-persist-directory))
+ (delete-directory org-persist-directory))
+ ;; Write the data.
(let (all-containers)
(dolist (collection org-persist--index)
(if associated
@@ -963,6 +969,30 @@ Also, remove containers associated with non-existing files."
(push collection new-index)))))
(setq org-persist--index (nreverse new-index))))
+(defun org-persist-clear-storage-maybe ()
+ "Clear `org-persist-directory' according to `org-persist--disable-when-emacs-Q'.
+
+When `org-persist--disable-when-emacs-Q' is non-nil and Emacs is called with -Q
+command line argument, `org-persist-directory' is created in potentially public
+system temporary directory. Remove everything upon existing Emacs in
+such scenario."
+ (when (and org-persist--disable-when-emacs-Q
+ ;; FIXME: This is relying on undocumented fact that
+ ;; Emacs sets `user-init-file' to nil when loaded with
+ ;; "-Q" argument.
+ (not user-init-file)
+ (file-exists-p org-persist-directory))
+ (delete-directory org-persist-directory 'recursive)))
+
+;; Point to temp directory when `org-persist--disable-when-emacs-Q' is set.
+(when (and org-persist--disable-when-emacs-Q
+ ;; FIXME: This is relying on undocumented fact that
+ ;; Emacs sets `user-init-file' to nil when loaded with
+ ;; "-Q" argument.
+ (not user-init-file))
+ (setq org-persist-directory
+ (make-temp-file "org-persist-" 'dir)))
+
;; Automatically write the data, but only when we have write access.
(let ((dir (directory-file-name
(file-name-as-directory org-persist-directory))))
@@ -972,20 +1002,12 @@ Also, remove containers associated with non-existing files."
(if (not (file-writable-p dir))
(message "Missing write access rights to org-persist-directory: %S"
org-persist-directory)
+ (add-hook 'kill-emacs-hook #'org-persist-clear-storage-maybe) ; Run last.
(add-hook 'kill-emacs-hook #'org-persist-write-all)
;; `org-persist-gc' should run before `org-persist-write-all'.
;; So we are adding the hook after `org-persist-write-all'.
(add-hook 'kill-emacs-hook #'org-persist-gc)))
-;; Point to temp directory when `org-persist--disable-when-emacs-Q' is set.
-(if (and org-persist--disable-when-emacs-Q
- ;; FIXME: This is relying on undocumented fact that
- ;; Emacs sets `user-init-file' to nil when loaded with
- ;; "-Q" argument.
- (not user-init-file))
- (setq org-persist-directory
- (make-temp-file "org-persist-" 'dir)))
-
(add-hook 'after-init-hook #'org-persist-load-all)
(provide 'org-persist)
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 8de0d1a4a97..a0016265f02 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
- (let ((org-git-version "release_9.6-49-g47d129"))
+ (let ((org-git-version "release_9.6-61-g63e073f"))
org-git-version))
(provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 6aa2a16219d..ab8b76b926a 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -20213,7 +20213,10 @@ interactive command with similar behavior."
(defun org-back-to-heading (&optional invisible-ok)
"Go back to beginning of heading."
(beginning-of-line)
- (or (org-at-heading-p (not invisible-ok))
+ (or (and (org-at-heading-p (not invisible-ok))
+ (not (and (featurep 'org-inlinetask)
+ (fboundp 'org-inlinetask-end-p)
+ (org-inlinetask-end-p))))
(if (org-element--cache-active-p)
(let ((heading (org-element-lineage (org-element-at-point)
'(headline inlinetask)
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index 86b10cbf785..19cdf4c5a26 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -3337,7 +3337,7 @@ INFO is a plist holding contextual information. See
((org-html-standalone-image-p destination info)
(org-export-get-ordinal
(org-element-map destination 'link #'identity info t)
- info 'link 'org-html-standalone-image-p))
+ info '(link) 'org-html-standalone-image-p))
(t (org-export-get-ordinal
destination info nil counter-predicate))))
(desc