Marting G. Skjaeveland writes:
> I pulled a fresh copy of org-mode this morning and noticed that
> references to source code line numbers no longer work as they used
> to. Instead of displaying the number of the line with the label, the
> label is displayed.
>
> Exporting the following example, retrieved from the online
> documentation (http://orgmode.org/manual/Literal-examples.html),
>
> -------------------------------------start
> #+BEGIN_SRC emacs-lisp -n -r
> (save-excursion (ref:sc)
> (goto-char (point-min)) (ref:jump)
> #+END_SRC
>
> In line [[(sc)]] we remember the current position. [[(jump)][Line
> (jump)]] jumps to point-min.
>
> -------------------------------------end
>
> gives me in latex export
>
> -------------------------------------start
> \begin{verbatim}
> 1: (save-excursion
> 2: (goto-char (point-min))
> \end{verbatim}
>
> In line \hyperref[(sc)]{(sc)} we remember the current
> position. \hyperref[(jump)]{Line (jump)} jumps to point-min.
> -------------------------------------end
>
When exporting to html the source-code block name will be included
as a <label> immediately preceding the exported code. This <label>
is decorated with the 'org-src-name' css class.
When exporting to LaTeX with the listings package the source-code
block name will be included as a listings \title for the code
block. Currently the name will not be exported when the listings
package is not in use.
Christopher Suckling writes:
> Thank you, but not quite working yet:
>
> ,----
> | #+BIND: org-export-latex-title-command ""
> `----
>
> now appears to be having the *effect* of setting a global variable.
>
> I load Emacs then visit the below test org file. I then export the file.
>
> I get a \maketitle line.
>
> I then C-c C-c on the #+BIND: line and re-export.
>
> \maketitle is removed.
>
> I then export another org file without the #+BIND: line.
>
> There is no \maketitle, even though there should be.
>
> I add
>
> ,----
> | #+BIND: org-export-latex-title-command "\foobar"
> `----
>
> to the new org file, C-c C-c and export:
>
> \foobar is added to the exported file.
>
> Finally, I re-export the original test org file (without C-c C-c on the
> #+BIND: line):
>
> \foobar is added to the exported file.
>
> However,
>
> ,----
> | C-h v org-export-latex-title-command
> `----
>
> always returns the value "\\maketitle", no matter what the value of the
> #+BIND: line.
>
> Best, Christopher
file+sys:/path/to/file will use the system to open the file, like
double-clicking would
file+emacs:/path/to/file will force opening by Emacs
Also, when using C-c C-o on a headline of get a list of links in the
entry, pressing RET will open *all* links. This allows something like
projects to be defined, with a number of files that have to be opened
by different applications.
These were requests by John Wiegley.
Exporting drawers was not really supported, now it is.
Drawers that are selected for export are formatted using the function
specified in the variable `org-export-format-drawer-function'. If
that is nil, the default `org-export-format-drawer' will publish the
drawer as a colon example, i.e. verbatim and in fixed-width.
Martin Skjaeveland writes:
> Hi all,
>
> when I import the file
>
> --8<---------------cut here---------------start------------->8---
> -----------------
> | grandmother |
> =================
> | sim:Jackeline |
> | sim:Mona |
> -----------------
> --8<---------------cut here---------------end------------->8---
>
> using the command
>
> #+INCLUDE "grandmothers.txt" example
>
> and export to latex it turns into
>
>
> \begin{verbatim}
> -----------------
> | grandmother |
> \texttt{===============}
> | sim:Jackeline |
> | sim:Mona |
> -----------------
> \end{verbatim}
>
>
> I would like to remove \texttt{ }. I have tried different export
> option settings, but I can't make it work.
>
When a backend selects its #+begin_backend ... #+end_backend
code, the markers need to be removed so that a package like
org-special-blocks.el does not try to work on the block again.
There was an issue that lines starting with a space followed by #
would be protected when importing the file, but not unprotected when
formatting the example. The reason for this issue is that we recently
changed to protect indented #+ lines.
The width and alignment in table columns can be set with a cookie like
"<10>" or "<r>" or "<r10>". In order to keep Org from exporting such
lines, the first column of a line can contain only "/". However, for
convenience, this commit implements a special case: If the entire row
contains only sch markers, the line will automatically be discarded
during export.
Eric Schulte writes:
> Attached is a small patch for a small issue.
>
> Sometimes a language uses a major mode which can't be guessed
> from it's name. This patch introduces the `org-src-lang-modes'
> variable which can be used to map language names to major modes
> when this is the case. This is used when editing a source-code
> block, or when exporting fontified source-code with htmlize.
>
> So far the only instance of this that I know of is ocaml and
> tuareg-mode, so that's the only thing that `org-src-lang-modes'
> is pre-populated with. Maybe there are other instances as well?
However, if you are using arguments, it is required that the opening
parenthesis is attached to the macro name, and that the closing
parenthesis is attached to the three closing braces.
Hsiu-Khuern writes:
> Hi all,
>
> The footnote at the bottom of section 13.1.4 ("Publishing
> action") of the Org manual says that publishing org files to
> the same directory using org-publish-org-to-org results in
> files named like file-source.org. It actually results in
> file.org-source, which is not as nice. I believe the
> problem is in the org-export-as-org function in org-exp.el.
Allow whitespace in code references. Allow the -r switch to remove the
references in the source code even when the lines are not numbered: the
labels can be explicit enough. Note that "-r -k" is the same than no
switch - as expected.
Thanks to Ulf Stegemann for bring this up.
As reported by Ulf Stegemann (09/07/2009) the HTML output
of the example in the manual would result in no number for
the first line. It is because `org-export-number-lines' is
told to skip one line while the line inserted previously
(i.e. "<pre class ...>") doesn't end with a newline.
Many different people want to set many different variables in a
buffer-local way for export. This cannot be done with file variables,
because the Org buffer is not current while the exporter is running.
Lots of variables can be set with the #+OPTIONS lines, but finding
abbreviations goes only so far.
Therefore we have now a general mechanism that can be used to bind
variables during export operations.
a line like: #+BIND: variable value
will bind the variable to value. For example,
the line
>> #+OPTIONS: toc:nil
can now equivalently be written as
>> #+BIND: org-export-with-toc nil
Stefan Vollmar writes:
> taking up a nice suggestion from Sebastian Rose, I want to
> present some org source with proper syntax highlighting. However,
> there is a problem when using "BEGIN_SRC" blocks it seems.
>
> If one puts this org contents into a file "test.org":
>
> * One Headline
> Some Text
> #+BEGIN_SRC python
> print "some output"
> #+END_SRC
> * Another headline
> More text
>
> and renders it from another org-file with:
>
> #+INCLUDE: "./test.org" src org
>
> everything will be fine (beautiful, infact) up to and including
> the print-line - the rest of the org file is not rendered as
> source but interpreted.
This commit adds a new hook `org-src-mode-hook'.
The Hook run after Org switched a source code snippet to
its Emacs mode. This hook will run
- when editing a source code snippet with \"C-c '\".
- When formatting a source code snippet for export with htmlize.
You may want to use this hook for example to turn off `outline-minor-mode'
or similar things which you want to have when editing a source code file,
but which mess up the display of a snippet in Org exported files.
As the export preprocessor removes indentation from indented blocks,
this causes conflicts about interpreting indentation as list
termination. Now the original indentation is stored in a text
property, so hopefully the exporters can make use of this information
in due time.
All export commands now push the result to the kill ring by default.
This is subject to the variable `org-export-push-to-kill-ring'.
Also, this commit adds a new variable
`org-export-show-temporary-export-buffer' which can be used to turn
off the display of the temporary buffer containing the exported text.
Since this stuff is now automatically pushed onto the kill ring, some
people might prefer not to see this buffer.
There is now a new export function, `org-export-as-org', which
basically creates a copy of the Org file with things like archived
trees, commented trees, and trees deselected by export tags,
stripped.
This commit adds:
{{{date(FORMAT)}}} current date/time, formatted with
`format-time-string'
{{{modification-time(FORMAT)}}} date/time of last modification of
file, formatted with `format-time-string'
{{{input-file}}} the file name of the source Org file.
Shaun Johanson writes:
> Consider the following Org file:
>
> * Test
>
> See [[(foo)][FOOBIE]]
>
> #+BEGIN_EXAMPLE
> <foo>: blah blah (ref:foo)
> #+END_EXAMPLE
>
> Question 1)
> In Org mode the link displays as FOOBIE, in the exported HTML it
> displays as (foo). Is there any way to cause the link to use the
> description (FOOBIE) in HTML? If not would this be a useful option
> to add?
This was a bug, fixed now.
Jason Riedy writes:
> I'm trying to change org-export-latex-image-default-option
> to "width=.7\\linewidth" in a file local variable. It's set
> correctly as a buffer local variable, and it's having no
> effect on the export. My guess is that the buffer-local
> property is stopping it as soon as org-export-as-latex runs
> set-buffer.
>
> I can smuggle the value in by adding an entry to org-export-plist-vars
> referring to org-export-latex-image-default-option and pulling the value
> from the plist, but that feels incorrect.
It is actually the correct way to do this, and I have
implemented this change.
Samuel Wales writes:
> I frequently export to ascii without wanting a file to be created,
> especially not in a useful directory, as the files are temporary.
>
> Is there a way to export ascii to just a buffer?
There is now, `C-c C-e A'.
This commit also implements commands
- org-export-as-ascii-to-buffer
- org-replace-region-by-ascii
- org-export-region-as-ascii
which are similar to what is available for HTML and LaTeX.
`C-c C-e A' used to be the key for publishing all projects.
This functionality has now been moved to `C-c C-e E'.
Chris Gray had the idea to have arbitrary blocks turned in LaTeX
environments and HTML divs. These three new hooks allow
implementation has an add-on rather than a patch.
Thomas Morgan writes:
> I just tried exporting an Org file with LaTeX fragments to HTML
> on a computer that doesn't have dvipng. There were error messages
> in *Messages* ("Failed to create png file..."), but this wasn't
> obvious to me at first glance because those messages were replaced
> in the echo area by "Exporting... done" before I could see them.
>
> So I was wondering, is there a good way to make the user aware of
> those errors? Maybe by printing "Exporting... done (with errors)"?
There is now a better error message when either the latex or the
dvipng program does not exist.
Matt Lundin writes:
> If it's not too much trouble, I was wondering if I could
> request the following properties to set export options for
> subtrees:
>
> EXPORT_AUTHOR
> EXPORT_DATE
>
> In addition to specifying an EXPORT_FILE and EXPORT_TITLE
> for a subtree, I often find myself wanting to change the
> date and author lines.
Users can now define custom IDs for use in HTML export.
These IDs are stores as property CUSTOM_ID. When present, HTML will
prefer using these over automatic targets like "sec-N.M".
Some of the standard export options are now defined in backend
specific files. This commit makes sure that building the options
property list will not cause an error because of unneeded (for the
backend) undefined variables.
When exporting to a temporary buffer, images to replace LaTeX
fragments cannot be produced, because there is no useful location
where they can be put. Therefore, these images are not produced in
this case.
In verse environments, line breaks are now enforced both in LaTeX and
in HTML. Centering is now implemented using a div rather than a
paragraph, so that there may be several paragraphs in the centering
environment. Blockquotes now also may have several paragraphs.
If a link is [[#name][desc]], the href wil be exacty href="#name".
So starting a link target with # will indicate that there will be an
explicit target for this.
Hsiu-Khuern Tang writes:
> If I export the file
>
> --------------------------------------------------
> #+OPTIONS: ^:{}
>
> * test
>
> a_{\alpha}
>
> a_{foo}
> --------------------------------------------------
>
> as HTML, I get "a_{α}" but "a<sub>foo</sub>": \alpha is not
> subscripted but foo is. I was expecting both to be subscripted,
> since they are in {}.
This is a bug, fixed now.
Message-mode assigns auto-safe file names to temporary buffers, in the
draft directory. This causes problems when running message-mode in a
temporary buffer with with-temp-buffer. When the form tries to kill
the buffer, is asks for saving it....
This commit turns off the buffer-modified flag and so avoids the
query.
Patch by Nick Dokos.
uuidgen ids may start with a number and therefore are not valid names
in HTML. Therefore we now use and "ID-" prefix for such IDs when
exporting to HTML.
Before, the bibliography will exist inside the outline structure, as
part of the last section. This commit adds code to find it, cut it
out, and move it to a better location.
Links with description not create a note before the next headline that
contains the link. In the text, the description will be shown.
The new variable `org-export-ascii-links-to-notes' can be configured
to turn off this behavior, then the reference will be inserted inline
in the text. If the line becomes too long because of this, it will
be wrapped.
A line: #+MARCO: name replacement text
can be referenced by {{{name}}}. As special cases, {{{title}}} will
reference #+TITLE, and similar with similar lines.
Like TODO keywords before, now also tags each get their own CSS class,
given by the tag itself. Invalid characters in tags are all replaced
by "_" to make sure the resulting HTML remains valid.
Two new variables can be used to add a prefix to the class names for
TODO keywords and tags.
Clock lines are now by default captured into the drawer LOGBOOK. This
means that, if state notes are also captured into a drawer, they will
be mixed with notes.
Wanrong Lin writes:
Right now in the HTML export the TODO keywords have either
class="todo", or class="done". That loses all the face properties
in the original TODO keywords. I think the TODO keywords faces are
important visual aids to differentiate different types of TODO
items, so I just wonder whether it is possible to keep the faces
in the HTML.
This makes sense. This commit adds, to each TODO keyword, an
additional class named after the keyword. For example:
<span class="todo WAITING">WAITING</span>
So each todo keyword gets class "todo" or "done" depending on which
general type it is. And in addition it gets itself as class.
So go to your CSS file and configure like this:
.todo { font-weight:bold; }
.done { font-weight:bold; }
.TODO { color:red; }
.WAITING { color:orange; }
.DONE { color:green; }
Thanks to Sebastian Rose for the multiple-classes trick.
William Henney writes:
Consider a structure like this:
* first
** second
*** third
**** fourth
Currently, if I export the "third" sub-tree to html (via "C-c @
C-x C-e h"), then "third" becomes an <h1> heading, but "fourth"
becomes an <h5> heading. I would rather it were <h2>, i.e. that
all heading levels be relative to the root of the sub-tree. Is
there any way to achieve this?
This was not possible so far, but this commit measures the first
headline of the subtree and applies an offset to all level values.
The id for the footnotes div is now called "text-footnotes", not
"footnotes-text", to be more consistent with other divs used in
Org-mode.
Requested by Sebastian Rose.
There were two bugs:
1. Timestamp processing did not honor the setting of
`org-export-with-timestamps' in the text before the first
headline.
2. When `org-export-with-timestamps' was nil, time stamps were removed
even in tables. I think this is incorrect, so in tables, time
stamps are now never removed.
Two new variables, `org-export-html-inline-image-extensions' and
`org-export-latex-inline-image-extensions' now define the file
extensions that will be considered for inlining images. The default
for HTML is png, jpg, jpeg, and gif files. The default for LaTeX is
png, jpg, jpeg, and pdf, assuming processing with `pdflatex'.
For LaTeX export, this can lead to conflicts for links that point
to non-image PDF files. To avoid that such a link will be inlined by
accident, always give a description text for such a link, one that is
not equal to the path.
The special first column in some tables was not removed for LaTeX
export. This bug was probably introduces recently, while trying to
fix problems with special characters in LaTeX tables.
Export is now working again properly.
Reported by Giovanni Ridolfi.
The end of the last line of a colon example is not protected, and this
caused the time stamp removal protection to fail if a time stamp was
the last thing in such an example.
Lines preceded by a colon are treated as fixed-width examples.
This commit improves the moment when the protection of these lines
happens during preprocessing. And it enforces that a space must
follow the colon for the line to be treated in this way.
1. Export hangs during LaTeX export. That was a bug using an empty
regular expression that was defined only locally in Org files, but
not in the buffer used by the LaTeX exporter.
2. Underscores in links can get special treatment by the LaTeX
exporter. Now the link is protected from this.
When including s file in example or src markup, you can now also
specify the switches for code references and line numbering that work
also when directly adding SRC or EXAMPLE blocks.
Reported by Manish.
This commit removes some of the stuff that was specific for the LaTeX
exporter, and falls back to the default configuration that works for
all backends.
Here is what the commit does:
- The variable `org-export-latex-remove-from-headlines' is now
obsolete. Instead, also LaTeX export now responds to the settings
in the variables org-export-with-todo-keywords',
`org-export-with-priority', and `org-export-with-tags' and in the
corresponding OPTION settings.
- Removal of time stamps and related keywords now already happens in
the preprocessor, so that it will be perfectly the same for all
backends.
- The list functions have been extended to accept an additional
parameter list, to overrule the default setting for a particular
list function. This is used to make the checkbox appearance in
LaTeX configurable, through the new variable
`org-export-latex-list-parameters'.
This patch introduces more hooks for preprocessing the export buffer,
at various strategic moments. See the Changes.org file for a
description of the hooks.
Org-mode allows multiple references to the same footnote. However,
the HTML exporter cannot use the same name for all these references,
because names have to be unique. This patch appends numbers to
footnote reference names, to make sure they remain unique.
The dark side of this patch means that from the footnote definition,
there is only a single link, to the first reference of the note.
However, in a browser you can always press BACK to go back after
jumping to a footnote definition.
This patch covers the three main backends, html, latex, and ascii. It
adds the code to make sure the coderef links identified by the
preprocessing will be implemented correctly when a backend does its work.