all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Questions about exporting: subtitle, level formating, custom highlight markers error
@ 2015-07-26 13:04 Xiha
  2015-07-26 18:44 ` Rasmus
  2015-07-27  8:34 ` Eric S Fraga
  0 siblings, 2 replies; 14+ messages in thread
From: Xiha @ 2015-07-26 13:04 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I am writing a paper-like document in Org-mode, and experimenting with 
export to HTML and PDF (via LaTeX) in order to share drafts. Not sure 
yet what the final formatting will be. I am quite new to Emacs/Org-mode, 
know little about css and nothing about LaTeX. Using Emacs 24.5.1 and 
Org-mode 8.2.10 that came with it.

1) I would like the exported document to have a subtitle under the title 
in a smaller and/or lighter font. The latter requirement makes splitting 
the title with a newline not quite a solution. I believe I saw 
discussion somewhere about a #+SUBTITLE keyword for LaTeX or HTML export 
(as opposed to Texinfo which the manual says is supported?) But that 
seemed to be a feature-in-progress? What is the status of this? Is there 
an alternative I can use for now?

2) I have #+OPTIONS: H:9 num:9 because explicit level structure is 
important for this document. I would like to have more control over how 
this is exported, e.g. by setting heading font size as well as 
left-margin widths per level, for a staircase-like effect similar to 
that obtained with org-indent-mode in Org itself. (How) can this be done?

3) I forget through which command/menu, but I set custom markers that 
'highlight' the words they surround, within Org itself. I'm using the 
'leuven' theme which makes them stand out with a yellow background - 
useful for passages that need work etc. But now when I try to export to 
HTML or PDF, it fails with "Unknown marker at 10497". Is there a way to 
get the highlighting in the exported document? Alternatively, can I tell 
the exporter to ignore the custom markers, i.e. treat them as regular 
characters?

Thanks in advance.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-26 13:04 Questions about exporting: subtitle, level formating, custom highlight markers error Xiha
@ 2015-07-26 18:44 ` Rasmus
  2015-07-27  8:34 ` Eric S Fraga
  1 sibling, 0 replies; 14+ messages in thread
From: Rasmus @ 2015-07-26 18:44 UTC (permalink / raw)
  To: emacs-orgmode

Xiha <xiha@laposte.net> writes:

> 1) I would like the exported document to have a subtitle under the
> title in a smaller and/or lighter font. The latter requirement makes
> splitting the title with a newline not quite a solution. I believe I
> saw discussion somewhere about a #+SUBTITLE keyword for LaTeX or HTML
> export (as opposed to Texinfo which the manual says is supported?) But
> that seemed to be a feature-in-progress? What is the status of this?
> Is there an alternative I can use for now?

The git version has a #+subtitle keyword.  See the git version of the
manual for supported backends (most).

> 2) I have #+OPTIONS: H:9 num:9 because explicit level structure is
> important for this document. I would like to have more control over
> how this is exported, e.g. by setting heading font size as well as
> left-margin widths per level, for a staircase-like effect similar to
> that obtained with org-indent-mode in Org itself. (How) can this be
> done?

Depends on the backend.  With latex you could use setkomafont (of
KOMA-Script) and with html you could use css.

> 3) I forget through which command/menu, but I set custom markers that
> 'highlight' the words they surround, within Org itself. I'm using the
> 'leuven' theme which makes them stand out with a yellow background - 
> useful for passages that need work etc. But now when I try to export
> to HTML or PDF, it fails with "Unknown marker at 10497". Is there a
> way to get the highlighting in the exported document? Alternatively,
> can I tell the exporter to ignore the custom markers, i.e. treat them
> as regular characters?

No idea about this.  It could be a bug anywhere.

