Commit Graph

9637 Commits

Author SHA1 Message Date
David Maus 4b84ca41d7 Don't format tags in title if title headline does not have tags
* org-exp.el (org-export-get-title-from-subtree): Don't format tags in
title if title headline does not have tags.

Fixes a bug reported by John Hendy in
<CA+M2ft_UnBVfUbmoUX6J2MY7e_9w+7an5n23rAarpnnQnaV=ZA@mail.gmail.com>.
2012-02-19 08:05:48 -07:00
Bastien Guerry 2bbb8b99f4 org.el: Fix bug: hide drawers in inline tasks too.
* org.el (org-cycle-internal-local): Fix bug: hide drawers in
inline tasks too.
2012-02-19 08:04:38 -07:00
Jambunathan K 2ac428a21d org-odt.el: Honor "[TABLE-OF-CONTENTS]" directive
* lisp/org-odt.el (org-odt-format-preamble): Don't insert TOC here.
Delay it till the end of export.
(org-odt-begin-document-body): Make a note of the default
position of TOC in `org-lparse-dyn-first-heading-pos'.
(org-odt-insert-toc): Insert TOC as directed by
[TABLE-OF-CONTENTS] line or at the default position.
(org-odt-end-export): Call `org-odt-insert-toc'.

Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00974.html
2012-02-19 08:04:31 -07:00
Bastien Guerry 8c16d85476 org.el: `org-preview-latex-fragment' requires a buffer file name.
* org.el (org-preview-latex-fragment): Throw an error when
called from a non-file buffer.

This take care of this bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3768
2012-02-19 08:04:26 -07:00
David Maus 6bd7c7d042 Don't search for position in existing list if :exact-position
* org-capture.el (org-capture-place-item): Don't search for
position in existing list if :exact-position was supplied.

This fixes a bug reported by François Pinard in
<http://thread.gmane.org/gmane.emacs.orgmode/49995>.
2012-02-19 08:04:20 -07:00
Bastien Guerry 624194dc51 org.el: Fix bug in done headline fontification.
* org.el (org-set-font-lock-defaults): Fix bug in done
headline fontification.

Thanks to Brian J. Carlson for pointing this error and
a solution.
2012-02-19 08:04:10 -07:00
Bastien Guerry 1c73d5a403 org.el: Fix bug in done headline fontification.
* org.el (org-set-font-lock-defaults): Fix bug in done
headline fontification.

Thanks to Brian J. Carlson for pointing this error and
a solution.
2012-02-19 08:03:58 -07:00
Jambunathan K 4da551b600 Honor user-specified width in captioned images
* lisp/org-odt.el (org-odt-format-textbox): Honor user-specified
width in captioned images.

Fix for bug reported here:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00641.html
2012-02-19 08:03:45 -07:00
Jambunathan K e9fd334eb4 Add support for indented tables in ODT export
* etc/styles/OrgOdtContentTemplate.xml
(OrgIndentedSection-Level-*): New section styles. These
sections are indented to the same level as the corresponding
list entries.  These sections hold tables that occur within a
list.
(OrgTable): Increased relative width from 90% to 96% for
aesthetic reasons.

* lisp/org-odt.el (org-odt-table-indentedp): New variable
(org-odt-begin-table): Modified.  If the table is within a
list, temporarily leave the list and begin an indented section
before emitting the table.
(org-odt-end-table): Modified.  If the table was within a
list, close the indented section and re-open the list
immediately after ending the table.
(org-odt-continue-list, org-odt-discontinue-list): Helper
routines to temporarily discontinue and continue a list.
(org-odt-list-stack-stashed): New variable to hold the state
of a pending list.
(org-odt-begin-list, org-odt-begin-list-item)
(org-odt-end-list-item): Modified. Handle nitty-gritties for
continuing a list and list item.
(org-odt-section-count): New variable that keeps track of
section count.  Used in conjunction with naming of sections.
(org-odt-begin-section, org-odt-end-section): New defuns.
(org-odt-init-outfile): Initialize
`org-odt-list-stack-stashed' and `org-odt-section-count'.

