Xiha <[email protected]> writes:
> Thanks Sebastien and Eric,
>
> On Tuesday, 28 Jul 2015 at 09:24, Sebastien Vauban wrote:
> > Eric S Fraga <e.fraga <at> ucl.ac.uk> writes:
>
> [...]
>
> >> You can always use macros instead?
>
> Maybe, if I knew how. I haven't used macros before. I read this and tried
>
> #+MACRO: hi ·$1·
>
> Let’s {{{hi(test)}}} this.
>
> but unsurprisingly that gives the same export error, and moreover within Org
> does not show the 'highlight' formatting I associated with ·, but rather the
> macro formatting.
>
> Or did you mean to simply use the fact that any macro gets 'highlighted'
> within Org -- so I should use something like #+MACRO: hi $1 ?
>
> > Or the `font-lock-add-keywords' mechanism?
>
> In what way? What I read here seems more about highlighting particular words,
> not any words between particular markers...?
>
> I think the OP wanted markers that would export, not just stand out in
> the emacs buffer.
>
> Most importantly, I would like to custom-highlight text within Org, to
> make my writing easier. The highlighting nor the markers have to be in
> the exported document. But if they are there, that is icing on the
> cake.
>
> I figure - perhaps wrongly! - that it should be easiest to have custom
> marking like ·this· be highlighted within Org, yet be exported
> literally, without highlighting (i.e. '·' is treated just like any old
> character by the exporter)?
>
Emphasis is detected in the parser, so it is indeed difficult to add new
emphasis for export.
Since you don't care about the added emphasis in the exported document
(only in the org buffer), using latest org from git works OK, except
that the marker characters are copied verbatim to the output, so you'll
have some cleanup to do.
I also tried 8.2.9 and got an error, but the error is different from
what you get (backtrace attached).
Nick
Debugger entered--Lisp error: (void-variable org-quote-string)
(format "^%s\\( \\|$\\)" org-quote-string)
(string-match (format "^%s\\( \\|$\\)" org-quote-string) raw-value)
(let ((case-fold-search nil)) (string-match (format "^%s\\( \\|$\\)"
org-quote-string) raw-value))
(let* ((components (org-heading-components)) (level (nth 1 components)) (todo
(nth 2 components)) (todo-type (and todo (if (member todo org-done-keywords)
(quote done) (quote todo)))) (tags (let ((raw-tags (nth 5 components))) (and
raw-tags (org-split-string raw-tags ":")))) (raw-value (or (nth 4 components)
"")) (quotedp (let ((case-fold-search nil)) (string-match (format "^%s\\(
\\|$\\)" org-quote-string) raw-value))) (commentedp (let ((case-fold-search
nil)) (string-match (format "^%s\\( \\|$\\)" org-comment-string) raw-value)))
(archivedp (member org-archive-tag tags)) (footnote-section-p (and
org-footnote-section (string= org-footnote-section raw-value))) (standard-props
(let (plist) (mapc (function (lambda (p) (setq plist ...)))
(org-entry-properties nil (quote standard))) plist)) (time-props
(save-excursion (if (progn (forward-line) (looking-at
org-planning-or-clock-line-re)) (progn (let (... plist) (while ... ... ... ...)
plist))))) (begin (point)) (end (min (save-excursion (org-end-of-subtree t t))
limit)) (pos-after-head (progn (forward-line) (point))) (contents-begin
(save-excursion (skip-chars-forward "
\n" end) (and (/= (point) end) (line-beginning-position)))) (hidden
(org-invisible-p2)) (contents-end (and contents-begin (progn (goto-char end)
(skip-chars-backward "
\n") (forward-line) (point))))) (if (or quotedp commentedp) (progn (let
((case-fold-search nil)) (setq raw-value (replace-regexp-in-string (concat
(regexp-opt ...) "\\(?: \\|$\\)") "" raw-value))))) (if archivedp (progn (setq
tags (delete org-archive-tag tags)))) (let ((headline (list (quote headline)
(nconc (list :raw-value raw-value :begin begin :end end :pre-blank (if ... 0
...) :hiddenp hidden :contents-begin contents-begin :contents-end contents-end
:level level :priority (nth 3 components) :tags tags :todo-keyword todo
:todo-type todo-type :post-blank (count-lines ... end) :footnote-section-p
footnote-section-p :archivedp archivedp :commentedp commentedp :quotedp
quotedp) time-props standard-props)))) (let ((alt-title (org-element-property
:ALT_TITLE headline))) (if alt-title (progn (org-element-put-property headline
:alt-title (if raw-secondary-p alt-title (org-element-parse-secondary-string
alt-title ... headline)))))) (org-element-put-property headline :title (if
raw-secondary-p raw-value (org-element-parse-secondary-string raw-value
(org-element-restriction (quote headline)) headline)))))
(save-excursion (let* ((components (org-heading-components)) (level (nth 1
components)) (todo (nth 2 components)) (todo-type (and todo (if (member todo
org-done-keywords) (quote done) (quote todo)))) (tags (let ((raw-tags (nth 5
components))) (and raw-tags (org-split-string raw-tags ":")))) (raw-value (or
(nth 4 components) "")) (quotedp (let ((case-fold-search nil)) (string-match
(format "^%s\\( \\|$\\)" org-quote-string) raw-value))) (commentedp (let
((case-fold-search nil)) (string-match (format "^%s\\( \\|$\\)"
org-comment-string) raw-value))) (archivedp (member org-archive-tag tags))
(footnote-section-p (and org-footnote-section (string= org-footnote-section
raw-value))) (standard-props (let (plist) (mapc (function (lambda ... ...))
(org-entry-properties nil (quote standard))) plist)) (time-props
(save-excursion (if (progn (forward-line) (looking-at
org-planning-or-clock-line-re)) (progn (let ... ... plist))))) (begin (point))
(end (min (save-excursion (org-end-of-subtree t t)) limit)) (pos-after-head
(progn (forward-line) (point))) (contents-begin (save-excursion
(skip-chars-forward "
\n" end) (and (/= (point) end) (line-beginning-position)))) (hidden
(org-invisible-p2)) (contents-end (and contents-begin (progn (goto-char end)
(skip-chars-backward "
\n") (forward-line) (point))))) (if (or quotedp commentedp) (progn (let
((case-fold-search nil)) (setq raw-value (replace-regexp-in-string (concat ...
"\\(?: \\|$\\)") "" raw-value))))) (if archivedp (progn (setq tags (delete
org-archive-tag tags)))) (let ((headline (list (quote headline) (nconc (list
:raw-value raw-value :begin begin :end end :pre-blank ... :hiddenp hidden
:contents-begin contents-begin :contents-end contents-end :level level
:priority ... :tags tags :todo-keyword todo :todo-type todo-type :post-blank
... :footnote-section-p footnote-section-p :archivedp archivedp :commentedp
commentedp :quotedp quotedp) time-props standard-props)))) (let ((alt-title
(org-element-property :ALT_TITLE headline))) (if alt-title (progn
(org-element-put-property headline :alt-title (if raw-secondary-p alt-title
...))))) (org-element-put-property headline :title (if raw-secondary-p
raw-value (org-element-parse-secondary-string raw-value
(org-element-restriction (quote headline)) headline))))))
org-element-headline-parser(103 nil)
(cond ((eq special (quote item)) (org-element-item-parser limit structure
raw-secondary-p)) ((eq special (quote table-row)) (org-element-table-row-parser
limit)) ((eq special (quote node-property)) (org-element-node-property-parser
limit)) ((progn (defvar org-called-with-limited-levels) (defvar
org-outline-regexp) (defvar outline-regexp) (defvar org-outline-regexp-bol)
(let* ((org-called-with-limited-levels t) (org-outline-regexp
(org-get-limited-outline-regexp)) (outline-regexp org-outline-regexp)
(org-outline-regexp-bol (concat "^" org-outline-regexp))) (org-at-heading-p)))
(org-element-headline-parser limit raw-secondary-p)) ((eq special (quote
section)) (org-element-section-parser limit)) ((eq special (quote
quote-section)) (org-element-quote-section-parser limit)) ((eq special (quote
first-section)) (org-element-section-parser (or (save-excursion (progn (defvar
org-called-with-limited-levels) (defvar org-outline-regexp) (defvar
outline-regexp) (defvar org-outline-regexp-bol) (let* (... ... ... ...)
(outline-next-heading)))) limit))) ((not (bolp)) (org-element-paragraph-parser
limit (list (point)))) ((looking-at org-planning-or-clock-line-re) (if (equal
(match-string 1) org-clock-string) (org-element-clock-parser limit)
(org-element-planning-parser limit))) ((org-at-heading-p)
(org-element-inlinetask-parser limit raw-secondary-p)) (t (let ((affiliated
(org-element--collect-affiliated-keywords limit))) (cond ((and (cdr affiliated)
(>= (point) limit)) (goto-char (car affiliated)) (org-element-keyword-parser
limit nil)) ((looking-at "[
]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}\\(\\[.*?\\]\\|{.*?}\\)*[ ]*$")
(org-element-latex-environment-parser limit affiliated)) ((looking-at
org-drawer-regexp) (if (equal (match-string 1) "PROPERTIES")
(org-element-property-drawer-parser limit affiliated)
(org-element-drawer-parser limit affiliated))) ((looking-at "[ ]*:\\(
\\|$\\)") (org-element-fixed-width-parser limit affiliated)) ((looking-at "[
]*#") (goto-char (match-end 0)) (cond ((looking-at "\\(?: \\|$\\)")
(beginning-of-line) (org-element-comment-parser limit affiliated)) ((looking-at
"\\+BEGIN_\\(\\S-+\\)") (beginning-of-line) (let ... ...)) ((looking-at
"\\+CALL:") (beginning-of-line) (org-element-babel-call-parser limit
affiliated)) ((looking-at "\\+BEGIN:? ") (beginning-of-line)
(org-element-dynamic-block-parser limit affiliated)) ((looking-at "\\+\\S-+:")
(beginning-of-line) (org-element-keyword-parser limit affiliated)) (t
(beginning-of-line) (org-element-paragraph-parser limit affiliated))))
((looking-at org-footnote-definition-re)
(org-element-footnote-definition-parser limit affiliated)) ((looking-at "[
]*-\\{5,\\}[ ]*$") (org-element-horizontal-rule-parser limit affiliated))
((looking-at "%%(") (org-element-diary-sexp-parser limit affiliated))
((org-at-table-p t) (org-element-table-parser limit affiliated)) ((looking-at
(org-item-re)) (org-element-plain-list-parser limit affiliated (or structure
(org-element--list-struct limit)))) (t (org-element-paragraph-parser limit
affiliated))))))
(let ((case-fold-search t) (raw-secondary-p (and granularity (not (eq
granularity (quote object)))))) (cond ((eq special (quote item))
(org-element-item-parser limit structure raw-secondary-p)) ((eq special (quote
table-row)) (org-element-table-row-parser limit)) ((eq special (quote
node-property)) (org-element-node-property-parser limit)) ((progn (defvar
org-called-with-limited-levels) (defvar org-outline-regexp) (defvar
outline-regexp) (defvar org-outline-regexp-bol) (let*
((org-called-with-limited-levels t) (org-outline-regexp
(org-get-limited-outline-regexp)) (outline-regexp org-outline-regexp)
(org-outline-regexp-bol (concat "^" org-outline-regexp))) (org-at-heading-p)))
(org-element-headline-parser limit raw-secondary-p)) ((eq special (quote
section)) (org-element-section-parser limit)) ((eq special (quote
quote-section)) (org-element-quote-section-parser limit)) ((eq special (quote
first-section)) (org-element-section-parser (or (save-excursion (progn (defvar
org-called-with-limited-levels) (defvar org-outline-regexp) (defvar
outline-regexp) (defvar org-outline-regexp-bol) (let* ... ...))) limit))) ((not
(bolp)) (org-element-paragraph-parser limit (list (point)))) ((looking-at
org-planning-or-clock-line-re) (if (equal (match-string 1) org-clock-string)
(org-element-clock-parser limit) (org-element-planning-parser limit)))
((org-at-heading-p) (org-element-inlinetask-parser limit raw-secondary-p)) (t
(let ((affiliated (org-element--collect-affiliated-keywords limit))) (cond
((and (cdr affiliated) (>= ... limit)) (goto-char (car affiliated))
(org-element-keyword-parser limit nil)) ((looking-at "[
]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}\\(\\[.*?\\]\\|{.*?}\\)*[ ]*$")
(org-element-latex-environment-parser limit affiliated)) ((looking-at
org-drawer-regexp) (if (equal ... "PROPERTIES")
(org-element-property-drawer-parser limit affiliated)
(org-element-drawer-parser limit affiliated))) ((looking-at "[ ]*:\\(
\\|$\\)") (org-element-fixed-width-parser limit affiliated)) ((looking-at "[
]*#") (goto-char (match-end 0)) (cond (... ... ...) (... ... ...) (... ...
...) (... ... ...) (... ... ...) (t ... ...))) ((looking-at
org-footnote-definition-re) (org-element-footnote-definition-parser limit
affiliated)) ((looking-at "[ ]*-\\{5,\\}[ ]*$")
(org-element-horizontal-rule-parser limit affiliated)) ((looking-at "%%(")
(org-element-diary-sexp-parser limit affiliated)) ((org-at-table-p t)
(org-element-table-parser limit affiliated)) ((looking-at (org-item-re))
(org-element-plain-list-parser limit affiliated (or structure ...))) (t
(org-element-paragraph-parser limit affiliated)))))))
(save-excursion (let ((case-fold-search t) (raw-secondary-p (and granularity
(not (eq granularity (quote object)))))) (cond ((eq special (quote item))
(org-element-item-parser limit structure raw-secondary-p)) ((eq special (quote
table-row)) (org-element-table-row-parser limit)) ((eq special (quote
node-property)) (org-element-node-property-parser limit)) ((progn (defvar
org-called-with-limited-levels) (defvar org-outline-regexp) (defvar
outline-regexp) (defvar org-outline-regexp-bol) (let*
((org-called-with-limited-levels t) (org-outline-regexp ...) (outline-regexp
org-outline-regexp) (org-outline-regexp-bol ...)) (org-at-heading-p)))
(org-element-headline-parser limit raw-secondary-p)) ((eq special (quote
section)) (org-element-section-parser limit)) ((eq special (quote
quote-section)) (org-element-quote-section-parser limit)) ((eq special (quote
first-section)) (org-element-section-parser (or (save-excursion (progn ... ...
... ... ...)) limit))) ((not (bolp)) (org-element-paragraph-parser limit (list
(point)))) ((looking-at org-planning-or-clock-line-re) (if (equal (match-string
1) org-clock-string) (org-element-clock-parser limit)
(org-element-planning-parser limit))) ((org-at-heading-p)
(org-element-inlinetask-parser limit raw-secondary-p)) (t (let ((affiliated
(org-element--collect-affiliated-keywords limit))) (cond ((and ... ...)
(goto-char ...) (org-element-keyword-parser limit nil)) ((looking-at "[
]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}\\(\\[.*?\\]\\|{.*?}\\)*[ ]*$")
(org-element-latex-environment-parser limit affiliated)) ((looking-at
org-drawer-regexp) (if ... ... ...)) ((looking-at "[ ]*:\\( \\|$\\)")
(org-element-fixed-width-parser limit affiliated)) ((looking-at "[ ]*#")
(goto-char ...) (cond ... ... ... ... ... ...)) ((looking-at
org-footnote-definition-re) (org-element-footnote-definition-parser limit
affiliated)) ((looking-at "[ ]*-\\{5,\\}[ ]*$")
(org-element-horizontal-rule-parser limit affiliated)) ((looking-at "%%(")
(org-element-diary-sexp-parser limit affiliated)) ((org-at-table-p t)
(org-element-table-parser limit affiliated)) ((looking-at ...)
(org-element-plain-list-parser limit affiliated ...)) (t
(org-element-paragraph-parser limit affiliated))))))))
org-element--current-element(103 nil first-section nil)
(let* ((element (org-element--current-element end granularity special
structure)) (type (org-element-type element)) (cbeg (org-element-property
:contents-begin element))) (goto-char (org-element-property :end element)) (if
(and visible-only (org-invisible-p2)) (progn (goto-char (min (1+
(org-find-visible)) end)))) (cond ((not cbeg)) ((and (memq type
org-element-greater-elements) (or (memq granularity (quote (element object
nil))) (and (eq granularity (quote greater-element)) (eq type (quote section)))
(eq type (quote headline)))) (org-element--parse-elements cbeg
(org-element-property :contents-end element) (cond ((eql type (quote headline))
(if (org-element-property :quotedp element) (quote quote-section) (quote
section))) ((eql type (quote plain-list)) (quote item)) ((eql type (quote
property-drawer)) (quote node-property)) ((eql type (quote table)) (quote
table-row))) (and (memq type (quote (item plain-list))) (org-element-property
:structure element)) granularity visible-only element)) ((memq granularity
(quote (object nil))) (org-element--parse-objects cbeg (org-element-property
:contents-end element) element (org-element-restriction type))))
(org-element-adopt-elements acc element))
(while (< (point) end) (let* ((element (org-element--current-element end
granularity special structure)) (type (org-element-type element)) (cbeg
(org-element-property :contents-begin element))) (goto-char
(org-element-property :end element)) (if (and visible-only (org-invisible-p2))
(progn (goto-char (min (1+ (org-find-visible)) end)))) (cond ((not cbeg)) ((and
(memq type org-element-greater-elements) (or (memq granularity (quote ...))
(and (eq granularity ...) (eq type ...)) (eq type (quote headline))))
(org-element--parse-elements cbeg (org-element-property :contents-end element)
(cond ((eql type ...) (if ... ... ...)) ((eql type ...) (quote item)) ((eql
type ...) (quote node-property)) ((eql type ...) (quote table-row))) (and (memq
type (quote ...)) (org-element-property :structure element)) granularity
visible-only element)) ((memq granularity (quote (object nil)))
(org-element--parse-objects cbeg (org-element-property :contents-end element)
element (org-element-restriction type)))) (org-element-adopt-elements acc
element)))
(save-excursion (goto-char beg) (if (and visible-only (org-invisible-p2))
(progn (goto-char (min (1+ (org-find-visible)) end)))) (if (and (eq granularity
(quote headline)) (not (org-at-heading-p))) (progn (progn (defvar
org-called-with-limited-levels) (defvar org-outline-regexp) (defvar
outline-regexp) (defvar org-outline-regexp-bol) (let*
((org-called-with-limited-levels t) (org-outline-regexp
(org-get-limited-outline-regexp)) (outline-regexp org-outline-regexp)
(org-outline-regexp-bol (concat "^" org-outline-regexp)))
(outline-next-heading))))) (while (< (point) end) (let* ((element
(org-element--current-element end granularity special structure)) (type
(org-element-type element)) (cbeg (org-element-property :contents-begin
element))) (goto-char (org-element-property :end element)) (if (and
visible-only (org-invisible-p2)) (progn (goto-char (min (1+ ...) end)))) (cond
((not cbeg)) ((and (memq type org-element-greater-elements) (or (memq
granularity ...) (and ... ...) (eq type ...))) (org-element--parse-elements
cbeg (org-element-property :contents-end element) (cond (... ...) (... ...)
(... ...) (... ...)) (and (memq type ...) (org-element-property :structure
element)) granularity visible-only element)) ((memq granularity (quote (object
nil))) (org-element--parse-objects cbeg (org-element-property :contents-end
element) element (org-element-restriction type)))) (org-element-adopt-elements
acc element))) acc)
org-element--parse-elements(1 103 first-section nil nil nil (org-data nil))
(save-excursion (goto-char (point-min)) (org-skip-whitespace)
(org-element--parse-elements (point-at-bol) (point-max) (quote first-section)
nil granularity visible-only (list (quote org-data) nil)))
org-element-parse-buffer(nil nil)
(org-export-filter-apply-functions (plist-get info :filter-parse-tree)
(org-element-parse-buffer nil visible-only) info)
(setq tree (org-export-filter-apply-functions (plist-get info
:filter-parse-tree) (org-element-parse-buffer nil visible-only) info))
(progn (run-hook-with-args (quote org-export-before-processing-hook) (progn
nil (or (progn nil (and (vectorp backend) (>= (length backend) 8) (memq (aref
backend 0) cl-struct-org-export-backend-tags) t)) (signal (quote
wrong-type-argument) (list (quote org-export-backend) backend))) (aref backend
1))) (org-export-expand-include-keyword) (org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code)
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion
(run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or
(progn nil (and (vectorp backend) (>= ... 8) (memq ...
cl-struct-org-export-backend-tags) t)) (signal (quote wrong-type-argument)
(list (quote org-export-backend) backend))) (aref backend 1)))) (setq info
(org-export-install-filters (org-combine-plists info
(org-export-get-environment backend subtreep ext-plist)))) (if (plist-get info
:title) nil (plist-put info :title (let ((file (plist-get info :input-file)))
(if file (file-name-sans-extension (file-name-nondirectory file)) (plist-get
info :input-buffer))))) (org-macro-replace-all (list (cons "author"
(org-element-interpret-data (plist-get info :author))) (cons "date"
(org-element-interpret-data (plist-get info :date))) (cons "email" (or
(plist-get info :email) "")) (cons "title" (org-element-interpret-data
(plist-get info :title))))) (let ((backend-name (progn nil (or (progn nil (and
... ... ... t)) (signal (quote wrong-type-argument) (list ... backend))) (aref
backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter)
(while --dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result
(funcall filter info backend-name))) (if result (progn (setq info result))))
(setq --dolist-tail-- (cdr --dolist-tail--))))) (setq tree
(org-export-filter-apply-functions (plist-get info :filter-parse-tree)
(org-element-parse-buffer nil visible-only) info)) (setq info
(org-combine-plists info (org-export-collect-tree-properties tree info))) (let*
((body (org-element-normalize-string (or (org-export-data tree info) "")))
(inner-template (cdr (assq (quote inner-template) (plist-get info
:translate-alist)))) (full-body (if (not (functionp inner-template)) body
(funcall inner-template body info))) (template (cdr (assq (quote template)
(plist-get info :translate-alist))))) (org-no-properties
(org-export-filter-apply-functions (plist-get info :filter-final-output) (if
(or (not (functionp template)) body-only) full-body (funcall template full-body
info)) info))))
(save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn
(run-hook-with-args (quote org-export-before-processing-hook) (progn nil (or
(progn nil (and (vectorp backend) (>= ... 8) (memq ...
cl-struct-org-export-backend-tags) t)) (signal (quote wrong-type-argument)
(list (quote org-export-backend) backend))) (aref backend 1)))
(org-export-expand-include-keyword) (org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code)
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion
(run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or
(progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ...
backend))) (aref backend 1)))) (setq info (org-export-install-filters
(org-combine-plists info (org-export-get-environment backend subtreep
ext-plist)))) (if (plist-get info :title) nil (plist-put info :title (let
((file (plist-get info :input-file))) (if file (file-name-sans-extension
(file-name-nondirectory file)) (plist-get info :input-buffer)))))
(org-macro-replace-all (list (cons "author" (org-element-interpret-data
(plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get
info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title"
(org-element-interpret-data (plist-get info :title))))) (let ((backend-name
(progn nil (or (progn nil ...) (signal ... ...)) (aref backend 1)))) (let
((--dolist-tail-- (plist-get info :filter-options)) filter) (while
--dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result ...)) (if
result (progn ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq tree
(org-export-filter-apply-functions (plist-get info :filter-parse-tree)
(org-element-parse-buffer nil visible-only) info)) (setq info
(org-combine-plists info (org-export-collect-tree-properties tree info))) (let*
((body (org-element-normalize-string (or (org-export-data tree info) "")))
(inner-template (cdr (assq (quote inner-template) (plist-get info
:translate-alist)))) (full-body (if (not (functionp inner-template)) body
(funcall inner-template body info))) (template (cdr (assq (quote template)
(plist-get info :translate-alist))))) (org-no-properties
(org-export-filter-apply-functions (plist-get info :filter-final-output) (if
(or (not ...) body-only) full-body (funcall template full-body info)) info)))))
(unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char
(point-min)) (progn (run-hook-with-args (quote
org-export-before-processing-hook) (progn nil (or (progn nil (and ... ... ...
t)) (signal (quote wrong-type-argument) (list ... backend))) (aref backend 1)))
(org-export-expand-include-keyword) (org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code)
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion
(run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or
(progn nil ...) (signal ... ...)) (aref backend 1)))) (setq info
(org-export-install-filters (org-combine-plists info
(org-export-get-environment backend subtreep ext-plist)))) (if (plist-get info
:title) nil (plist-put info :title (let ((file ...)) (if file
(file-name-sans-extension ...) (plist-get info :input-buffer)))))
(org-macro-replace-all (list (cons "author" (org-element-interpret-data
(plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get
info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title"
(org-element-interpret-data (plist-get info :title))))) (let ((backend-name
(progn nil (or ... ...) (aref backend 1)))) (let ((--dolist-tail-- (plist-get
info :filter-options)) filter) (while --dolist-tail-- (setq filter (car
--dolist-tail--)) (let (...) (if result ...)) (setq --dolist-tail-- (cdr
--dolist-tail--))))) (setq tree (org-export-filter-apply-functions (plist-get
info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info))
(setq info (org-combine-plists info (org-export-collect-tree-properties tree
info))) (let* ((body (org-element-normalize-string (or ... "")))
(inner-template (cdr (assq ... ...))) (full-body (if (not ...) body (funcall
inner-template body info))) (template (cdr (assq ... ...)))) (org-no-properties
(org-export-filter-apply-functions (plist-get info :filter-final-output) (if
(or ... body-only) full-body (funcall template full-body info)) info))))) (and
(buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy)
(restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))
(let ((--buf-copy (org-export-copy-buffer))) (unwind-protect
(save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn
(run-hook-with-args (quote org-export-before-processing-hook) (progn nil (or
(progn nil ...) (signal ... ...)) (aref backend 1)))
(org-export-expand-include-keyword) (org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code)
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion
(run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or ...
...) (aref backend 1)))) (setq info (org-export-install-filters
(org-combine-plists info (org-export-get-environment backend subtreep
ext-plist)))) (if (plist-get info :title) nil (plist-put info :title (let (...)
(if file ... ...)))) (org-macro-replace-all (list (cons "author"
(org-element-interpret-data ...)) (cons "date" (org-element-interpret-data
...)) (cons "email" (or ... "")) (cons "title" (org-element-interpret-data
...)))) (let ((backend-name (progn nil ... ...))) (let ((--dolist-tail-- ...)
filter) (while --dolist-tail-- (setq filter ...) (let ... ...) (setq
--dolist-tail-- ...)))) (setq tree (org-export-filter-apply-functions
(plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only)
info)) (setq info (org-combine-plists info (org-export-collect-tree-properties
tree info))) (let* ((body (org-element-normalize-string ...)) (inner-template
(cdr ...)) (full-body (if ... body ...)) (template (cdr ...)))
(org-no-properties (org-export-filter-apply-functions (plist-get info
:filter-final-output) (if ... full-body ...) info))))) (and (buffer-live-p
--buf-copy) (progn (save-current-buffer (set-buffer --buf-copy)
(restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))))
(let* ((org-export-current-backend (progn nil (or (progn nil (and (vectorp
backend) (>= ... 8) (memq ... cl-struct-org-export-backend-tags) t)) (signal
(quote wrong-type-argument) (list (quote org-export-backend) backend))) (aref
backend 1))) (info (org-combine-plists (list :export-options (delq nil (list
(and subtreep ...) (and visible-only ...) (and body-only ...))))
(org-export--get-buffer-attributes))) tree) (let ((--buf-copy
(org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer
--buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote
org-export-before-processing-hook) (progn nil (or ... ...) (aref backend 1)))
(org-export-expand-include-keyword) (org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code)
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion
(run-hook-with-args (quote org-export-before-parsing-hook) (progn nil ...
...))) (setq info (org-export-install-filters (org-combine-plists info ...)))
(if (plist-get info :title) nil (plist-put info :title (let ... ...)))
(org-macro-replace-all (list (cons "author" ...) (cons "date" ...) (cons
"email" ...) (cons "title" ...))) (let ((backend-name ...)) (let (... filter)
(while --dolist-tail-- ... ... ...))) (setq tree
(org-export-filter-apply-functions (plist-get info :filter-parse-tree)
(org-element-parse-buffer nil visible-only) info)) (setq info
(org-combine-plists info (org-export-collect-tree-properties tree info))) (let*
((body ...) (inner-template ...) (full-body ...) (template ...))
(org-no-properties (org-export-filter-apply-functions ... ... info))))) (and
(buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy)
(restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))))
(save-restriction (cond ((org-region-active-p) (narrow-to-region
(region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char
(point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let*
((org-export-current-backend (progn nil (or (progn nil (and ... ... ... t))
(signal (quote wrong-type-argument) (list ... backend))) (aref backend 1)))
(info (org-combine-plists (list :export-options (delq nil (list ... ... ...)))
(org-export--get-buffer-attributes))) tree) (let ((--buf-copy
(org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer
--buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote
org-export-before-processing-hook) (progn nil ... ...))
(org-export-expand-include-keyword) (org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code)
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion
(run-hook-with-args ... ...)) (setq info (org-export-install-filters ...)) (if
(plist-get info :title) nil (plist-put info :title ...)) (org-macro-replace-all
(list ... ... ... ...)) (let (...) (let ... ...)) (setq tree
(org-export-filter-apply-functions ... ... info)) (setq info
(org-combine-plists info ...)) (let* (... ... ... ...) (org-no-properties
...)))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer
--buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))))))
(save-excursion (save-restriction (cond ((org-region-active-p)
(narrow-to-region (region-beginning) (region-end))) (subtreep
(org-narrow-to-subtree) (goto-char (point-min)) (forward-line)
(narrow-to-region (point) (point-max)))) (let* ((org-export-current-backend
(progn nil (or (progn nil ...) (signal ... ...)) (aref backend 1))) (info
(org-combine-plists (list :export-options (delq nil ...))
(org-export--get-buffer-attributes))) tree) (let ((--buf-copy
(org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer
--buf-copy) (goto-char (point-min)) (progn (run-hook-with-args ... ...)
(org-export-expand-include-keyword) (org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code)
(org-update-radio-target-regexp) (goto-char ...) (save-excursion ...) (setq
info ...) (if ... nil ...) (org-macro-replace-all ...) (let ... ...) (setq tree
...) (setq info ...) (let* ... ...))) (and (buffer-live-p --buf-copy) (progn
(save-current-buffer ... ...) (kill-buffer --buf-copy))))))))
org-export-as(latex nil nil nil (:output-file "./xiha.tex"))
(let ((output (org-export-as backend subtreep visible-only body-only
ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*")))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert
output) (let ((coding-system-for-write encoding)) (write-file file))) (and
(buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and
(org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn
(org-kill-new output))) (or (and (functionp post-process) (funcall post-process
file)) file))
(if async (let ((with-temp-message "Initializing asynchronous export
process") (current-message)) (unwind-protect (progn (if with-temp-message
(progn (setq current-message (current-message)) (message "%s"
with-temp-message))) (let ((--copy-fun (org-export--generate-copy-script ...))
(--temp-file (make-temp-file "org-export-process")) (--coding
buffer-file-coding-system)) (let ((temp-file --temp-file) (temp-buffer ...))
(unwind-protect (prog1 ... ...) (and ... ...))) (let* ((process-connection-type
nil) (--proc-buffer ...) (--process ...)) (org-export-add-to-stack (get-buffer
--proc-buffer) nil --process) (let (...) (set-process-sentinel --process
...))))) (and with-temp-message (if current-message (message "%s"
current-message) (message nil))))) (let ((output (org-export-as backend
subtreep visible-only body-only ext-plist))) (let ((temp-buffer
(generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer)
(unwind-protect (progn (insert output) (let (...) (write-file file))) (and
(buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and
(org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn
(org-kill-new output))) (or (and (functionp post-process) (funcall post-process
file)) file)))
(let ((ext-plist (org-combine-plists (list (quote :output-file) file)
ext-plist)) (encoding (or org-export-coding-system buffer-file-coding-system)))
(if async (let ((with-temp-message "Initializing asynchronous export process")
(current-message)) (unwind-protect (progn (if with-temp-message (progn (setq
current-message ...) (message "%s" with-temp-message))) (let ((--copy-fun ...)
(--temp-file ...) (--coding buffer-file-coding-system)) (let (... ...)
(unwind-protect ... ...)) (let* (... ... ...) (org-export-add-to-stack ... nil
--process) (let ... ...)))) (and with-temp-message (if current-message (message
"%s" current-message) (message nil))))) (let ((output (org-export-as backend
subtreep visible-only body-only ext-plist))) (let ((temp-buffer
(generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer)
(unwind-protect (progn (insert output) (let ... ...)) (and (buffer-name
temp-buffer) (kill-buffer temp-buffer))))) (if (and
(org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn
(org-kill-new output))) (or (and (functionp post-process) (funcall post-process
file)) file))))
(if (not (file-writable-p file)) (error "Output file not writable") (let
((ext-plist (org-combine-plists (list (quote :output-file) file) ext-plist))
(encoding (or org-export-coding-system buffer-file-coding-system))) (if async
(let ((with-temp-message "Initializing asynchronous export process")
(current-message)) (unwind-protect (progn (if with-temp-message (progn ...
...)) (let (... ... ...) (let ... ...) (let* ... ... ...))) (and
with-temp-message (if current-message (message "%s" current-message) (message
nil))))) (let ((output (org-export-as backend subtreep visible-only body-only
ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*")))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ...)
(and ... ...)))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p
output)) (progn (org-kill-new output))) (or (and (functionp post-process)
(funcall post-process file)) file)))))
org-export-to-file(latex "./xiha.tex" nil nil nil nil nil)
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
(org-export-to-file (quote latex) outfile async subtreep visible-only body-only
ext-plist))
org-latex-export-to-latex(nil nil nil nil)
funcall(org-latex-export-to-latex nil nil nil nil)
(save-excursion (if arg (progn (if (eq (marker-buffer
org-export-dispatch-last-position) (org-base-buffer (current-buffer)))
(goto-char org-export-dispatch-last-position) (move-marker
org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote
async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote
visible) optns) t) (and (memq (quote body) optns) t)))
(cond ((eql action (quote template)) (org-export-insert-default-template nil
optns)) ((eql action (quote stack)) (org-export-stack)) ((eql action (quote
publish-current-file)) (org-publish-current-file (memq (quote force) optns)
(memq (quote async) optns))) ((eql action (quote publish-current-project))
(org-publish-current-project (memq (quote force) optns) (memq (quote async)
optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc
(org-icompleting-read "Publish project: " org-publish-project-alist nil t)
org-publish-project-alist) (memq (quote force) optns) (memq (quote async)
optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force)
optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq
(marker-buffer org-export-dispatch-last-position) (org-base-buffer ...))
(goto-char org-export-dispatch-last-position) (move-marker
org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote
async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote
visible) optns) t) (and (memq (quote body) optns) t)))))
(let* ((input (cond ((equal arg (quote (16))) (quote (stack))) ((and arg
org-export-dispatch-last-action)) (t (let ((wconfig ...)) (unwind-protect
(progn ...) (set-window-configuration wconfig)))))) (action (car input)) (optns
(cdr input))) (if (memq (quote subtree) optns) nil (move-marker
org-export-dispatch-last-position nil)) (cond ((eql action (quote template))
(org-export-insert-default-template nil optns)) ((eql action (quote stack))
(org-export-stack)) ((eql action (quote publish-current-file))
(org-publish-current-file (memq (quote force) optns) (memq (quote async)
optns))) ((eql action (quote publish-current-project))
(org-publish-current-project (memq (quote force) optns) (memq (quote async)
optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc
(org-icompleting-read "Publish project: " org-publish-project-alist nil t)
org-publish-project-alist) (memq (quote force) optns) (memq (quote async)
optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force)
optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq
... ...) (goto-char org-export-dispatch-last-position) (move-marker
org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote
async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote
visible) optns) t) (and (memq (quote body) optns) t))))))
org-export-dispatch(nil)
funcall-interactively(org-export-dispatch nil)
call-interactively(org-export-dispatch nil nil)
command-execute(org-export-dispatch)