Merge branch 'master' of code.orgmode.org:bzg/org-mode
This commit is contained in:
commit
d9ab07042a
46
lisp/org.el
46
lisp/org.el
|
@ -4138,10 +4138,12 @@ A cell is of the format
|
||||||
|
|
||||||
If SNIPPET-FLAG is non-nil, the package also needs to be included
|
If SNIPPET-FLAG is non-nil, the package also needs to be included
|
||||||
when compiling LaTeX snippets into images for inclusion into
|
when compiling LaTeX snippets into images for inclusion into
|
||||||
non-LaTeX output. COMPILERS is a list of compilers that should
|
non-LaTeX output.
|
||||||
include the package, see `org-latex-compiler'. If the document
|
|
||||||
compiler is not in the list, and the list is non-nil, the package
|
COMPILERS is a list of compilers that should include the package,
|
||||||
will not be inserted in the final document.
|
see `org-latex-compiler'. If the document compiler is not in the
|
||||||
|
list, and the list is non-nil, the package will not be inserted
|
||||||
|
in the final document.
|
||||||
|
|
||||||
A string will be inserted as-is in the header of the document."
|
A string will be inserted as-is in the header of the document."
|
||||||
:group 'org-latex
|
:group 'org-latex
|
||||||
|
@ -4175,6 +4177,11 @@ SNIPPET-FLAG, when non-nil, indicates that this package is also
|
||||||
needed when turning LaTeX snippets into images for inclusion into
|
needed when turning LaTeX snippets into images for inclusion into
|
||||||
non-LaTeX output.
|
non-LaTeX output.
|
||||||
|
|
||||||
|
COMPILERS is a list of compilers that should include the package,
|
||||||
|
see `org-latex-compiler'. If the document compiler is not in the
|
||||||
|
list, and the list is non-nil, the package will not be inserted
|
||||||
|
in the final document.
|
||||||
|
|
||||||
A string will be inserted as-is in the header of the document.
|
A string will be inserted as-is in the header of the document.
|
||||||
|
|
||||||
Make sure that you only list packages here which:
|
Make sure that you only list packages here which:
|
||||||
|
@ -7640,22 +7647,25 @@ unconditionally."
|
||||||
(member arg '((4) (16)))
|
(member arg '((4) (16)))
|
||||||
(and (not invisible-ok)
|
(and (not invisible-ok)
|
||||||
(invisible-p (max (1- (point)) (point-min)))))
|
(invisible-p (max (1- (point)) (point-min)))))
|
||||||
;; Position point at the location of insertion.
|
;; Position point at the location of insertion. Make sure we
|
||||||
(if (not level) ;before first headline
|
;; end up on a visible headline if INVISIBLE-OK is nil.
|
||||||
(org-with-limited-levels (outline-next-heading))
|
(org-with-limited-levels
|
||||||
;; Make sure we end up on a visible headline if INVISIBLE-OK
|
(if (not level) (outline-next-heading) ;before first headline
|
||||||
;; is nil.
|
(org-back-to-heading invisible-ok)
|
||||||
(org-with-limited-levels (org-back-to-heading invisible-ok))
|
(when (equal arg '(16)) (org-up-heading-safe))
|
||||||
(cond ((equal arg '(16))
|
(org-end-of-subtree)))
|
||||||
(org-up-heading-safe)
|
(unless (bolp) (insert "\n"))
|
||||||
(org-end-of-subtree t t))
|
|
||||||
(t
|
|
||||||
(org-end-of-subtree t t))))
|
|
||||||
(unless (bolp) (insert "\n")) ;ensure final newline
|
|
||||||
(unless (and blank? (org-previous-line-empty-p))
|
(unless (and blank? (org-previous-line-empty-p))
|
||||||
(org-N-empty-lines-before-current (if blank? 1 0)))
|
(org-N-empty-lines-before-current (if blank? 1 0)))
|
||||||
(insert stars " \n")
|
(insert stars " ")
|
||||||
(forward-char -1))
|
(when (eobp) (save-excursion (insert "\n")))
|
||||||
|
;; When INVISIBLE-OK is non-nil, ensure newly created headline
|
||||||
|
;; is visible.
|
||||||
|
(unless invisible-ok
|
||||||
|
(pcase (get-char-property-and-overlay (point) 'invisible)
|
||||||
|
(`(outline . ,o)
|
||||||
|
(move-overlay o (overlay-start o) (line-end-position 0)))
|
||||||
|
(_ nil))))
|
||||||
;; At a headline...
|
;; At a headline...
|
||||||
((org-at-heading-p)
|
((org-at-heading-p)
|
||||||
(cond ((bolp)
|
(cond ((bolp)
|
||||||
|
|
|
@ -1440,26 +1440,21 @@ Return the new header."
|
||||||
(defun org-latex--remove-packages (pkg-alist info)
|
(defun org-latex--remove-packages (pkg-alist info)
|
||||||
"Remove packages based on the current LaTeX compiler.
|
"Remove packages based on the current LaTeX compiler.
|
||||||
|
|
||||||
If the fourth argument of an element is set in pkg-alist, and it
|
PKG-ALIST is a list of packages, as in `org-latex-packages-alist'
|
||||||
is not a member of the LaTeX compiler of the document, the packages
|
and `org-latex-default-packages-alist'. If the fourth argument
|
||||||
is removed. See also `org-latex-compiler'.
|
of a package is neither nil nor a member of the LaTeX compiler
|
||||||
|
associated to the document, the package is removed.
|
||||||
|
|
||||||
Return modified pkg-alist."
|
Return new list of packages."
|
||||||
(let ((compiler (or (plist-get info :latex-compiler) "")))
|
(let ((compiler (or (plist-get info :latex-compiler) "")))
|
||||||
(if (member-ignore-case compiler org-latex-compilers)
|
(if (not (member-ignore-case compiler org-latex-compilers)) pkg-alist
|
||||||
(delq nil
|
(cl-remove-if-not
|
||||||
(mapcar
|
(lambda (package)
|
||||||
(lambda (pkg)
|
(pcase package
|
||||||
(unless (and
|
(`(,_ ,_ ,_ nil) t)
|
||||||
(listp pkg)
|
(`(,_ ,_ ,_ ,compilers) (member-ignore-case compiler compilers))
|
||||||
(let ((third (nth 3 pkg)))
|
(_ t)))
|
||||||
(and third
|
pkg-alist))))
|
||||||
(not (member-ignore-case
|
|
||||||
compiler
|
|
||||||
(if (listp third) third (list third)))))))
|
|
||||||
pkg))
|
|
||||||
pkg-alist))
|
|
||||||
pkg-alist)))
|
|
||||||
|
|
||||||
(defun org-latex--find-verb-separator (s)
|
(defun org-latex--find-verb-separator (s)
|
||||||
"Return a character not used in string S.
|
"Return a character not used in string S.
|
||||||
|
@ -2892,7 +2887,7 @@ contextual information."
|
||||||
(listings (plist-get info :latex-listings)))
|
(listings (plist-get info :latex-listings)))
|
||||||
(cond
|
(cond
|
||||||
;; Case 1. No source fontification.
|
;; Case 1. No source fontification.
|
||||||
((not listings)
|
((or (not lang) (not listings))
|
||||||
(let* ((caption-str (org-latex--caption/label-string src-block info))
|
(let* ((caption-str (org-latex--caption/label-string src-block info))
|
||||||
(float-env
|
(float-env
|
||||||
(cond ((string= "multicolumn" float)
|
(cond ((string= "multicolumn" float)
|
||||||
|
|
|
@ -2673,10 +2673,7 @@ The function assumes BUFFER's major mode is `org-mode'."
|
||||||
(quote ,val))
|
(quote ,val))
|
||||||
vars))))))
|
vars))))))
|
||||||
;; Whole buffer contents.
|
;; Whole buffer contents.
|
||||||
(insert
|
(insert ,(org-with-wide-buffer (buffer-string)))
|
||||||
,(org-with-wide-buffer
|
|
||||||
(buffer-substring-no-properties
|
|
||||||
(point-min) (point-max))))
|
|
||||||
;; Narrowing.
|
;; Narrowing.
|
||||||
,(if (org-region-active-p)
|
,(if (org-region-active-p)
|
||||||
`(narrow-to-region ,(region-beginning) ,(region-end))
|
`(narrow-to-region ,(region-beginning) ,(region-end))
|
||||||
|
|
Loading…
Reference in New Issue