* lisp/org-lparse.el (org-lparse-list-item-count): Removed. Was a
superfluous variable.
(org-lparse-list-level): Removed.  Now derived from
`org-lparse-list-stack'.
(org-lparse-list-stack): New.  List that records the list
types - ordered, unordered or descriptive - in the following
order: self, parent, grand-parent etc.
(org-do-lparse): Added, removed above let-bound vars.
Disallowed regular tables within list-table block.
(org-lparse-begin-list, org-lparse-end-list)
(org-lparse-begin-list-item, org-lparse-end-list-item):
Propagate above changes.

OpenDocument doesn't permit tables to occur in the middle of a
list.  Use list continuations and indented sections to typeset
indented tables.

Fixes the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00515.html
2012-02-19 08:03:39 -07:00
Eric Schulte 65f1ae033a fix bug in property list updates
* lisp/org.el (org-update-property-plist): Fix bug in property list
  updates.
2012-02-19 08:03:13 -07:00
Eric Schulte 2b2e853b1b fixed bug in org-babel-balanced-split when run on Emacs22
Thanks to Martyn Jago for the test case

* lisp/ob.el (org-babel-balanced-split): Explicit checking if list
  before calling member.
* testing/lisp/test-ob.el (test-ob/org-babel-balanced-split): Testing
  the new Emacs22-proof behavior.
2012-02-19 08:01:26 -07:00
Eric Schulte 2239d74fd9 Merge branch 'origin-maint' 2012-02-18 14:50:31 -07:00
Eric Schulte 60176c84e5 specify "," as default sqlite output seperator
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Specify the use of ","
  as the separator to `org-table-convert-region'.  Fixes errors when
  only one result per line of output.
2012-02-18 14:49:59 -07:00
Jambunathan K be42548763 org-e-html: Fix crash while exporting to a temp buffer 2012-02-19 03:05:35 +05:30
Eric Schulte 5a24348778 Merge branch 'origin-maint' 2012-02-18 10:39:04 -07:00
Eric Schulte 19f1bf6bce unified stripping of protective commas -- idempotent org-edit-src-code
* lisp/ob.el (org-babel-strip-protective-commas): Use
  `org-strip-protective-commas'.
* lisp/org-exp.el (org-export-select-backend-specific-text): Use
  `org-strip-protective-commas'.
* lisp/org-src.el (org-edit-src-code): Use
  `org-strip-protective-commas'.
* lisp/org.el (org-strip-protective-commas): Single definition for
  this functionality.
2012-02-18 10:38:32 -07:00
David Maus 5e2d781f5a Merge branch 'f/org-capture-prepare-finalize-hook' 2012-02-18 18:27:35 +01:00
Bastien Guerry 2e615798a1 Merge branch 'maint' 2012-02-18 18:21:41 +01:00
Michael Brand 40b3b323f8 manual: fix references to Calc manual
* doc/org.texi: Decapitalize file name in references to Calc manual.

On a case sensitive file system the references from the HTML Org
manual (e. g. the link href="Calc.html#Embedded-Mode" or
href="../Calc/Embedded-Mode.html#Embedded-Mode") to the HTML Calc
manual (e. g. the file calc.html or calc/Embedded-Mode.html) do not
match.
2012-02-18 18:21:32 +01:00
Jambunathan K f1e5dfdbe9 org-export: Put HTML buffers in either nxhtml-mode or nxml-mode
* contrib/lisp/org-export.el (org-export-dispatch): Put
temporary buffer that holds exported HTML source in either
`nxhtml-mode' or `nxml-mode'.

