Set a property in the current entry. Both the property and the
value can be inserted using completion.
-- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-values~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) ::
+- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-value~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) ::
#+kindex: S-RIGHT
#+kindex: S-LEFT
Unmark entry for bulk action.
-- {{{kbd(U)}}} (~org-agenda-bulk-remove-all-marks~) ::
+- {{{kbd(U)}}} (~org-agenda-bulk-unmark-all~) ::
#+kindex: U
- #+findex: org-agenda-bulk-remove-all-marks
+ #+findex: org-agenda-bulk-unmark-all
Unmark all marked entries for bulk action.
a non-~nil~ value, Org prompts in the minibuffer. To switch back to
the hierarchical menu, press {{{kbd(?)}}}.
-- {{{kbd(C-c C-e)}}} (~org-export~) ::
+- {{{kbd(C-c C-e)}}} (~org-export-dispatch~) ::
#+kindex: C-c C-e
- #+findex: org-export
+ #+findex: org-export-dispatch
Invokes the export dispatcher interface. The options show default
settings. The {{{kbd(C-u)}}} prefix argument preserves options from
The following command allows navigating to the included document:
-- {{{kbd(C-c ')}}} (~org-edit~special~) ::
+- {{{kbd(C-c ')}}} (~org-edit-special~) ::
#+kindex: C-c '
#+findex: org-edit-special
:DESCRIPTION: Invoking export.
:END:
-- {{{kbd(C-c C-e o o)}}} (~org-export-to-odt~) ::
+- {{{kbd(C-c C-e o o)}}} (~org-odt-export-to-odt~) ::
#+kindex: C-c C-e o o
- #+findex: org-export-to-odt
+ #+findex: org-odt-export-to-odt
Export as OpenDocument Text file.
#+cindex: @samp{EXPORT_FILE_NAME}, property
(let ((error-buffer (get-buffer-create " *Org-Babel Error*")) exit-code)
(with-current-buffer error-buffer (erase-buffer))
(with-temp-buffer
- (insert query)
+ (insert query "\n")
(setq exit-code
(org-babel--shell-command-on-region
command error-buffer))
(:database . sql-database)))
(mapped-name (cdr (assq name name-mapping))))
(cadr (assq mapped-name
- (cdr (assoc dbconnection sql-connection-alist))))))))
+ (cdr (assoc-string dbconnection sql-connection-alist t))))))))
(defun org-babel-execute:sql (body params)
"Execute a block of Sql code with Babel.
(if (and org-agenda-filtered-by-category
org-agenda-category-filter)
(org-agenda-filter-show-all-cat)
- (let ((cat (org-no-properties (org-get-at-eol 'org-category 1))))
+ (let ((cat (org-no-properties (org-agenda-get-category))))
(cond
((and cat strip)
(org-agenda-filter-apply
\f
;;; Emacs < 27.1 compatibility
-(unless (fboundp 'combine-change-calls)
- ;; A stub when `combine-change-calls' was not yet there.
- (defmacro combine-change-calls (_beg _end &rest body)
- (declare (debug (form form def-body)) (indent 2))
- `(progn ,@body)))
+(if (version< emacs-version "29")
+ ;; A stub when `combine-change-calls' was not yet there or had
+ ;; critical bugs (see Emacs bug#60467).
+ (defmacro org-combine-change-calls (_beg _end &rest body)
+ (declare (debug (form form def-body)) (indent 2))
+ `(progn ,@body))
+ (defalias 'org-combine-change-calls 'combine-change-calls))
(if (version< emacs-version "27.1")
(defsubst org-replace-buffer-contents (source &optional _max-secs _max-costs)
(org-element-at-point to-pos)
(cl-macrolet ((cache-root
;; Use the most optimal version of cache available.
- () `(if (memq granularity '(headline headline+inlinetask))
- (org-element--headline-cache-root)
- (org-element--cache-root)))
+ () `(org-with-base-buffer nil
+ (if (memq granularity '(headline headline+inlinetask))
+ (org-element--headline-cache-root)
+ (org-element--cache-root))))
(cache-size
;; Use the most optimal version of cache available.
- () `(if (memq granularity '(headline headline+inlinetask))
- org-element--headline-cache-size
- org-element--cache-size))
+ () `(org-with-base-buffer nil
+ (if (memq granularity '(headline headline+inlinetask))
+ org-element--headline-cache-size
+ org-element--cache-size)))
(cache-walk-restart
;; Restart tree traversal after AVL tree re-balance.
() `(when node
;; Avoid extra staff like timer cancels et al
;; and only call `org-element--cache-sync-requests' when
;; there are pending requests.
- (when org-element--cache-sync-requests
- (org-element--cache-sync (current-buffer)))
+ (org-with-base-buffer nil
+ (when org-element--cache-sync-requests
+ (org-element--cache-sync (current-buffer))))
;; Call `org-element--parse-to' directly avoiding any
;; kind of `org-element-at-point' overheads.
(if restrict-elements
tmpnext-start))
;; Check if cache does not have gaps.
(cache-gapless-p
- () `(eq org-element--cache-change-tic
- (alist-get granularity org-element--cache-gapless))))
+ () `(org-with-base-buffer nil
+ (eq org-element--cache-change-tic
+ (alist-get granularity org-element--cache-gapless)))))
;; The core algorithm is simple walk along binary tree. However,
;; instead of checking all the tree elements from first to last
;; (like in `avl-tree-mapcar'), we begin from FROM-POS skipping
;; In the process, we may alter the buffer,
;; so also keep track of the cache state.
(progn
- (setq modified-tic org-element--cache-change-tic)
+ (setq modified-tic
+ (org-with-base-buffer nil
+ org-element--cache-change-tic))
(setq cache-size (cache-size))
;; When NEXT-RE/FAIL-RE is provided, skip to
;; next regexp match after :begin of the current
;;
;; Call FUNC. FUNC may move point.
(setq org-element-cache-map-continue-from nil)
- (if org-element--cache-map-statistics
+ (if (org-with-base-buffer nil org-element--cache-map-statistics)
(progn
(setq before-time (float-time))
(push (funcall func data) result)
(when org-element-cache-map-continue-from
(goto-char org-element-cache-map-continue-from))
(when (> (point) start)
- (move-start-to-next-match nil))
+ (move-start-to-next-match nil)
+ ;; (point) inside matching element.
+ ;; Go further.
+ (when (> (point) start)
+ (setq data (element-match-at-point))
+ (if (not data)
+ (cache-walk-abort)
+ (goto-char (next-element-start))
+ (move-start-to-next-match next-element-re))))
;; Drop nil.
(unless (car result) (pop result)))
;; If FUNC did not move the point and we
start))
(setq start nil))
;; Check if the buffer has been modified.
- (unless (and (eq modified-tic org-element--cache-change-tic)
- (eq cache-size (cache-size)))
+ (unless (org-with-base-buffer nil
+ (and (eq modified-tic org-element--cache-change-tic)
+ (eq cache-size (cache-size))))
;; START may no longer be valid, update
;; it to beginning of real element.
;; Upon modification, START may lay
;; Insert un-referenced footnote definitions at the end.
;; Combine all insertions into one to create a single cache
;; update call.
- (combine-change-calls (point) (point)
+ (org-combine-change-calls (point) (point)
(pcase-dolist (`(,label . ,definition) definitions)
(unless (member label inserted)
(insert "\n" definition "\n"))))))))))
(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.1-23-gc45a05"))
+ (let ((org-git-version "release_9.6.1-31-gaf1bb1"))
org-git-version))
\f
(provide 'org-version)
(set-default-toplevel-value var value)
(when (featurep 'org)
(org-load-modules-maybe 'force)
+ ;; FIXME: We can't have all the requires at top-level due to
+ ;; circular dependencies. Yet, this function might sometimes be
+ ;; called when 'org-element is not loaded.
+ (require 'org-element)
(org-element-cache-reset 'all)))
(defcustom org-modules '(ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail ol-eww)
(interactive)
(save-excursion
(org-back-to-heading t)
- (combine-change-calls (point) (save-excursion (org-end-of-subtree t))
+ (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-with-limited-levels (org-map-tree 'org-promote))))
(org-fix-position-after-promote))
(interactive)
(save-excursion
(org-back-to-heading t)
- (combine-change-calls (point) (save-excursion (org-end-of-subtree t))
+ (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-with-limited-levels (org-map-tree 'org-demote))))
(org-fix-position-after-promote))
(setq beg (point))
;; Avoid re-parsing cache elements when i.e. level 1 heading
;; is inserted and then promoted.
- (combine-change-calls beg beg
+ (org-combine-change-calls beg beg
(when (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt))
(insert txt)
(unless (string-suffix-p "\n" txt) (insert "\n"))
(when (save-excursion
(beginning-of-line)
(looking-at org-property-re))
- (combine-change-calls (match-beginning 0) (match-end 0)
+ (org-combine-change-calls (match-beginning 0) (match-end 0)
(let ((newtext (concat (match-string 4)
(org-trim
(format org-property-format (match-string 1) (match-string 3))))))