evaluates to a string. The closure is evaluated when the source
block is being evaluated (e.g. during execution or export), with
point at the source block. It is not possible to use an
-arbitrary function symbol (e.g. 'some-func), since org uses
+arbitrary function symbol (e.g. `some-func'), since org uses
lexical binding. To achieve the same functionality, call the
function within a closure (e.g. (lambda () (some-func))).
(defun org-babel-julia-evaluate-external-process
(body result-type result-params column-names-p)
"Evaluate BODY in external julia process.
-If RESULT-TYPE equals 'output then return standard output as a
-string. If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals `output' then return standard output as a
+string. If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp."
(cl-case result-type
(value
(defun org-babel-julia-evaluate-session
(session body result-type result-params column-names-p)
"Evaluate BODY in SESSION.
-If RESULT-TYPE equals 'output then return standard output as a
-string. If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals `output' then return standard output as a
+string. If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp."
(cl-case result-type
(value
(org-babel-lua-table-or-string results)))))
(defun org-babel-lua-read-string (string)
- "Strip 's from around Lua string."
+ "Strip \\=' characters from around Lua string."
(org-unbracket-string "'" "'" string))
(provide 'ob-lua)
#+end_src
NOTE: The quotation marks around the function name,
-'source-block', are optional.
+`source-block', are optional.
NOTE: By default, string variable names are interpreted as
references to source-code blocks, to force interpretation of a
(error "Not in tangled code"))
(setq body (buffer-substring body-start end)))
;; Go to the beginning of the relative block in Org file.
- (org-link-open-from-string link)
+ ;; Explicitly allow fuzzy search even if user customized
+ ;; otherwise.
+ (let (org-link-search-must-match-exact-headline)
+ (org-link-open-from-string link))
(setq target-buffer (current-buffer))
(if (string-match "[^ \t\n\r]:\\([[:digit:]]+\\)" block-name)
(let ((n (string-to-number (match-string 1 block-name))))
(require 'seq)
(declare-function org-open-at-point "org" (&optional arg))
+(declare-function org-open-file "org" (path &optional in-emacs line search))
(declare-function org-element-interpret-data "org-element" (data))
(declare-function org-element-property "org-element" (property element))
The different possibilities will be tried in sequence, and testing stops
if one comparison returns a \"not-equal\". For example, the default
- '(time-up category-keep priority-down)
+ `(time-up category-keep priority-down)'
means: Pull out all entries having a specified time of day and sort them,
in order to make a time schedule for the current day the first thing in the
agenda listing for the day. Of the entries without a time indication, keep
If the header at `org-hd-marker' is blocked according to
`org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is
-'invisible and the header is not blocked by checkboxes, set the
+`invisible' and the header is not blocked by checkboxes, set the
text property `org-todo-blocked' to `invisible', otherwise set it
to t."
(when (get-text-property 0 'todo-state entry)
When in a restricted subtree, remove it.
The restriction will span over the entire file if TYPE is `file',
-or if type is '(4), or if the cursor is before the first headline
+or if type is \\='(4), or if the cursor is before the first headline
in the file. Otherwise, only apply the restriction to the current
subtree."
(interactive "P")
\f
;;; Emacs < 27.1 compatibility
+(if (version< emacs-version "27.1")
+ (defsubst org-replace-buffer-contents (source &optional _max-secs _max-costs)
+ (replace-buffer-contents source))
+ (defalias 'org-replace-buffer-contents #'replace-buffer-contents))
+
(unless (fboundp 'proper-list-p)
;; `proper-list-p' was added in Emacs 27.1. The function below is
;; taken from Emacs subr.el 200195e824b^.
collect (cons n (/ (length m) normaliser)))))
(defun org--plot/prime-factors (value)
- "Return the prime decomposition of VALUE, e.g. for 12, '(3 2 2)."
+ "Return the prime decomposition of VALUE, e.g. for 12, \\='(3 2 2)."
(let ((factors '(1)) (i 1))
(while (/= 1 value)
(setq i (1+ i))
(looking-at "[[:space:]]*#\\+"))
(setf params (org-plot/collect-options params))))
;; Dump table to datafile
- (if-let ((dump-func (plist-get type :data-dump)))
- (funcall dump-func table data-file num-cols params)
- (org-plot/gnuplot-to-data table data-file params))
+ (let ((dump-func (plist-get type :data-dump)))
+ (if dump-func
+ (funcall dump-func table data-file num-cols params)
+ (org-plot/gnuplot-to-data table data-file params)))
;; Check type of ind column (timestamp? text?)
(when (plist-get params :check-ind-type)
(let* ((ind (1- (plist-get params :ind)))
(insert (with-current-buffer write-back-buf (buffer-string))))
(save-restriction
(narrow-to-region beg end)
- (replace-buffer-contents write-back-buf 0.1 nil)
+ (org-replace-buffer-contents write-back-buf 0.1 nil)
(goto-char (point-max))))
(when (and expecting-bol (not (bolp))) (insert "\n")))
(kill-buffer write-back-buf)
(buffer-string))))
(save-restriction
(narrow-to-region beg end)
- (replace-buffer-contents write-back-buf 0.1 nil)
+ (org-replace-buffer-contents write-back-buf 0.1 nil)
(goto-char (point-max))))
(when (and expecting-bol (not (bolp))) (insert "\n")))))
(when write-back-buf (kill-buffer write-back-buf))
(nreverse table)))))
(defun org-table-collapse-header (table &optional separator max-header-lines)
- "Collapse the lines before 'hline into a single header.
+ "Collapse the lines before `hline' into a single header.
The given TABLE is a list of lists as returned by `org-table-to-lisp'.
The leading lines before the first `hline' symbol are considered
(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.5.4-3-g6dc785"))
+ (let ((org-git-version "release_9.5.4-17-g6e991f"))
org-git-version))
\f
(provide 'org-version)
(const :tag "Never kill a hidden subtree with C-k" error)))
(defcustom org-special-ctrl-o t
- "Non-nil means, make `C-o' insert a row in tables."
+ "Non-nil means, make `open-line' (\\[open-line]) insert a row in tables."
:group 'org-edit-structure
:type 'boolean)
%i: The LaTeX fragment to be converted.
For example, this could be used with LaTeXML as
-\"latexmlc 'literal:%i' --profile=math --preload=siunitx.sty 2>/dev/null\"."
+\"latexmlc \\='literal:%i\\=' --profile=math --preload=siunitx.sty 2>/dev/null\"."
:group 'org-latex
:package-version '(Org . "9.4")
:type '(choice
(when description
(let ((dest (if (equal type "fuzzy")
(org-export-resolve-fuzzy-link link info)
- (org-export-resolve-id-link link info))))
- (concat
- (org-ascii--fill-string
- (format "[%s] %s" anchor (org-ascii--describe-datum dest info))
- width info)
- "\n\n"))))
+ ;; Ignore broken links. On broken link,
+ ;; `org-export-resolve-id-link' will throw an
+ ;; error and we will return nil.
+ (condition-case nil
+ (org-export-resolve-id-link link info)
+ (org-link-broken nil)))))
+ (when dest
+ (concat
+ (org-ascii--fill-string
+ (format "[%s] %s" anchor (org-ascii--describe-datum dest info))
+ width info)
+ "\n\n")))))
;; Do not add a link that cannot be resolved and doesn't have
;; any description: destination is already visible in the
;; paragraph.
(defun org-html--unlabel-latex-environment (latex-frag)
"Change environment in LATEX-FRAG string to an unnumbered one.
-For instance, change an 'equation' environment to 'equation*'."
+For instance, change an `equation' environment to `equation*'."
(replace-regexp-in-string
"\\`[ \t]*\\\\begin{\\([^*]+?\\)}"
"\\1*"
;; A link refers internally to HEADLINE.
(org-element-map (plist-get info :parse-tree) 'link
(lambda (link)
- (eq headline
- (pcase (org-element-property :type link)
- ((or "custom-id" "id") (org-export-resolve-id-link link info))
- ("fuzzy" (org-export-resolve-fuzzy-link link info))
- (_ nil))))
+ (equal headline
+ ;; Ignore broken links.
+ (condition-case nil
+ (org-export-resolve-id-link link info)
+ (org-link-broken nil))))
info t))))
(defun org-md--headline-title (style level title &optional anchor tags)
latter case, optional argument BACKEND has to be set to the
back-end where the option is defined, e.g.,
- (org-publish-find-property file :subtitle 'latex)
+ (org-publish-find-property file :subtitle \\='latex)
Return value may be a string or a list, depending on the type of
PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'."
(org-element-property :archivedp data)))
(let ((transcoder (org-export-transcoder data info)))
(or (and (functionp transcoder)
- (broken-link-handler
- (funcall transcoder data nil info)))
+ (if (eq type 'link)
+ (broken-link-handler
+ (funcall transcoder data nil info))
+ (funcall transcoder data nil info)))
;; Export snippets never return a nil value so
;; that white spaces following them are never
;; ignored.