(require 'ob)
(declare-function orgtbl-to-tsv "org-table" (table params))
-(declare-function R "ext:essd-r" (&optional start-args))
+(declare-function run-ess-r "ext:ess-r-mode" (&optional start-args))
(declare-function inferior-ess-send-input "ext:ess-inf" ())
(declare-function ess-make-buffer-current "ext:ess-inf" ())
(declare-function ess-eval-buffer "ext:ess-inf" (vis))
(when (get-buffer session)
;; Session buffer exists, but with dead process
(set-buffer session))
- (require 'ess) (R)
+ (require 'ess-r-mode)
+ (set-buffer (run-ess-r))
(let ((R-proc (get-process (or ess-local-process-name
ess-current-process-name))))
(while (process-get R-proc 'callbacks)
:safe #'stringp)
(defvar org-babel-js-function-wrapper
- "require('process').stdout.write(require('util').inspect(function(){%s}()));"
+ ;; Note that newline after %s - it makes sure that closing
+ ;; parenthesis are not shadowed if the last line of the body is a
+ ;; line comment.
+ "require('process').stdout.write(require('util').inspect(function(){%s\n}()));"
"Javascript code to print value of body.")
(defun org-babel-execute:js (body params)
(let ((cite (org-with-point-at (match-beginning 0)
(org-element-citation-parser))))
(when cite
- (funcall activate cite)
+ ;; Do not alter match data as font-lock expects us to set it
+ ;; appropriately.
+ (save-match-data (funcall activate cite))
;; Move after cite object and make sure to return
;; a non-nil value.
(goto-char (org-element-property :end cite)))))))
;;; Org version verification.
-(defconst org--built-in-p nil
+(defvar org--inhibit-version-check nil
"When non-nil, assume that Org is a part of Emacs source.
For internal use only. See Emacs bug #62762.
This variable is only supposed to be changed by Emacs build scripts.")
;; `org-assert-version' calls would fail using strict
;; `org-git-version' check because the generated Org version strings
;; will not match.
- `(unless (or org--built-in-p (equal (org-release) ,(org-release)))
+ `(unless (or org--inhibit-version-check (equal (org-release) ,(org-release)))
(warn "Org version mismatch. Org loading aborted.
This warning usually appears when a built-in Org version is loaded
prior to the more recent Org version.
(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.4-2-g0f6ae7"))
+ (let ((org-git-version "release_9.6.4-9-g8eb209"))
org-git-version))
\f
(provide 'org-version)
:group 'org-export-latex
:set 'org-set-packages-alist
:get 'org-get-packages-alist
- :type '(repeat
- (choice
- (list :tag "options/package pair"
- (string :tag "options")
- (string :tag "package")
- (boolean :tag "Snippet"))
- (string :tag "A line of LaTeX"))))
+ :type
+ '(repeat
+ (choice
+ (list :tag "options/package pair"
+ (string :tag "options")
+ (string :tag "package")
+ (boolean :tag "snippet")
+ (choice
+ (const :tag "All compilers include this package" nil)
+ (repeat :tag "Only include from these compilers" string)))
+ (string :tag "A line of LaTeX"))))
(defgroup org-appearance nil
"Settings for Org mode appearance."
(dolist (link (if (stringp links) (list links) links))
(search-forward link nil links-end)
(goto-char (match-beginning 0))
- (org-open-at-point arg)))))))
+ ;; When opening file link, current buffer may be
+ ;; altered.
+ (save-current-buffer
+ (org-open-at-point arg))))))))
;; On a footnote reference or at definition's label.
((or (eq type 'footnote-reference)
(and (eq type 'footnote-definition)
"Protect special chars, then wrap TEXT in \"\\texttt{}\"."
(format "\\texttt{%s}"
(replace-regexp-in-string
- "--\\|[\\{}$%&_#~^]"
+ "--\\|<<\\|>>\\|[\\{}$%&_#~^]"
(lambda (m)
(cond ((equal m "--") "-{}-{}")
+ ((equal m "<<") "<{}<{}")
+ ((equal m ">>") ">{}>{}")
((equal m "\\") "\\textbackslash{}")
((equal m "~") "\\textasciitilde{}")
((equal m "^") "\\textasciicircum{}")