`nxhtml-mode' is *not* part of stock Emacs while `nxml-mode' is.
2012-02-18 22:39:58 +05:30
Jambunathan K 1feac49476 org-e-html: Use prefix consistently and cleanup some code 2012-02-18 22:39:48 +05:30
Eric Schulte ebfef5c0a5 Merge branch 'origin-maint' 2012-02-18 09:26:12 -07:00
Eric Schulte e744db1ad1 mention ob-sqlite in the comments of ob-sql
* lisp/ob-sql.el: Mention ob-sqlite in the comments of ob-sql.
2012-02-18 09:26:02 -07:00
Eric Schulte 9a15619654 Merge branch 'origin-maint' 2012-02-18 09:16:20 -07:00
Sebastien Vauban 2d78957c5c Fix old Babel syntax 2012-02-18 09:15:44 -07:00
David Maus f737fbdc6e New hook: Run before the finalization process starts
* org-capture.el (org-capture-prepare-finalize-hook): New hook. Run
before the finalization process starts.
(org-capture-finalize): Run new hook.
2012-02-18 16:41:30 +01:00
Eric Schulte c67705a708 Merge branch 'origin-maint' 2012-02-18 08:28:50 -07:00
Eric Schulte bf238997a9 Generalize to multiple "prop+" properties.
* lisp/org.el (org-entry-get): Generalize to multiple "prop+" properties.
2012-02-18 08:28:40 -07:00
Eric Schulte 5935b59698 Rebinding org-edit-src-save in the org-src-mode-map.
* lisp/org-src.el (org-src-mode-map): Rebinding org-edit-src-save in
  the org-src-mode-map.
2012-02-18 08:08:24 -07:00
Nicolas Goaziou 0548051357 org-e-publish: Hook e-html back-end into publishing system
* EXPERIMENTAL/org-e-publish.el (org-e-publish-org-to-html): New function.
2012-02-18 14:37:51 +01:00
Bastien Guerry bfcb7f1abc Merge branch 'maint' 2012-02-18 11:48:52 +01:00
David Maus eed72c5556 Use `with-selected-window' to select calendar window
* org.el (org-recenter-calendar): Use `with-selected-window' to select
calendar window and save currently selected window and current buffer.

Fixes a bug reported by Thomas Morgan in <mid:87obsxwpvc.fsf@ziiuu.com>.
2012-02-18 11:21:05 +01:00
Nicolas Goaziou 5fa426bfe2 org-export: Allow to have HTML back-end output in a temporary buffer
* contrib/lisp/org-export.el (org-export-dispatch,
  org-export-dispatch-ui): Add a key to export to a temporary buffer.
2012-02-18 10:11:10 +01:00
Jambunathan K 93ec2c7a50 org-e-html: New HTML exporter - a first attempt
* contrib/lisp/org-export.el (org-export-dispatch)
(org-export-dispatch-ui): Add new entries for the new HTML
exporter.

* EXPERIMENTAL/org-e-html.el: New file.  This is a very rough
cut based out on org-xhtml.el and org-e-latex.el.  The file
retains all the LaTeXisms in either commented form or
otherwise.  This is deliberate so as to have a quick look at
the reference implementation.  Retaining the organization
style of org-xhtml.el would enable easy creation of
org-e-odt.el by simply replacing e-html with e-odt for the
most part.
The changes here covers fairly a good ground - say 90% - of my
unit test file.
2012-02-18 12:25:53 +05:30
Nicolas Goaziou 1cc27e0d3a org-export: allow toggling Babel execution and file inclusion
* contrib/lisp/org-export.el (org-export-as, org-export-to-buffer,
  org-export-to-file): Add an optional argument to prevent including
  files and executing Babel code.

This can be used as a basis for an Org to Org exporter.
2012-02-17 20:48:57 +01:00
Nicolas Goaziou 4b33c23af8 org-export: Make macros recursives
* contrib/lisp/org-element.el (org-element-recursive-objects): Add
  macro object type to recursive types.
(org-element-object-restrictions): Macros can only contain other
macros.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options): Parse
  macro value, unless it it meant to be eval'ed.
(org-export-expand-macro): Expand macros recursively.
2012-02-17 20:20:38 +01:00
Nicolas Goaziou 4d77e6adf6 org-e-ascii: Correctly expand syntax in table cells
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-table): Translate cells
  into ASCII/Latin1/UTF-8 before building back the table.
2012-02-17 18:54:23 +01:00
Nicolas Goaziou 6782d6f77b Fix infloop when parsing radio targets
* contrib/lisp/org-element.el (org-element-link-parser): Do not parse
  radio link as a recursive link.
* contrib/lisp/org-export.el (org-export-solidify-link-text): Make
  sure "\" isn't allowed in solidified strings.  This is required to
  allow entities in radio targets.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes to
  radio links.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-link): Apply changes to
  radio links.