Hope it helps,
Rasmus

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-26 13:04 Questions about exporting: subtitle, level formating, custom highlight markers error Xiha
  2015-07-26 18:44 ` Rasmus
@ 2015-07-27  8:34 ` Eric S Fraga
  2015-07-27 13:55   ` Xiha
  1 sibling, 1 reply; 14+ messages in thread
From: Eric S Fraga @ 2015-07-27  8:34 UTC (permalink / raw)
  To: Xiha; +Cc: emacs-orgmode

On Sunday, 26 Jul 2015 at 15:04, Xiha wrote:
> 2) I have #+OPTIONS: H:9 num:9 because explicit level structure is
> important for this document. I would like to have more control over

For LaTeX export, this will not work (AFAIK) as LaTeX only supports 4 or
so levels of headings.

> how this is exported, e.g. by setting heading font size as well as
> left-margin widths per level, for a staircase-like effect similar to
> that obtained with org-indent-mode in Org itself. (How) can this be
> done?

If you want this kind of control, you should ensure that the LaTeX uses
the scrartcl (koma-script) article class which is highly
configurable.  However, you will have to do the LaTeX configuration
yourself directly using #+latex: and #+latex_header: org directives in
your org document.

For HTML export, you will need to define the appropriate CSS
specifications to achieve the stair case effect.  I have no idea how
this would be done...

> 3) I forget through which command/menu, but I set custom markers that
> 'highlight' the words they surround, within Org itself. I'm using the
> 'leuven' theme which makes them stand out with a yellow background - 
> useful for passages that need work etc. But now when I try to export
> to HTML or PDF, it fails with "Unknown marker at 10497". Is there a
> way to get the highlighting in the exported document? Alternatively,
> can I tell the exporter to ignore the custom markers, i.e. treat them
> as regular characters?

Could you maybe post a small example file?  I have no idea what you are
describing unfortunately.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1293-g985420

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-27  8:34 ` Eric S Fraga
@ 2015-07-27 13:55   ` Xiha
  2015-07-27 15:02     ` Eric S Fraga
  0 siblings, 1 reply; 14+ messages in thread
From: Xiha @ 2015-07-27 13:55 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3595 bytes --]

Thanks Rasmus and Eric!

1) subtitle
> The git version has a #+subtitle keyword.  See the git version of the
> manual for supported backends (most).

Where the git install instructions say "you should edit local.mk to 
point to the appropriate install location", how do I find out where this 
is? Sorry, not used to using git :/

Is it possible to install the git version alongside the stable one, and 
choose which to use for each session?

2) level formating
> For LaTeX export, this will not work (AFAIK) as LaTeX only supports 4 or
> so levels of headings.
Just tested: yes, 5 levels. At the 6th it treats them as list items. 
Well, it may be sufficient - I put '9' to leave some room.

> Depends on the backend.  With latex you could use setkomafont (of
> KOMA-Script) and with html you could use css.
> If you want this kind of control, you should ensure that the LaTeX uses
> the scrartcl (koma-script) article class which is highly
> configurable.  However, you will have to do the LaTeX configuration
> yourself directly using #+latex: and #+latex_header: org directives in
> your org document.
>
> For HTML export, you will need to define the appropriate CSS
> specifications to achieve the stair case effect.  I have no idea how
> this would be done...
Right, I'll have a look at koma-script. Would there be a 
tutorial/example somewhere for how to do this from Org?

And perhaps this can take care of the subtitle issue, too, within the 
stable Org version?

3) Custom highlight markers error
> No idea about this.  It could be a bug anywhere.
> Could you maybe post a small example file?  I have no idea what you are
> describing unfortunately.
I retrieved what I did, from here 
<http://stackoverflow.com/questions/20016634/highlight-selected-text-in-emacs-org-mode>: 
"You can re-define the characters for emphasizing via Options->Customize 
Emacs->Specific Option then input org-emphasis-alist."

Then I added an item to the list for using the interpunct character ·, 
resulting in

[INS] [DEL] List:
             Marker character: *
             Choice: [Value Menu] Font-lock-face: (sample) bold
             [ ] verbatim
[INS] [DEL] List:
             Marker character: /
             Choice: [Value Menu] Font-lock-face: (sample) italic
             [ ] verbatim
