* org.el (org-latex-create-formula-image-program): New option
to use either dvipng or imagemagick to convert and preview
LaTeX fragments.
(org-preview-latex-fragment, org-format-latex): Handle the new
option.
(org-create-formula-image-with-dvipng): Rename from
`org-create-formula-image'.
(org-create-formula-image-with-imagemagick): New defun to
handle LaTeX preview with imagemagick.
(org-latex-color, org-latex-color-format): New defuns to
handle color conversions.
* org-latex.el (org-latex-to-pdf-process, org-export-as-pdf):
Allow to use imagemagick to convert LaTeX fragments.
* org-html.el (org-export-html-preprocess): Ditto.
* org-exp.el (org-export-with-LaTeX-fragments): Ditto.
* org.texi (@LaTeX{} fragments): Document imagemagick as an
alternative to dvipng.
* lisp/org-html.el (org-export-as-html): Remove the check for
body-only in the code for generating tables of contents.
The docstring for org-export-as-html states that the body-only flag
removes everything outside the <body></body> tags (inclusive). Since
the table of contents is inside these tags, it should be exported when
requested even if the body-only flag is set.
* org-html.el (org-export-html-preamble-format)
(org-export-html-postamble-format): Improve the docstring.
* org.texi (HTML preamble and postamble): Small doc improvement.
Thanks to Zachary Jones who asked for this.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.
This commit also bumps the version number to 7.8.06.
The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.
This commit reverts back the maint branch to its state before
merging the master branch. From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
* org-html.el (org-export-html-preamble)
(org-export-html-postamble): Fix docstrings.
(org-export-as-html): Insert the string used by a custom
function for `org-export-html-pre/postamble'.
The documentation is now in sync with the behavior: a custom
function for `org-export-html-pre/postamble' takes no argument,
and its value is inserted as a string. Before that, users had
to use (insert ...) constructs to insert content in the preamble
through a custom function.
Thanks to Bill Jackson for spotting these inconsistencies.
* org-html.el (org-export-as-html): Fix bug when inserting the
output of a custom function for the pre/postamble.
Thanks to Bill Jackson for raising a related issue.
* org-html.el (org-export-as-html): Apply
`org-export-html-get-todo-kwd-class-name' to the class
attribute of the todo-keyword span tag, not to its text content.
The problem was that special characters in todo keywords were being
replaced by underscore. This was meant to happen to the class
attributes set around them.
TINYCHANGE
This only swaps two arguments to a concat.
* org-html.el (org-export-as-html): Convert special characters
in meta tag "author", "date", "keyword" and "description".
Thanks to Pavel Panchekha for raising this issue.
* lisp/org-latex.el (org-export-as-latex): Turn off auto-insert and
set TeX-master to t when creating new TeX buffers.
* lisp/org-docbook.el (org-export-as-docbook):
* lisp/org-html.el (org-export-as-html): Turn off auto-insert
when creating new buffers.
* lisp/org-docbook.el (org-export-as-docbook): Fix regexp.
* lisp/org-html.el (org-export-as-html): Fix regexp.
The erroneous regexp would identify the string " *" as an headline.
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
regexp. Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
regexp. Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp. Also
use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text. Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.
This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
Additionally, replace one
(or (org-mode-p) (derived-mode-p 'org-mode))
with
(derived-mode-p 'org-mode)
cause that is reflexive anyway (returns true, if the current mode is
org-mode).
Delete one check testing for org-mode or org derived mode
* lisp/org-exp.el (org-store-forced-table-alignment): Parse
the column cookie for both alignment and width specification.
Store the resulting value in `org-col-cookies' property.
Retire the previously used `org-forced-aligns' property for
consistency. Renamed local variable `aligns' to `cookies'.
* lisp/org-html.el (org-format-org-table-html): Use
`org-col-cookies'. Renamed local variable forced-aligns to
col-cookies.
This is a preparatory patch. A backend can look at the colwidth
specification and (at it's discretion) use it to control relative
sizes of individual columns in a table. At this moment, it is unclear
whether the widths used to control the display of table in Org buffer
can be overloaded to also control the formatting of table in a
backend.
Refer following discussion with Matt Price:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01053.html
* org-html.el (org-html-handle-links): Remove unnecessary protection
markers when publishing link in default format.
Left-over from the mess that was 7.5's HTML export.
* org-html.el (org-html-handle-links): Remove unnecessary link
unescape.
PATH is already unescaped and should never be escaped twice. Big
thanks to Jambunathan K for analyzing the problem.
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
* lisp/org-inlinetask.el (org-inlinetask-export-templates):
Fixed template for html so that the exported file is valid
xhtml. Added template for odt.
(org-inlinetask-export-handler): Fix typo in the regexp that
trims content. Make sure that the content is flanked by
paragraph boundaries on either side.
* lisp/org-html.el (org-export-html-style-default): Add style
for inlinetask.
* contrib/lisp/org-xhtml.el (org-export-xhtml-style-default):
Add style for inlinetask.
* contrib/odt/styles/OrgOdtStyles.xml: Added following custom
styles: OrgInlineTaskHeading and OrgInlineTaskFrame.
* contrib/lisp/org-odt.el (org-odt-format-textbox)
(org-odt-format-inlinetask): Added
Refer following threads:
1. http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00238.html
2. http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00154.html
Thanks to Suvayu Ali for reporting this issue and suggesting
improvements.
This is needed for the HTML file to interact correctly with
org-info.js. On the long term, the title should be part of
the preamble, but this requires work on org-info.js.
* org-html.el (org-export-html-preamble-format): New default
for the HTML preamble: don't include the title. Also improve
the docstring.
(org-export-html-postamble-format): Improve the docstring.
(org-export-as-html): Add the title within the "content" div.
This is necessary for interaction with the org-info.js script.
`org-export-html-divs' contains '("preamble" "content" "postamble")
and is used to define the <div "%s"> for this parts of the HTML file.
This commit also obsolete some variables that are not useful anymore
as the file time-stamp can (should) be inserted through the postamble
or the preamble instead.
Thanks to Sébastian Vauban for a preliminary version of this patch!
* org-html.el (org-export-html-with-timestamp)
(org-export-html-html-helper-timestamp): These are obsolete
variables as of Org version 7.7 as you can already export the
timestamp from the preamble or the postamble.
(org-export-html-before-content-div): Delete variable.
(org-export-html-content-div): obsolete variable as of 7.7.
(org-export-html-divs): New variable to define divs used in
HTML export.
(org-export-as-html): Now the preamble and the postamble are
surrounded by a <div ...>. The name of the div is defined
through `org-export-html-divs'.
Use `org-outline-regexp' instead or `outline-regexp'. Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.
* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.
* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.
* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.
* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.
* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.
* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.
* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.
* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.