2012-02-17 18:46:05 +01:00
Nicolas Goaziou 34313edab9 org-e-ascii: Fix tables export with a special column
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-table--column-width): Do
  not return width of special column, if any.
(org-e-ascii-table--build-hline): Add comments to code.
2012-02-17 14:54:20 +01:00
Nicolas Goaziou de0c86ffeb org-export: Fix small bug in `org-export-get-genealogy'
* contrib/lisp/org-export.el (org-export-get-genealogy): Return
  `:genealgy' value, not the full communication channel.
2012-02-17 14:20:19 +01:00
Nicolas Goaziou cf87d15483 org-list: Remove two defcustoms
* lisp/org-list.el (org-list-ending-method, org-list-end-regexp):
  Removed variables.
(org-in-item-p, org-list-separating-blank-lines-number,
org-list-parse-list, org-list-struct): Apply changes.
* lisp/org-exp.el (org-export-mark-list-end,
  org-export-mark-list-properties): Apply changes.
* lisp/org-latex.el (org-export-latex-lists): Apply changes.
* doc/org.texi (Plain lists): Document removal.
2012-02-17 00:04:34 +01:00
Nicolas Goaziou 3e18c9cad7 org-e-latex: Change list of listings command according to package used
* EXPERIMENTAL/org-e-latex.el (org-e-latex-keyword): Use
  \listoflistings for minted and \lstlistoflistings for listings package.
2012-02-16 20:14:31 +01:00
Nicolas Goaziou 664271cde7 org-export: New `org-export-get-parent-paragraph' function
* contrib/lisp/org-export.el (org-export-get-genealogy,
org-export-get-parent-paragraph): New functions.
(org-export-get-parent-headline, org-export-get-previous-element,
org-export-get-next-element): Internally use new function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link--inline-image,
org-e-latex-link): Apply changes to topology functions.

This new function is especially useful since every object derives its
properties from those the containing paragraph.
2012-02-16 20:14:31 +01:00
Nicolas Goaziou 7d3f7f60e0 Make inline image definition more configurable
* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
  plain links in link description.
* contrib/lisp/org-export.el (org-export-default-inline-image-rule):
  New variable.
(org-export-inline-image-p): Use rules instead of extensions. A rule
is a regexp applied to path for a given type of link.  It allows to
extend inline images to non-local files.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-inline-image-rules): New
  variable.
(org-e-latex-inline-image-extensions): Removed variable

There are two motivations behind this change.  The first one is to
allow, for example, an HTML exporter to define a rule like the
following:

 ("http" . "\\.\\(png\\|jpg\\|jpeg\\|gif\\)\\(\\?\\(\\w+=\\w+&?\\)*\\)?")

The other one is to properly define thumbnails (clickable images),
like the following:

  [[http://orgmode.org][file:~/my-logo.png]]
2012-02-16 20:14:31 +01:00
Jambunathan K c7f3e4abf1 org.texi: Update ODT section
* org.texi (Top, OpenDocument Text export)
(ODT export commands, Extending ODT export)
(Images in ODT export, Tables in ODT export)
(Configuring a document converter): Add or Update.
2012-02-16 23:04:46 +05:30
Eric Schulte 47eb35bb89 tests of fixed subtree property accumulated behavior 2012-02-15 08:12:35 -07:00
Eric Schulte a521a7a9a7 Accumulate properties from subtree property drawers.
* lisp/org.el (org-entry-get): Accumulate properties from subtree
  property drawers.
2012-02-15 08:12:35 -07:00
Eric Schulte 51923ff2bc Accumulate properties from subtree property drawers.
* lisp/org.el (org-entry-get): Accumulate properties from subtree
  property drawers.
2012-02-15 08:02:06 -07:00
Bastien Guerry 23faca5b97 org.texi: Fix sentences with double-space endings. 2012-02-15 12:08:16 +01:00
Jambunathan K c195392f59 org-odt.el: Use imagemagick to determine image sizes
* org-odt.el (org-export-odt-image-size-probe-method)
(org-odt-do-image-size): Use imagemagick preferentially to
determine image sizes.

See http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00288.html
2012-02-15 09:54:07 +05:30