* contrib/lisp/org-odt.el
(org-odt-embedded-formulas-count):New variable.
(org-odt-init-outfile): Reset above variable.
(org-odt-is-formula-link-p, org-odt-format-inline-formula)
(org-odt-copy-formula-file, org-export-odt-format-formula)
(org-export-odt-do-format-formula)
(org-export-odt-do-format-numbered-formula): New functions for
formatting mathml file links as embedded ODF formulae.
(org-odt-format-org-link): Add check for links to mathml files
and call `org-odt-format-inline-formula'.
(org-export-odt-format-image): Update function signature. Use
`org-latex-src' property to identify latex dvipng images. Use
the (to be committed) `org-latex-src-embed-type' to identify
whether the equation image should be inlined or displayed.
(org-odt-format-textbox): Modified to accomodate correct
formatting of captioned formula.
(org-odt-format-inlinetask): Modified to accomodate changes to
the previous function.
(org-export-odt-do-format-image): Minor change.
(org-export-odt-do-preprocess-latex-fragments): When LaTeX
fragment option is set to `t' or `mathjax' check for
availability of latex to mathml converter using (to be
committed) `org-format-latex-mathml-available-p'. If such a
converter is available and configured, use it. Otherwise
default to the earlier behaviour.
Refer the following post for more information:
http://article.gmane.org/gmane.emacs.orgmode/46712
* contrib/lisp/org-odt.el (org-odt-format-frame): New.
(org-odt-format-textbox): Use the above function.
(org-export-odt-do-format-image): Use the above two functions.
Use the new custom styles for the Frame and Graphics elements.
(org-odt-image-attrs-from-size): Remove this.
* contrib/odt/styles/OrgOdtAutomaticStyles.xml: Removed all
Frame and Graphics entries.
* contrib/odt/styles/OrgOdtStyles.xml: Added following custom
styles - OrgSimpleGraphics, OrgCaptionedGraphics,
OrgCaptionFrame, OrgInlineGraphics and OrgInlineFormula.
* contrib/lisp/org-odt.el (org-odt-format-date): %:z format
specifier of `format-time-string' is not portable. Replace it
with an equivalent implementation using %z specifier.
Thanks to Anton Tarasenko for reporting this bug and verifying
this fix. See
http://lists.gnu.org/archive/html/emacs-orgmode/2011-09/msg00099.html
* contrib/lisp/org-odt.el (org-odt-embedded-images-count): New
variable.
(org-odt-copy-image-file): Use the above variable to name the
embedded image files. Remove some cruft as well.
(org-export-odt-file-list, org-export-odt-save-list): Removed.
(org-odt-init-outfile, org-odt-save-as-outfile): Related changes.
* contrib/lisp/org-odt.el (org-export-odt-manifest-lines):
Removed.
(org-odt-update-manifest-file): Removed.
(org-odt-create-manifest-file-entry)
(org-odt-write-manifest-file): New function.
(org-odt-manifest-file-entries): New variable.
(org-odt-manifest-file-entry-tag): Updated.
(org-odt-init-outfile): Don't create manifest.xml here. Don't
create Pictures directory so early in the export. Reset
`org-odt-manifest-file-entries'.
(org-odt-save-as-outfile): Modified. Use
`org-odt-create-manifest-file-entry' and
`org-odt-write-manifest-file'.
(org-odt-copy-image-file, org-odt-update-meta-file)
(org-odt-copy-styles-file): Use
`org-odt-create-manifest-file-entry'.
Rationalized creation of Manifest file entries. New entries are
created right at the point where new files are added to the odt file.
* contrib/lisp/org-odt.el (org-odt-init-outfile): Don't create
mimetype file here.
(org-odt-save-as-outfile): Create mimetype file here. Note
that this routine gets called towards the end of the export
just before files are zipped.
* contrib/lisp/org-odt.el
(org-odt-init-outfile): Don't create meta.xml here.
(org-odt-update-meta-file): Create and update meta.xml here
instead. Note that this routine gets called just before the
component files are zipped.
(org-export-odt-meta-lines): Remove it. Not needed any longer.
(org-odt-save-as-outfile): No need to create backup files
while saving xml buffers.
* contrib/lisp/org-lparse.el (org-lparse-format-table-row): In
list-tables, require that the header row be a row with max
number of columns. Abort export if this condition is not met.
* contrib/lisp/org-xhtml.el (org-xhtml-end-table): During
export of list-tables, `org-xhtml-format-table-no-css' is not
bound. In such cases pretend that it's value is nil.
* contrib/lisp/org-lparse.el
(org-lparse-list-table:table-cell-open): New variable.
(org-lparse-begin-list-table:table-cell)
(org-lparse-end-list-table:table-cell): New routines. Use
`org-lparse-begin-collect' and `org-lparse-end-collect' to get
a string representation of a multi-line table cell.
(org-lparse-list-table-p, org-lparse-list-level)
(org-lparse-list-item-count, org-lparse-list-stack)
(org-lparse-list-table:table-cell-open)
(org-lparse-list-table:table-row)
(org-lparse-list-table:lines): New variables to keep track of
the state of the list at a point in time during export.
(org-do-lparse): Init above variables.
(org-lparse-begin-list, org-lparse-end-list)
(org-lparse-begin-list-item, org-lparse-end-list-item):
Modified so that list marked as list-table are exported as a
table. Refer notes in the file for more information.
(org-lparse-do-format-list-table): Make sure that `org-table'
is loaded.
* contrib/lisp/org-odt.el (org-odt-format-table-cell): Table
cells are list-tables are already paragraphs. No need to
enclose them in paragraphs again.
* contrib/lisp/org-odt.el
(org-odt-entity-control-callbacks-alist): Added an entry for
TABLE-CELL.
(org-odt-begin-paragraph, org-odt-format-stylized-paragraph):
Honour `org-lparse-current-paragraph-style'.
(org-odt-begin-table-cell, org-odt-end-table-cell): Factored
out from the earlier `org-odt-format-table-cell'. Note that
these functions set and reset
`org-lparse-current-paragraph-style'.
(org-odt-format-table-cell): Use the above functions.
* contrib/lisp/org-lparse.el
(org-lparse-current-paragraph-style): New variable.
(org-do-lparse): Init the above variable at the beginning of
export.
* contrib/lisp/org-odt.el
(org-odt-get-paragraph-style-cookie-for-table-cell)
(org-odt-get-style-name-cookie-for-table-cell): Factored out
from `org-odt-format-table-cell'.
(org-odt-format-table-cell): Simplified using above functions.
* contrib/lisp/org-lparse.el (org-lparse-footnote-buffer):
Deleted. Genericized as `org-lparse-collect-buffer'.
(org-lparse-output-buffer): Added docstring.
(org-lparse-collect-buffer): New variable. Was
`org-lparse-footnote-buffer' till now.
(org-lparse-collect-count): New variable to aid in asserting
implicit assumptions made by the export engine.
(org-lparse-begin-collect): New function. Factored out from
`org-lparse-begin-footnote-definition'.
(org-lparse-end-collect): New function. Factored out from
`org-lparse-end-footnote-definition'.
(org-lparse-begin-footnote-definition)
(org-lparse-end-footnote-definition): Use above functions.
(org-do-lparse): Reset `org-lparse-collect-buffer' and
`org-lparse-collect-count' at the beginning of export.
Cleanup `org-lparse-collect-buffer'.
* contrib/lisp/org-xhtml.el (org-xhtml-end-export): Removed
references to `org-lparse-footnote-buffer'.
* contrib/lisp/org-lparse.el (org-lparse-list-table-enable):
New customizable variable.
(org-lparse-preprocess-after-blockquote-hook): New hook to
treat #+begin_list-table...#+end_list-table blocks specially.
Add this hook to
`org-export-preprocess-after-blockquote-hook'.
(org-lparse-list-table-p): New variable. Bound during
`org-do-lparse'.
(org-lparse-begin-environment, org-lparse-end-environment):
Set `org-lparse-list-table-p' as the engine moves in and out
of list-table blocks.
(org-do-lparse): Bind `org-lparse-list-table-p' to nil on
start of export. Honor
ORG_LIST-TABLE-START...ORG-LIST-TABLE-END environment.
Actual export of list as table is not implemented yet.
* contrib/lisp/org-lparse.el (org-lparse-do-format-org-table):
Modified. Delete some local variables and move it to
`org-lparse-do-format-list-table'
(org-lparse-do-format-list-table): Modified as above.
* contrib/lisp/org-lparse.el
(org-lparse-do-format-list-table): New. Factored out from
`org-lparse-do-format-org-table'.
(org-lparse-do-format-org-table): Use above function.
(org-lparse-format-list-table): New. Wrapper for
`org-lparse-do-format-list-table'. For future use.
* contrib/lisp/org-lparse.el
(org-lparse-org-table-to-list-table): New. Factored out from
`org-lparse-do-format-org-table'.
(org-lparse-do-format-org-table): Use
`org-lparse-org-table-to-list-table'.
* contrib/lisp/org-xhtml.el
(org-export-xhtml-do-preprocess-latex-fragments): Factored out
from the earlier org-export-xhtml-preprocess.
(org-export-xhtml-preprocess-latex-fragments): Check if
backend is xhtml. If yes, delegate to
org-export-xhtml-do-preprocess-latex-fragments. This is hooked
to org-export-preprocess-after-blockquote-hook.
(org-export-xhtml-preprocess-label-references): Factored out
from the earlier org-export-xhtml-preprocess.
(org-export-xhtml-preprocess): Call
org-export-xhtml-preprocess-label-references. Note that
processing of latex fragments is no longer done here.
(org-xhtml-format-image): Honor captions, label and attributes
even for images that are created by latex fragment processing.
(org-xhtml-unload-function): Unhook from
org-export-preprocess-after-blockquote-hook.
Thanks to Myles English for registering this requirement.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01116.html
* contrib/lisp/org-xhtml.el: require html (temporarily). This
makes sure that variables such as org-export-html-extension
etc referenced in org-exp.el and made available through
opt-plist are properly inited. Can be removed once the
org-export-xhtml namespace is annihilated.
* contrib/lisp/org-lparse.el (org-lparse-format-table): Export
of table.el tables were broken. Fix it. Can be removed once
the xhtml backend is annihilated.
* contrib/lisp/org-odt.el
(org-export-odt-do-preprocess-latex-fragments): Renamed from
org-export-odt-preprocess-latex-fragments.
(org-export-odt-preprocess-latex-fragments): Check that
backend is odt. If yes, delegate to
org-export-odt-do-preprocess-latex-fragments.
* contrib/lisp/org-lparse.el (org-do-lparse): let-bind
org-lparse-opt-plist to current export options.
* contrib/lisp/org-odt.el
(org-odt-begin-office-body): Add a directive so that Equations
can be sequentially numbered.
(org-export-odt-preprocess): Removed call to
org-export-odt-preprocess-latex-fragments.
(org-export-odt-preprocess-latex-fragments): Fix signature and
hook it to org-export-preprocess-after-blockquote-hook. Use
org-lparse-opt-plist.
(org-odt-unload-function): Leave no trace in
org-export-preprocess-after-blockquote-hook.
Thanks to Myles English for registering this requirement.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01116.html
* contrib/lisp/org-odt.el (org-export-odt-format-image): Honor
captions, label and attributes for all images including those
generated from latex fragments.
* contrib/lisp/org-odt.el
(org-export-odt-preprocess-latex-fragments)
(org-export-odt-preprocess-label-references): New
routines. Factored out of the earlier
org-export-odt-preprocess.
(org-export-odt-preprocess): Use above functions.
Preparing for enabling of captions and labels for latex fragments
embedded as images.
* contrib/lisp/org-odt.el (org-odt-end-table): Associate table
columns with `OrgTableColumn' style.
(org-odt-format-source-code-or-example): Delete trailing
whitespace.
* contrib/odt/styles/OrgOdtAutomaticStyles.xml: Modify
`OrgTable' style to use a relative width of 90%. Effective
table width is now increased so that tables are not
congested. There could be a reverse problem of they being too
big. This is OK. Introduced `OrgTableColumn' style and force
the columns to use the same width.
Fixes the following symptoms - congested table and uneven
columns - seen with the below report..
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01053.html
Table cookies can specify default column width. These could be
used for finer control of column widths on per-table
basis. However this introduces the need to create automatic
column styles for each and every column that is explicitly
sized. The exporter has so far avoided creating of automatic
styles `on the go' and instead relied on a custom styles for
formatting. If column-widths are made user-controllable then
this has to change and the exporter could become a bit
inelegant. Is the overhead worth it?
* contrib/lisp/org-odt.el
(org-odt-configure-outline-numbering): Fixed a bug with
outline numbering. Also removed the check for
org-export-odt-factory-settings (for now).
* contrib/lisp/org-lparse.el (org-do-lparse): Bind
hfy-user-sheet-assoc.
* contrib/lisp/org-odt.el
(org-export-odt-default-org-styles-alist): Rename
OrgSourceBlock to OrgSrcBlock for consistency.
(org-odt-format-source-code-or-example): Modified. Call either
org-odt-format-source-code-or-example-plain or
org-odt-format-source-code-or-example-colored.
(org-odt-format-source-code-or-example-plain): New. Identical
to the earlier org-odt-format-source-code-or-example.
(org-odt-format-source-code-or-example-colored): New
defun. Use htmlfontify for emitting coloring of source blocks.
(org-export-odt-use-htmlfontify)
(org-export-odt-create-custom-styles-for-srcblocks): New
customizable variables
(org-src-block-paragraph-format): New variable.
(org-odt-hfy-face-to-css)
(org-odt-insert-custom-styles-for-srcblocks): New defuns.
(org-odt-save-as-outfile): Modified. Use
org-odt-insert-custom-styles-for-srcblocks.
* contrib/odt/styles/OrgOdtStyles.xml: Rename the style
`OrgSourceBlock' to `OrgFixedWidthBlock'.
* contrib/lisp/org-odt.el
(org-export-odt-default-org-styles-alist): Map fixedwidth
paragraphs to the custom style `OrgFixedWidthBlock'.
(org-odt-format-line, org-odt-format-source-code-or-example):
Style both fixedwidth paragraphs and src/example blocks in
fixedwidth format.
* contrib/lisp/org-odt.el (org-export-odt-prettify-xml): New
customizable variable.
(org-odt-save-as-outfile): Honor the setting of the above
variable.
There have not been much reported issues with the odt output. So turn
off prettifying of xml buffers. But retain the option to turn it on
if required.
* contrib/lisp/org-odt.el (org-odt-format-spaces): Minor
change. Always emit a leading space.
(org-odt-fill-tabs-and-spaces): Simplify.
(org-odt-finalize-outfile): Remove a stray message.
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.
* contrib/lisp/org-lparse.el (org-do-lparse): Add new let
bound variable org-lparse-list-level.
(org-lparse-begin-list, org-lparse-end-list): New functions.
(org-lparse-export-list-line, org-lparse-begin-level)
(org-lparse-end-level): Use new functions.
* contrib/lisp/org-odt.el (org-odt-begin-list): Fixed
signature so that it is consistent with how org-lparse library
invokes it. Forcibly emit text:continue-numbering="false"
attribute for the top-level <text:list> element. This fixes
numbering issue found during odt to doc conversion. See
http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/14739
(org-odt-begin-list-item, org-odt-end-list-item): Use
org-lparse-begin-list and org-lparse-end-list.
* contrib/lisp/org-xhtml.el (org-xhtml-format-toc-item)
(org-xhtml-begin-toc, org-xhtml-end-toc): Use
org-lparse-begin-list and org-lparse-end-list.
(org-xhtml-begin-list): Fixed signature so that it is
consistent with how org-lparse library invokes it.
* contrib/lisp/org-lparse.el (org-lparse-and-open)
(org-lparse-register-backend, org-lparse-format-table)
(org-lparse-begin, org-lparse-end): Checkdoc related fixes.
(org-lparse-get-converter): Added
(org-lparse-get-other-backends, org-lparse-all-backends):
Re-implemented. Also improved docstring.
(org-lparse): Make use of improvements in the converter
routines. Improve the following: a) gathering of
target-backend and native-backend args during interactive
calls b) error handling.
(org-lparse-convert): Introduced prefix arg for opening of
converted files. Make use of improvements in the converter
routines. Improve error handling.
(org-lparse-convert-processes): New customizable variable.
(org-lparse-convert-process): Make it customizable. Set
default value to nil.
(org-lparse-convert-capabilities): New customizable variable.
(org-lparse-use-flashy-warning): Fix group and improve docstring.
* contrib/lisp/org-odt.el (org-odt-get): Don't set
CONVERT-METHOD and OTHER-BACKENDS options. Fallback to the
global converter settings for now.
(org-export-odt-preferred-output-format): New variable
(org-export-as-odt-and-open, org-export-as-odt): Use the
afore-mentioned variable.
* contrib/lisp/org-xhtml.el (org-xhtml-get): Don't set
CONVERT-METHOD and OTHER-BACKENDS options. Fallback to the
global converter settings for now.
* contrib/lisp/org-odt.el (org-export-odt-save-list): Add the
file "mimetype".
(org-odt-init-outfile): Write contents of "mimetype".
(org-odt-save-as-outfile): Include "mimetype" file in the
exported file.
(org-export-odt-mimetype-lines): Removed.
This change knocks of an error while validating against
http://tools.services.openoffice.org/odfvalidator/.
* contrib/lisp/org-odt.el (org-odt-format-org-entity):
Simplify. Component xml files in odt document are always
utf-8 encoded. As a result, emitting of numeric character
references based on utf-8 value is superfluous.
* contrib/lisp/org-odt.el (org-odt-get): Set
CODING-SYSTEM-FOR-WRITE and CODING-SYSTEM-FOR-SAVE to 'utf-8
irrespective of buffer-file-coding-system.
Fixes issue reported by Renzo Been in the following post.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-07/msg00795.html
Use `org-outline-regexp' or `org-outline-regexp-bol' instead.
* org-toc.el (org-toc-before-first-heading-p, org-toc-show)
(org-toc-get-headlines-status): Use `org-outline-regexp-bol'.
* org-lparse.el (org-do-lparse): Use `org-outline-regexp-bol'.
* org-export-generic.el (org-export-generic): Use
`org-outline-regexp'.
* contrib/lisp/org-lparse.el (org-lparse-native-backends): Set
default value to nil. Also update docstring.
(org-lparse-register-backend): New
* contrib/lisp/org-xhtml.el (org-xhtml-get): Add self -
"xhtml" - as one of the other backends. Call
org-lparse-register-backend on load.
* contrib/lisp/org-odt.el: Call org-lparse-register-backend on
load.
The org-export-* prefix is confusing here, as these functions
seem to be part of org-exp.el. Let's name them by the library
they are in (and rely on) for now -- maybe this will change
when we move the ODT exporter to the core.
* contrib/lisp/org-odt.el (org-odt-data-dir): Update to
reflect new directory layout.
* contrib/lisp/org-xhtml.el
(org-export-xhtml-special-string-regexps): Define it.
This adds these new files:
contrib/lisp/org-lparse.el
contrib/lisp/org-odt.el
contrib/lisp/org-xhtml.el
contrib/odt/BasicODConverter/BasicODConverter-0.8.0.oxt
contrib/odt/BasicODConverter/Filters.bas
contrib/odt/BasicODConverter/Main.bas
contrib/odt/OASIS/OpenDocument-schema-v1.1.rng
contrib/odt/OASIS/OpenDocument-v1.2-cs01-manifest-schema.rng
contrib/odt/OASIS/OpenDocument-v1.2-cs01-schema.rng
contrib/odt/README.org
contrib/odt/etc/schema/od-manifest-schema-v1.2-cs01.rnc
contrib/odt/etc/schema/od-schema-v1.1.rnc
contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc
contrib/odt/etc/schema/schemas.xml
contrib/odt/styles/OrgOdtAutomaticStyles.xml
contrib/odt/styles/OrgOdtStyles.xml
Notes:
contrib/lisp/org-xhtml.el is meant to be merged at some point with
lisp/org-html.el, to avoid code redundancies.
The feature as a whole is meant to move to Org's core when things
are tested and stable enough.
Thanks a lot to Jambunathan for this great contribution and for
his patience!
Interactive-p is an obsolete function as of Emacs 23.2.
`org-called-interactively-p' takes care of the current (x)Emacs
version and use either `interactive-p' (for XEmacs and Emacs<23.2)
or `called-interactively-p'.
This patch makes Org-Velocity display search results incrementally, and
implements a more general approach to completion based on dabbrev. The
documentation has also been rewritten.
This new french fr-orgcard is the result of the work of Thierry Stoehr,
Vincent-Xavier JUMEL and others during a french OrgCamp in february 2011.
I slightly edited it (tex accents) to avoid compilation errors. It still
needs a lot of work so that filling is okay on the resulting PDF.
May be already useful though.
* contrib/lisp/org-expiry.el (org-expiry-inactive-timestamps): New option.
(org-expiry-insert-created):
(org-expiry-insert-expiry): Honor `org-expiry-inactive-timestamps'.
Attached is a patch to org-expiry.el in contrib/lisp to allow a
customization of the timestamps inserted by org-expiry for 'CREATED'
and 'EXPIRED' properties.
This patch is what is attached to the message displayed at [1]. I have
been using this patch for a while and it works fine. From searching it
looks like this patch was 'forgotten', but I may have overlooked
something.
If the patch was rejected, you can ignore me. If it was forgotten I'd
like to request to include it.
Thx,
marcel
* contrib/lisp/org-exp-bibtex.el (org-export-bibtex-preprocess): include
hard-coded "<h2>References</h2>" in #+BEGIN_HTML block
I might be missing something, but while in LaTeX export org-exp-bibtex
produces a References header, in HTML export there's nothing -- which
looks a bit odd, particularly in documents with footnotes. Attached is
a patch which simply includes an appropriate header.
Cheers,
Christophe
TINYCHANGE
* lisp/org.el (org-promote):
(org-demote): Turn off after-change-functions to speed up the
reindentation of text.
This is mainly toob-oz: brought up to date with the rest of Babel
Wes Hardaker's generic exported in contrib/lisp needs a small changed to
make it compatible with the :for-backend generic parameter introduced in
commit ed6d676026.
* contrib/lisp/org-mime.el (org-mime-use-property-inheritance): User
configurable variable to control inheritance of MAIL_ properties.
(org-mime-send-subtree): Using new custom variable.
(org-mime-subtree): Using new custom variable.
* contrib/lisp/org-collector.el (org-propview-get-with-inherited): New
function for inheriting explicitly mentioned properties.
(org-propview-collect): Accepts explicitly mentioned properties to
inherit.
Suggested by Niels Giesen.
* contrib/lisp/org-mime.el (lambda): Removing the 'html-ascii hook as
each hook should be used for a single format.
(org-mime-compose): Making use of format specific hooks, and apply
each format hook individually to the body of each mime part as
appropriate.
Thanks to Ethan Ligon for suggesting this functionality.
An example hook such as the following will record when emails have
been composed
(add-hook 'org-mime-send-subtree-hook
(lambda ()
(org-entry-put (point) "mail_composed" (current-time-string))))
* contrib/lisp/org-mime.el (org-mime-send-subtree-hook): Hooks run
in the org-mode subtree when composing an email.
(org-mime-send-buffer-hook): Hooks run in the org-mode buffer when
composing an email.
Thanks to Niels Giesen for suggesting this change.
* contrib/lisp/org-mime.el (lambda): Adding format specific pre-export
hooks.
(org-mime-compose): Call pre-export hooks before export.
Much of this code is reworking of a very nice function shared on the
mailing list by Matt Lundin.
* contrib/lisp/org-mime.el (org-mime-htmlize): Fixed indentation.
(org-mime-try): Short macro for safely checking for properties.
(org-mime-send-subtree): Drops the current subtree into a mail
buffer possible exported and mime-encoded.
(org-mime-send-buffer): Drops the current buffer into a mail
buffer possible exported and mime-encoded.
(org-mime-compose): Exports and mime-encodes a string of org-mode
text for sending via email.
(org-mime-org-buffer-htmlize): Create an email buffer containing the
current org-mode file exported to html and encoded in both html and
in org formats as mime alternatives.
(org-mime-subtree): Create an email buffer containing the current
org-mode subtree exported to a org format or to the format specified
by the MAIL_FMT property of the subtree.
This patch supports org-capture (with fallback to org-remember) for
org-velocity. It also effects some internal changes, principally due to
the use of `Electric-command-loop' to replace an expedient equivalent.
The attached patch adds a new functions org-export-string.
,----
| org-export-string is a Lisp function in `org-exp.el'.
|
| (org-export-string STRING FMT &optional DIR)
|
| Export STRING to FMT using existing export facilities.
| During export STRING is saved to a temporary file whose location
| could vary. Optional argument DIR can be used to force the
| directory in which the temporary file is created during export
| which can be useful for resolving relative paths. Dir defaults
| to the value of `temporary-file-directory'.
`----
This function should be useful in user code, and can already reduce the
amount of code in ob-org.el and org-mime.el.
>From e51017e4d7051aad31384a470f0a695dca0d6716 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Sun, 17 Oct 2010 15:17:13 -0600
Subject: [PATCH] org-export-string -- exports a string of org-mode markup text
* lisp/org-exp.el (org-export-string): new function org-export-string
can be used to convert a string of test in org-mode markup to a
specified format
* contrib/lisp/org-mime.el (org-mime-htmlize): now using new
org-export-string function for exportation
* lisp/ob-org.el (org-babel-execute:org): now using new
org-export-string function for exportation
* Makefile (LISPF): now compiling and installing ob-plantuml.el
* contrib/scripts/.gitignore : ignores the plantuml.jar file, so that
it can be located next to ditaa.jar
* lisp/ob-plantuml.el: adding copyright notice and FSF attribution
(org-plantuml-jar-path): now a defcustom
(org-babel-execute:plantuml): now using org-babel-eval which
displays error messages
* lisp/org.el (org-babel-load-languages): ob-plantuml is now part of
org-babel-load-languages
Followed Wes Hardaker's suggestion to make the translation of
newlines more flexible --- instead of making a boolean for
special translation of blank lines, I added the ability to
specify the translation.
Also added a macro for declaring generic translation keywords
with type information and documentation. Hope this will make
the generic translator easier to use.
Followed Wes Hardaker's idea of permitting alternative rewrites for blank
lines, instead of making the blank line handler be a boolean and
hard-wiring a newline character.
Also added a declaration form, with type and documentation options, for the
keywords used in defining a generic export method.
* contrib/lisp/org-depend.el (org-depend-block-todo): Fix blocking logic.
Paul Sexton writes:
> The value returned by org-depend-block-todo determines whether an item
> is considered "blocked", and thus whether it is shown dimmed (because
> this function is added to org-blocker-hook).
>
> o-d-b-t only returns true in a very limited set of conditions, so very
> often items which should show up as blocked, do not. To be honest I
> don't remember the exact details, but it did not work before I applied
> the patch, and has worked correctly ever since.
* contrib/lisp/org-collector.el (org-read-prop): added a more detailed
comment, changed 2 if stements to 1 cond to make the code more
comprehensible, added
(condition-case nil
(read prop)
(error prop))
instead of
(read prop)
so, if any error occurs during the conversion of prop to lisp
expression - a string will be returned.
#+source: table
#+begin_src emacs-lisp
(mapcar
(lambda (el) (number-sequence el (+ el 3)))
(number-sequence 0 4))
#+end_src
writes the results out as csv file
#+call: write(data=table, file="~/Desktop/example.csv") :results silent
writes the results out as tab separated file
#+call: write(data=table, file="~/Desktop/example.tsv") :results silent
write the results out as a normal org-mode file
#+call: write(data=table, file="~/Desktop/example.org") :results silent
* contrib/babel/library-of-babel.org: more control over exporting
results to files
* contrib/lisp/org-wikinodes.el: New file.
* lisp/org-exp.el (org-export-preprocess-after-radio-targets-hook):
(org-export-define-heading-targets-headline-hook): New hooks.
* lisp/org.el (org-modules): Add entry for org-wikinodes.el.
(org-font-lock-set-keywords-hook): New hook.
(org-open-at-point-functions): New hook.
(org-find-exact-headling-in-buffer):
(org-find-exact-heading-in-directory): New functions.
(org-mode-flyspell-verify): Better cursor position for checking if
flyspell should ignore a word.
Thanks to Ethan Ligon for pointing this out
* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): fixed major
error -- was exporting entire as text/plain mime part, now when
region is active, only that region is exported
* contrib/babel/library-of-babel.org(read): adding explicit format
argument
(gdoc-read): explicit format argument, and passing the csv
specification through to org-table-import
also removing org example code blocks
Anthony Lander wrote:
>[1 <text/plain; US-ASCII (7bit)>]
>This patch fixes an issue with opening AddressBook.app and
>Together.app links.
This is just a reply with the patch attached in a way the
patchtracker[1] will catch it.
-- David
[1] http://patchwork.newartisans.com/project/org-mode/list/
A quick example of accessing remote json data from Babel code blocks.
Evaluate the following to see a listing of parks in DC by ward.
#+source: dc-parks
#+begin_src emacs-lisp :var keys='(ward address) :var data=json(url="http://ogdi.cloudapp.net/v1/dc/RecreationParks?format=json")
(append
(list keys 'hline)
(mapcar
(lambda (lis) (mapcar (lambda (key) (cdr (assoc key lis))) keys))
(cdr (car data))))
#+end_src
we are keeping two things in the contrib directory
1) the library-of-babel.org file, this is with the goal of lowering
the barrier of entry for contribution of functions to the library
of babel
2) we are also keeping a langs directory in the contrib directory
because some language files do not have FSF copyright assignment
-- current org-babel-oz.el is the only such file
* contrib/babel/lisp/org-babel.el (org-babel-where-is-src-block-result):
on result insertion, ensure that code blocks don't overrun
subsequent lines or source blocks
* contrib/babel/lisp/org-babel-exp.el (org-export-blocks-postblock-hook):
adding function to cleanup leftovers after block exportation
(org-exp-res/src-name-cleanup): function to cleanup leftovers from
block exportation
* contrib/babel/lisp/langs/org-babel-latex.el (org-babel-latex-body-to-tex-file):
now calling `org-export-latex-fix-inputenc' to sort out encodings in
latex package list
* contrib/babel/lisp/org-babel.el (org-babel-set-interpreters): less
greedy regexp for inline source blocks ensures that there is no
confusion when two inline blocks are on the same line.
e.g. placing the following at the top of your buffer
will result in all source-code blocks in the buffer having their
:session header argument set to "example"
* contrib/babel/lisp/org-babel-lob.el (org-babel-lob-execute): now
included buffer-wide header arguments in lob header arguments
* contrib/babel/lisp/org-babel.el (org-babel-params-from-buffer): new
function for grabbing header arguments from the top of the buffer
(org-babel-parse-src-block-match): now includes buffer-wide header
arguments
(org-babel-parse-inline-src-block-match): now includes buffer-wide
header arguments
(org-babel-current-buffer-properties): buffer-local variable to hold
buffer-wide header arguments
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-lob-one-liners):
exportation of #+lob and #+call type lines is now correctly handling
the addition of the indentation information to the info list
* contrib/babel/lisp/org-babel-lob.el
(org-babel-lob-one-liner-regexp):
(org-babel-lob-get-info):
(org-babel-lob-execute):
all org-babel elements should now work when indented
* contrib/babel/lisp/org-babel-ref.el
(org-babel-ref-at-ref-p):
all org-babel elements should now work when indented
* contrib/babel/lisp/org-babel.el
(org-babel-set-interpreters):
(org-babel-execute-src-block):
(org-babel-expand-src-block):
(org-babel-get-src-block-info):
(org-babel-hash-at-point):
(org-mode-hook):
(org-babel-parse-src-block-match):
(org-babel-where-is-src-block-result):
(org-babel-read-result):
(org-babel-insert-result):
(org-babel-result-end):
all org-babel elements should now work when indented
Thanks to Sébastien Vauban for pointing this out -- as well as the
previous babel commit :)
* contrib/babel/lisp/org-babel.el (org-babel-insert-result):
results are now indented to the level of any existing #+results
line.
* contrib/babel/lisp/org-babel-ref.el (org-babel-ref-resolve-reference):
now able to recognize #+tblname, #+resname and #+results lines which
do not start on column 0
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-inline-src-blocks):
only evaluate inline source code blocks if they do not appear in a
verbatim or quoted context
(org-babel-in-example-or-verbatim): check if the point is currently
located in a verbatim or quoted context
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-results):
removing forced verbatim '=' tags from around inline source code
results, if users want their results displayed in this way they can
add the '='s easily themselves, but there is no way to remove '='s
inserted automatically by Org-babel.
this is required because in the temporary org-mode file used during
export code blocks may be removed entirely leading to unresolved
references
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-src-blocks):
expanding noweb references during export now takes place in the
pre-export buffer
(org-babel-exp-inline-src-blocks): expanding noweb references during
export now takes place in the pre-export buffer
(org-babel-exp-results): ensure that the expanded body is passed
through to org-babel-execute-src-block
Thanks to Tom Dye for pointing out the need for this fix
* contrib/babel/lisp/org-babel.el (org-babel-expand-noweb-references):
now able to find noweb references even outside of the narrowed
portion of the buffer when the buffer is narrowed
* contrib/babel/lisp/org-babel-ref.el (org-babel-ref-resolve-reference):
now able to resolve references which are located outside of the
narrowed portion of the buffer when the buffer is narrowed
Thanks to Graham Smith for pointing out the need for in-place
results updates
* contrib/babel/lisp/org-babel.el (org-babel-merge-params): adding
append and prepend as exclusive options to the :results header
argument
(org-babel-insert-result): now updating results in place, and
honoring the `prepend' and `append' :results header arguments
* contrib/babel/lisp/org-babel.el (org-babel-header-arg-names): adding
:noeval header argument which can be specified to inhibit the
execution of a source block during export.
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-do-export):
adding :noeval header argument which can be specified to inhibit the
execution of a source block during export.
* contrib/babel/lisp/org-babel-comint.el (org-babel-comint-with-output):
Placing a more general regexp substitution for matching newlines
returned by comint. This new option should definitely cover all
cases.
* contrib/babel/lisp/org-babel-comint.el (org-babel-comint-with-output):
If there is dangling text left after the process mark in a comint
buffer, it will now be safely stored away during babel execution,
and then replaced when babel is finished with the buffer.
This commit also fixes some indentation issues.
* contrib/babel/lisp/langs/org-babel-ruby.el (org-babel-ruby-initiate-session):
Adding a small wait after stating a new ruby session. This avoids
errors with `ansi-color-process-output' not being able to find the
process mark.
* contrib/babel/lisp/org-babel.el (org-babel-insert-result): Replaced
call to `org-cycle' with a call to the simpler and more appropriate
`org-table-align'.
* contrib/babel/library-of-babel.org (Read/Write): adding
library-of-babel functions for file I/O
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-do-export):
This brings babel more inline with Sweave, by ensuring that any code
block which could change the state in a persistent session is
executed. Prior to this change the following org-mode text like would
not export as expected because the x variable would not be
initialized.
** inline expressions
:PROPERTIES:
:session: *R*
:END:
#+begin_src R :exports code :results silent
x<-5
#+end_src
the sum of 1 and 4 is equal to src_R{x}
* contrib/lisp/org-special-blocks.el (org-special-blocks-make-special-cookies):
Emacs 22 doesn't have string-match-p
* lisp/org-freemind.el (org-freemind-write-mm-buffer):
(org-freemind-get-node-style):
Emacs 22 doesn't have string-match-p
* lisp/org-html.el (org-html-make-link):
Use new org-string-match-p for compatibility
* contrib/babel/lisp/org-babel-tangle.el (org-babel-spec-to-string):
The insertion of automatically generated comments into tangled code
is now customizable through the `org-babel-tangle-w-comments'
variable.
* contrib/babel/lisp/org-babel.el
(org-babel-params-from-properties):
Check for language-specific header arguments
(org-babel-parse-src-block-match):
Pass lang parameter when checking properties for header args
(org-babel-parse-inline-src-block-match):
Pass lang parameter when checking properties for header args
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On May 17, 2010, at 4:39 PM, Michael Sperber wrote:
>
>> In particular, fixing the require won't be enough: org-babel-python.el
>> uses `run-python' and interacts with the inferior Python, whereas
>> python-mode.el defines `py-shell'.
>>
>> Should I try to abstract over the differences?
>
> Yes, this would be much appreciated. (I think, Eric or Dan?)
OK, I've attached a patch that makes `org-babel-python' work on XEmacs.
Most of the issues are pure XEmacs issues. Notes:
- XEmacs doesn't have [[:digit:]] - I hope to rectify this in the
future, but it seems there's no downside in this particular case to
replacing by [0-9].
- XEmacs doesn't have `move-end-of-line', but does have `end-of-line'.
I don't understand the intent of having both of these, but the code
seems fine with `end-of-line'.
- It seems there are way too few `require's throughout org-babel. I
don't know if it's OK to add the ones I needed.
- `org-babel-python-evaluate' looked broken as-is: It doesn't use the
`body' argument properly, the result is (I think) processed in the
wrong order and not properly split into lines. I've fixed all these,
but a review is probably in order.
Currently, this uses the presence of a temporary file to signal that
Matlab Emacs Link evaluation is not yet complete.
Emacs Link support added in collaboration with Christopher Long.
To use EmacsLink, the user will need to set
org-babel-matlab-with-emacs-link to a non-nil value, and also arrange
that (matlab-with-emacs-link) evaluates to a non-nil value.
Added a handler for blockquotes.
Also added :body-newline-paragraph to the org-set-generic-type. This is
intended to help handling output formats (like tikiwiki) where newlines are
treated as paragraph separators, instead of being used to fill (i.e., the
destination is expected to do the word-wrapping). If this is set to T then
org-export-generic will emit a newline character when it sees a blank
line. This should be used in concert with a value like "%s " for
:body-line-format and nil for :body-line-wrap.