[INS] [DEL] List:
             Marker character: _
             Choice: [Value Menu] Font-lock-face: (sample) underline
             [ ] verbatim
[INS] [DEL] List:
             Marker character: =
             Choice: [Value Menu] Font-lock-face: (sample) org-verbatim
             [X] verbatim
[INS] [DEL] List:
             Marker character: ~
             Choice: [Value Menu] Font-lock-face: (sample) org-code
             [X] verbatim
[INS] [DEL] List:
             Marker character: +
             Choice: [Value Menu] Face property list:
                         [INS] [DEL] Key: :strike-through
                         Value: t
[INS]
             [ ] verbatim
*[INS] [DEL] List: **
**            Marker character: · **
**            Choice: [Value Menu] Font-lock-face: (sample) highlight **
**            [X] verbatim*

Then when I write something like ·this· in my text, it is highlighted 
with a yellow background, within Org. But upon exporting I get the error 
mentioned. It does not appear to be due to some interaction with other 
stuff in my document, because the error occurs even for a minimal 
document that has only

·test·

in it. So, a bug as Rasmus suggests, or a matter of configuration?

cheers

[-- Attachment #2: Type: text/html, Size: 29022 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-27 13:55   ` Xiha
@ 2015-07-27 15:02     ` Eric S Fraga
  2015-07-28  7:24       ` Sebastien Vauban
  2015-07-28 11:38       ` Xiha
  0 siblings, 2 replies; 14+ messages in thread
From: Eric S Fraga @ 2015-07-27 15:02 UTC (permalink / raw)
  To: Xiha; +Cc: emacs-orgmode

On Monday, 27 Jul 2015 at 15:55, Xiha wrote:
> Thanks Rasmus and Eric!
>
> 1) subtitle
>> The git version has a #+subtitle keyword.  See the git version of the
>> manual for supported backends (most).
>
> Where the git install instructions say "you should edit local.mk to
> point to the appropriate install location", how do I find out where
> this is? Sorry, not used to using git :/

I think this is up to you.  I don't change anything and so the location
of the code is the installation location, e.g. ~/git/org-mode in my
case.

> Is it possible to install the git version alongside the stable one,
> and choose which to use for each session?

Check out load-path.

> Right, I'll have a look at koma-script. Would there be a
> tutorial/example somewhere for how to do this from Org?

No idea, sorry.  You can set the class to use with #+latex_class and
options for that class with #+latex_class_options.

> And perhaps this can take care of the subtitle issue, too, within the
> stable Org version?

No idea.

> 3) Custom highlight markers error
>> No idea about this.  It could be a bug anywhere.
>> Could you maybe post a small example file?  I have no idea what you are
>> describing unfortunately.
> I retrieved what I did, from here
> <http://stackoverflow.com/questions/20016634/highlight-selected-text-in-emacs-org-mode>:

I am not sure the new exporter allows you to define new highlighting
methods.  The old one did but that was quite a while ago now.

You can always use macros instead?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1293-g985420

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-27 15:02     ` Eric S Fraga
@ 2015-07-28  7:24       ` Sebastien Vauban
  2015-07-28  8:20         ` Eric S Fraga
  2015-07-28 11:38       ` Xiha
  1 sibling, 1 reply; 14+ messages in thread
From: Sebastien Vauban @ 2015-07-28  7:24 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Eric S Fraga <e.fraga-hclig2XLE9Zaa/9Udqfwiw@public.gmane.org> writes:
>> 3) Custom highlight markers error
>>> No idea about this.  It could be a bug anywhere.
>>> Could you maybe post a small example file?  I have no idea what you are
>>> describing unfortunately.
>> I retrieved what I did, from here
>> <http://stackoverflow.com/questions/20016634/highlight-selected-text-in-emacs-org-mode>:
>
> I am not sure the new exporter allows you to define new highlighting
> methods.  The old one did but that was quite a while ago now.

That's true we liked `@' for `alert'...

> You can always use macros instead?

Or the `font-lock-add-keywords' mechanism?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-28  7:24       ` Sebastien Vauban
@ 2015-07-28  8:20         ` Eric S Fraga
  0 siblings, 0 replies; 14+ messages in thread
From: Eric S Fraga @ 2015-07-28  8:20 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

On Tuesday, 28 Jul 2015 at 09:24, Sebastien Vauban wrote:
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:

[...]

>> You can always use macros instead?
>
> Or the `font-lock-add-keywords' mechanism?
>
> Best regards,
>   Seb

I think the OP wanted markers that would export, not just stand out in
the emacs buffer.  

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1293-g985420

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-27 15:02     ` Eric S Fraga
  2015-07-28  7:24       ` Sebastien Vauban
@ 2015-07-28 11:38       ` Xiha
  2015-07-28 12:05         ` Eric S Fraga
  2015-07-28 12:25         ` Nick Dokos
  1 sibling, 2 replies; 14+ messages in thread
From: Xiha @ 2015-07-28 11:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

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 
<http://orgmode.org/manual/Macro-replacement.html> 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 
<https://www.gnu.org/software/emacs/manual/html_node/elisp/Customizing-Keywords.html> 
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)?

cheers

[-- Attachment #2: Type: text/html, Size: 2839 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-28 11:38       ` Xiha
@ 2015-07-28 12:05         ` Eric S Fraga
  2015-07-28 13:47           ` Xiha
  2015-07-28 12:25         ` Nick Dokos
  1 sibling, 1 reply; 14+ messages in thread
From: Eric S Fraga @ 2015-07-28 12:05 UTC (permalink / raw)
  To: Xiha; +Cc: emacs-orgmode


You need to differentiate between two aspects: highlighting of text
within a org buffer and what happens to text when exported.  In the new
exporter, I don't think you can implement anything that covers both use
cases.

I am not entirely sure what it is you want.  If you want just one of
these, for the former, font-lock-add-keywords is probably what you want
to pursue.  For the latter, you probably want to use a macro with
@@latex:...@@ and/or @@html:...@@ code embedded in the macro to export
the text the way you want it, as in

    #+macro: coloured @@latex:{\color{red} $1}@@

    This is some {{{coloured(text)}}} when exported.
    
HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1293-g985420

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-28 11:38       ` Xiha
  2015-07-28 12:05         ` Eric S Fraga
@ 2015-07-28 12:25         ` Nick Dokos
  1 sibling, 0 replies; 14+ messages in thread
From: Nick Dokos @ 2015-07-28 12:25 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

Xiha <xiha@laposte.net> 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


[-- Attachment #2: backtrace --]
[-- Type: text/plain, Size: 37672 bytes --]

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 " \r	\n" end) (and (/= (point) end) (line-beginning-position)))) (hidden (org-invisible-p2)) (contents-end (and contents-begin (progn (goto-char end) (skip-chars-backward " \r	\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 " \r	\n" end) (and (/= (point) end) (line-beginning-position)))) (hidden (org-invisible-p2)) (contents-end (and contents-begin (progn (goto-char end) (skip-chars-backward " \r	\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)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-28 12:05         ` Eric S Fraga
@ 2015-07-28 13:47           ` Xiha
  2015-07-28 15:19             ` John Kitchin
  0 siblings, 1 reply; 14+ messages in thread
From: Xiha @ 2015-07-28 13:47 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2998 bytes --]

Thanks guys. Getting closer - but please don't overestimate my backgound 
knowledge :)

On 07/28/2015 02:05 PM, Eric S Fraga wrote:
> You need to differentiate between two aspects: highlighting of text
> within a org buffer and what happens to text when exported.
Yes. Principally, I want the former.

As to the latter: (1) my custom highlighting shouldn't break exporting. 
(2) /If/ highlighting can appear in the exported document, that's a 
bonus. But clearly it's not trivial to do; so never mind.

> In the new exporter, I don't think you can implement anything that covers
> both use cases.
>
> I am not entirely sure what it is you want.  If you want just one of
> these, for the former, font-lock-add-keywords is probably what you want
> to pursue.
Right, so grabbing code from the manual about font lock mode 
<https://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html>, 
how do I adapt it? I tried putting this in my .emacs file

;; Highlight text between ·interpuncts·
(add-hook 'org-mode-hook
           (lambda ()
            (font-lock-add-keywords nil
             '(("·\w·" 1
                font-lock-warning-face t)))))

but that doesn't work. Probably that regexp is all wrong?

Also, I don't want it to use font-lock-warning-face particularly. (How) 
can I define a new face for this purpose?

Nick Dokos wrote:
> 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,
So do I understand correctly that this is a completely different route 
than the font-lock-add-keywords one above? I.e. using this latest git 
version, I can define the highlight marker as I did and described 
earlier, and there's no need for a new face, because it uses the 
'highlight' defined in the theme I'm using. Correct?

I cloned the git files, but I'm wary of the next steps. If I just make 
and make install, will it not half-overwrite my current stable Org, and 
become a big mess? Sorry, this stuff is new to me and not really obvious.

Also: I tried reinstalling Org via the menu, Options >> Manage Emacs 
Packages in hopes that it would install the git version while taking 
care of avoiding a mess. It now lists 20150727 as the version, so that's 
recent, but is that the 'bleeding edge' version or the stable version at 
that date? It didn't solve the problem, at any rate.

> except
> that the marker characters are copied verbatim to the output, so you'll
> have some cleanup to do.
That's okay. It's not a problem for draft versions of the document; and 
by the time the final document is ready, all this temporary highlighting 
should be gone!

> I also tried 8.2.9 and got an error, but the error is different from
> what you get (backtrace attached).
I am using 8.2.10 not 8.2.9 so that may explain the difference.

cheers

[-- Attachment #2: Type: text/html, Size: 8064 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-28 13:47           ` Xiha
@ 2015-07-28 15:19             ` John Kitchin
  2015-07-29 19:32               ` Xiha
  0 siblings, 1 reply; 14+ messages in thread
From: John Kitchin @ 2015-07-28 15:19 UTC (permalink / raw)
  To: Xiha; +Cc: emacs-orgmode

You may find this post on highlighting text helpful:
http://kitchingroup.cheme.cmu.edu/blog/2015/07/28/A-highlight-annotation-mode-for-Emacs-using-font-lock/

I think it also lays the foundation for thinking about how to get it to
export, although you would need to do this as a preprocessing step
before the org export to replace highlighted regions by the appropriate markup.

It also sounds like you could use the highlight-regexp function for what
you want.

Something like this might do what you want (use the face you prefer).

(defface my-face3
  `((t (:inherit org-link :foreground "red")))
  "My face")


(highlight-regexp "·[^·]*·" 'my-face3)

(unhighlight-regexp "·[^·]*·")



Xiha writes:

·test·

> Thanks guys. Getting closer - but please don't overestimate my backgound
> knowledge :)
>
> On 07/28/2015 02:05 PM, Eric S Fraga wrote:
>> You need to differentiate between two aspects: highlighting of text
>> within a org buffer and what happens to text when exported.
> Yes. Principally, I want the former.
>
> As to the latter: (1) my custom highlighting shouldn't break exporting.
> (2) /If/ highlighting can appear in the exported document, that's a
> bonus. But clearly it's not trivial to do; so never mind.
>
>> In the new exporter, I don't think you can implement anything that covers
>> both use cases.
>>
>> I am not entirely sure what it is you want.  If you want just one of
>> these, for the former, font-lock-add-keywords is probably what you want
>> to pursue.
> Right, so grabbing code from the manual about font lock mode
> <https://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html>,
> how do I adapt it? I tried putting this in my .emacs file
>
> ;; Highlight text between ·interpuncts·
> (add-hook 'org-mode-hook
>            (lambda ()
>             (font-lock-add-keywords nil
>              '(("·\w·" 1
>                 font-lock-warning-face t)))))
>
> but that doesn't work. Probably that regexp is all wrong?
>
> Also, I don't want it to use font-lock-warning-face particularly. (How)
> can I define a new face for this purpose?
>
> Nick Dokos wrote:
>> 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,
> So do I understand correctly that this is a completely different route
> than the font-lock-add-keywords one above? I.e. using this latest git
> version, I can define the highlight marker as I did and described
> earlier, and there's no need for a new face, because it uses the
> 'highlight' defined in the theme I'm using. Correct?
>
> I cloned the git files, but I'm wary of the next steps. If I just make
> and make install, will it not half-overwrite my current stable Org, and
> become a big mess? Sorry, this stuff is new to me and not really obvious.
>
> Also: I tried reinstalling Org via the menu, Options >> Manage Emacs
> Packages in hopes that it would install the git version while taking
> care of avoiding a mess. It now lists 20150727 as the version, so that's
> recent, but is that the 'bleeding edge' version or the stable version at
> that date? It didn't solve the problem, at any rate.
>
>> except
>> that the marker characters are copied verbatim to the output, so you'll
>> have some cleanup to do.
> That's okay. It's not a problem for draft versions of the document; and
> by the time the final document is ready, all this temporary highlighting
> should be gone!
>
>> I also tried 8.2.9 and got an error, but the error is different from
>> what you get (backtrace attached).
> I am using 8.2.10 not 8.2.9 so that may explain the difference.
>
> cheers

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-28 15:19             ` John Kitchin
@ 2015-07-29 19:32               ` Xiha
  2015-07-29 19:51                 ` Marcin Borkowski
  0 siblings, 1 reply; 14+ messages in thread
From: Xiha @ 2015-07-29 19:32 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: John Kitchin

[-- Attachment #1: Type: text/plain, Size: 4868 bytes --]

Hi John,

Yes, highlight-regexp looks good and simple, when I apply it manually to 
the buffer. No need even to define a new face as the default hi-yellow 
is what I want.

But: (how) can I call highlight-regexp from my .emacs file so that it 
automatically applies to every Org buffer? Or must it be called on a per 
buffer basis? Just putting (highlight-regexp "·[^·]*·") in my .emacs, as 
well as (global-hi-lock-mode 1) because Emacs throws a warning 
otherwise, didn't work.

Once I find time to go through this elisp/customization tutorial 
<http://emacslife.com/how-to-read-emacs-lisp.html> I may more fruitfully 
study your post!

thanks


On 07/28/2015 05:19 PM, John Kitchin wrote:
> You may find this post on highlighting text helpful:
> http://kitchingroup.cheme.cmu.edu/blog/2015/07/28/A-highlight-annotation-mode-for-Emacs-using-font-lock/
>
> I think it also lays the foundation for thinking about how to get it to
> export, although you would need to do this as a preprocessing step
> before the org export to replace highlighted regions by the appropriate markup.
>
> It also sounds like you could use the highlight-regexp function for what
> you want.
>
> Something like this might do what you want (use the face you prefer).
>
> (defface my-face3
>    `((t (:inherit org-link :foreground "red")))
>    "My face")
>
>
> (highlight-regexp "·[^·]*·" 'my-face3)
>
> (unhighlight-regexp "·[^·]*·")
>
>
>
> Xiha writes:
>
> ·test·
>
>> Thanks guys. Getting closer - but please don't overestimate my backgound
>> knowledge :)
>>
>> On 07/28/2015 02:05 PM, Eric S Fraga wrote:
>>> You need to differentiate between two aspects: highlighting of text
>>> within a org buffer and what happens to text when exported.
>> Yes. Principally, I want the former.
>>
>> As to the latter: (1) my custom highlighting shouldn't break exporting.
>> (2) /If/ highlighting can appear in the exported document, that's a
>> bonus. But clearly it's not trivial to do; so never mind.
>>
>>> In the new exporter, I don't think you can implement anything that covers
>>> both use cases.
>>>
>>> I am not entirely sure what it is you want.  If you want just one of
>>> these, for the former, font-lock-add-keywords is probably what you want
>>> to pursue.
>> Right, so grabbing code from the manual about font lock mode
>> <https://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html>,
>> how do I adapt it? I tried putting this in my .emacs file
>>
>> ;; Highlight text between ·interpuncts·
>> (add-hook 'org-mode-hook
>>             (lambda ()
>>              (font-lock-add-keywords nil
>>               '(("·\w·" 1
>>                  font-lock-warning-face t)))))
>>
>> but that doesn't work. Probably that regexp is all wrong?
>>
>> Also, I don't want it to use font-lock-warning-face particularly. (How)
>> can I define a new face for this purpose?
>>
>> Nick Dokos wrote:
>>> 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,
>> So do I understand correctly that this is a completely different route
>> than the font-lock-add-keywords one above? I.e. using this latest git
>> version, I can define the highlight marker as I did and described
>> earlier, and there's no need for a new face, because it uses the
>> 'highlight' defined in the theme I'm using. Correct?
>>
>> I cloned the git files, but I'm wary of the next steps. If I just make
>> and make install, will it not half-overwrite my current stable Org, and
>> become a big mess? Sorry, this stuff is new to me and not really obvious.
>>
>> Also: I tried reinstalling Org via the menu, Options >> Manage Emacs
>> Packages in hopes that it would install the git version while taking
>> care of avoiding a mess. It now lists 20150727 as the version, so that's
>> recent, but is that the 'bleeding edge' version or the stable version at
>> that date? It didn't solve the problem, at any rate.
>>
>>> except
>>> that the marker characters are copied verbatim to the output, so you'll
>>> have some cleanup to do.
>> That's okay. It's not a problem for draft versions of the document; and
>> by the time the final document is ready, all this temporary highlighting
>> should be gone!
>>
>>> I also tried 8.2.9 and got an error, but the error is different from
>>> what you get (backtrace attached).
>> I am using 8.2.10 not 8.2.9 so that may explain the difference.
>>
>> cheers
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu


[-- Attachment #2: Type: text/html, Size: 6161 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Questions about exporting: subtitle, level formating, custom highlight markers error
  2015-07-29 19:32               ` Xiha
@ 2015-07-29 19:51                 ` Marcin Borkowski
  0 siblings, 0 replies; 14+ messages in thread
From: Marcin Borkowski @ 2015-07-29 19:51 UTC (permalink / raw)
  To: emacs-orgmode, John Kitchin


On 2015-07-29, at 21:32, Xiha <xiha@laposte.net> wrote:

> Hi John,
>
> Yes, highlight-regexp looks good and simple, when I apply it manually to 
> the buffer. No need even to define a new face as the default hi-yellow 
> is what I want.
>
> But: (how) can I call highlight-regexp from my .emacs file so that it 
> automatically applies to every Org buffer? Or must it be called on a per 
> buffer basis? Just putting (highlight-regexp "·[^·]*·") in my .emacs, as 
> well as (global-hi-lock-mode 1) because Emacs throws a warning 
> otherwise, didn't work.

C-h v org-mode-hook RET

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-07-29 19:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-26 13:04 Questions about exporting: subtitle, level formating, custom highlight markers error Xiha
2015-07-26 18:44 ` Rasmus
2015-07-27  8:34 ` Eric S Fraga
2015-07-27 13:55   ` Xiha
2015-07-27 15:02     ` Eric S Fraga
2015-07-28  7:24       ` Sebastien Vauban
2015-07-28  8:20         ` Eric S Fraga
2015-07-28 11:38       ` Xiha
2015-07-28 12:05         ` Eric S Fraga
2015-07-28 13:47           ` Xiha
2015-07-28 15:19             ` John Kitchin
2015-07-29 19:32               ` Xiha
2015-07-29 19:51                 ` Marcin Borkowski
2015-07-28 12:25         ` Nick Dokos

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.