Commit Graph

11553 Commits

Author SHA1 Message Date
Nicolas Goaziou cedf5190e5 org-export: Update code comments 2012-09-13 21:01:10 +02:00
Nicolas Goaziou 4d06f3349d ob-exp: Preserve affiliated keywords when replacing a code block
* lisp/ob-exp.el (org-export-blocks-preprocess): Preserve affiliated
  keywords when replacing a code block.
2012-09-13 20:46:33 +02:00
Nicolas Goaziou 7efd61249b org-e-latex: Ignore empty captions in lstlisting environments
* contrib/lisp/org-e-latex.el (org-e-latex-src-block): Ignore empty
  captions in lstlisting environments.
2012-09-13 18:27:39 +02:00
Nicolas Goaziou a0e3e84edc org-e-html/org-e-odt: Changes to caption handling
* contrib/lisp/org-e-html.el (org-e-html--caption/label-string,
  org-e-html--wrap-label, org-e-html--find-verb-separator): Remove
  functions.
(org-e-html-center-block, org-e-html-drawer, org-e-html-dynamic-block,
org-e-html-fixed-width, org-e-html-inline-src-block,
org-e-html-inlinetask, org-e-html-latex-environment,
org-e-html-plain-list, org-e-html-quote-block,
org-e-html-special-block, org-e-html-verse-block): Apply functions
removal.
(org-e-html-example-block, org-e-html-src-block): Allow textarea. Use
new caption scheme.
(org-e-html-horizontal-rule): Cleanup.
(org-e-html-link--inline-image, org-e-html-table): Use new caption
scheme.
* contrib/lisp/org-e-odt.el (org-e-odt--wrap-label,
  org-e-odt--caption/label-string): Remove functions.
(org-e-odt-format-label): Use new caption scheme.
(org-e-odt-center-block, org-e-odt-drawer, org-e-odt-dynamic-block,
org-e-odt-example-block, org-e-odt-fixed-width,
org-e-odt-horizontal-rule, org-e-odt-inlinetask,
org-e-odt-latex-environment, org-e-odt-plain-list,
org-e-odt-quote-block, org-e-odt-special-block,
org-e-odt-verse-block): Apply functions removal.

In e-html export, textareas are now possible with the following
attribute:

  #+ATTR_HTML: :textarea t :width 80 :height 10

:width and :height keywords are optional.
2012-09-13 17:33:46 +02:00
Nicolas Goaziou 1e1a476824 org-e-groff/org-e-man: Changes to caption handling
* contrib/lisp/org-e-groff.el (org-e-groff--caption/label-string):
  Change signature.
(org-e-groff-link--inline-image, org-e-groff-src-block,
org-e-groff-table--org-table): Use `org-export-read-attribute'. Apply
signature change.
* contrib/lisp/org-e-man.el (org-e-man--caption/label-string): Change
  signature.
(org-e-man-src-block): Remove unused caption code.
(org-e-man-table--org-table): Use `org-export-read-attribute'. Apply
signature change.
2012-09-13 17:33:46 +02:00
Nicolas Goaziou 28f8ca60c7 org-e-ascii/org-e-latex/org-e-md: Use new caption tool
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-caption,
  org-e-ascii--list-listings, org-e-ascii--list-tables): Use new
  caption tool.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string): New
  signature.  Use new caption tool.
(org-e-latex-link--inline-image, org-e-latex-src-block,
org-e-latex-table--org-table): Apply signature change.
* contrib/lisp/org-md.el (org-md-link): Use new caption tool.
2012-09-13 17:33:46 +02:00
Nicolas Goaziou fe140488aa org-element: Allow multiple caption keywords
* lisp/org-element.el (org-element-multiple-keywords): Allow multiple
  caption keywords.
* contrib/lisp/org-export.el (org-export-get-caption): New function.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-org-export.el: Add tests.
2012-09-13 17:33:46 +02:00
Nicolas Goaziou 0b13ec8c1b Merge branch 'maint' 2012-09-13 13:17:17 +02:00
Nicolas Goaziou 4a7c99134c org-element: Fix caption parsing
* lisp/org-element.el (org-element--collect-affiliated-keywords): Fix
  caption parsing.
* testing/lisp/test-org-element.el: Add tests.
2012-09-13 13:15:39 +02:00
Bastien Guerry 6589b9925c Merge branch 'maint' 2012-09-13 03:20:30 +02:00
Bastien Guerry b0e5c6d1ad org.el: Fix plain link activation
* org.el (org-activate-plain-links): Don't try to check if we
are in a bracket link already.

This partially reverts commit ad35e2.
The problem that this commit was trying to
address needs to be rethought.

Thanks to Scott Randby for reporting this.
2012-09-13 03:10:06 +02:00
Bastien Guerry 93c692ba27 Merge branch 'maint' 2012-09-13 01:28:16 +02:00
Bastien Guerry c6d0af8c5b org.el (org-read-date-analyze): Allow relative input and time string.
* org.el (org-read-date-analyze): Fix bug introduced in commit
cc5f9f: adding a time should not prevent relative answers to
be parsed correctly.

Thanks to Michael Brand for reporting this.
2012-09-13 01:28:00 +02:00
Bastien Guerry 795b578ec1 org-agenda.el (org-agenda-bulk-action): Always read the date through `org-read-date'
* org-agenda.el (org-agenda-bulk-action): Always read the date
through `org-read-date'.  When possible, use the date at point
as the default date.

The previous behavior was trying to mimik the previous behavior
we had with `k m' (to mark the item at point) followed by ̀k s'
(to rescheduled it to the date at point, with no question.)

The current behavior always ask for a date/time interactively,
but takes the date at point as the current date, which makes it
fast enough.

Thanks to Nick Dokos for raising concerns about this.
2012-09-13 01:21:26 +02:00
Bastien Guerry a0c1ca54bb org.el (org-scan-tags): Fix the declaration and the use of `org-agenda-format-item'
* org.el (org-scan-tags): Fix the declaration and the use of
`org-agenda-format-item'.
2012-09-13 00:48:40 +02:00
Bastien Guerry 864519b67e org-agenda.el: Fix another bug in b508ff69
* org-agenda.el (org-agenda-add-time-grid-maybe): Use the
correct number of parameters for `org-agenda-format-item'.
Add a docstring.

Thanks to Nick Dokos for hunting this issue thoroughly.
2012-09-13 00:43:14 +02:00
Nicolas Goaziou 343b648994 ob-exp: Fix block evaluation when results are before the block
* lisp/ob-exp.el (org-export-blocks-preprocess): Fix block evaluation
  when results are before the block.
2012-09-12 22:01:48 +02:00
Bastien Guerry f51c405920 Removed unwanted modification in `org-agenda-prefix-format' 2012-09-12 18:20:20 +02:00
Bastien Guerry 9742dc86a0 Continue fixing b508ff69.
* org.el (org-outline-level): Go at the beginning of the
headline first to always return a sensible result.

* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks): Return the
correct level depending on `org-odd-levels-only'.
2012-09-12 18:17:01 +02:00
Bastien Guerry b645e8ab22 Fix commit b508ff69 again (second take). 2012-09-12 18:03:41 +02:00
Nicolas Goaziou 25a1f226ec Remove left over org-export-blocks requires 2012-09-12 17:42:38 +02:00
Nicolas Goaziou 3c6a715bce ob-exp: Improve `org-export-blocks-preprocess'
* lisp/ob-exp.el (org-export-blocks-preprocess): Improve blank lines
  handling in function. Add comments. Remove
  `org-export-blocks-postblock-hook' since it's defined nowhere
  now (and doesn't need to, there's `org-export-before-parsing-hook'
  already).
2012-09-12 17:01:44 +02:00
Nicolas Goaziou 14c3c20b06 Remove org-export-blocks.el
* lisp/org-exp-blocks.el: Delete file.
* lisp/ob-exp.el (org-export-blocks-preprocess): Moved from
  "org-export-blocks.el".
* lisp/ob-ditaa.el (org-ditaa-jar-path): Moved from
  "org-export-blocks.el".
2012-09-12 17:01:44 +02:00
Nicolas Goaziou 3dce21a0a4 Rewrite Babel pre-processing functions
* lisp/ob-exp.el (org-babel-exp-src-block): Remove unused argument.
(org-babel-exp-non-block-elements): Rewrite function using Org Element.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Rewrite
  function using Org Element.
2012-09-12 17:01:44 +02:00
Nicolas Goaziou e0da410066 org-e-latex: Allow to customize table of contents command
* contrib/lisp/org-e-latex.el (org-e-latex-toc-command): New variable.
(org-e-latex-template): Use new variable.

Thanks to Thomas S. Dye for providing the patch.
2012-09-12 16:29:30 +02:00
Bastien Guerry 1f41f08777 Fix commit b508ff69 again. 2012-09-12 15:56:00 +02:00
Bastien Guerry 3854efb52e Merge branch 'master' of orgmode.org:org-mode 2012-09-12 15:50:45 +02:00
Bastien Guerry aac2e8b93f Merge branch 'maint' 2012-09-12 15:50:25 +02:00
Bastien Guerry ae4950ca98 Merge branch 'maint' of orgmode.org:org-mode into maint 2012-09-12 15:50:01 +02:00
Andreas Leha 14296c0599 fix typo in support of sidewaystables in the new latex exporter
* contrib/lisp/org-e-latex.el (org-e-latex-table--org-table): Typo.
  sidewaystables -> sidewaystable.
2012-09-12 15:49:49 +02:00
Nicolas Goaziou 82dc8f01ce Merge branch 'maint' 2012-09-12 15:46:12 +02:00
Bastien Guerry 59d0f30522 Fix previous commit.
Thanks to Rainer Stengele for reporting a related problem.
2012-09-12 15:46:08 +02:00
Nicolas Goaziou f969e24a43 org-element: Fix parsing for items/footnote definitions starting with special syntax
* lisp/org-element.el (org-element--current-element): At the very
  beginning of a footnote definition or an item, next element is
  always a paragraph.
* testing/lisp/test-org-element.el: Add tests.

This patch fixes parsing for following cases:

 - - text

or

[fn:1] # Some text
2012-09-12 15:45:10 +02:00
Abdó Roig-Maranges 149cc04782 org.el: Option to get LaTeX preview in the same color as text face
* org.el (org-format-latex-options): Add `auto' to docstring.
(org-format-latex): Get face colors at point and put them inside opt.
(org-create-formula-image-with-dvipng): Fix bug when colors are not
`default'.
(org-create-formula-image-with-imagemagick): Fix bug when handling
"Transparent" bg color.
(org-dvipng-color-format): Same as `org-latex-color-format' for
dvipng-style color specification.

If `auto' is used for the :foreground or :background value in
org-format-latex-options, the the appropriate color is chosen
from the face in which the formula is displayed.
2012-09-12 12:45:44 +02:00
Philipp Kroos daf7cd98ea * org-e-latex.el (org-e-latex-export-block): Fix typo.
* org-e-latex.el (org-e-latex-export-block): Fix typo.

TINYCHANGE
2012-09-12 12:41:31 +02:00
Bastien Guerry b508ff6901 org-agenda.el: Allow a new specifier `%l' in `org-agenda-prefix-format'
* org-agenda.el (org-agenda-prefix-format): A new specifier
`%l' allows to insert X spaces when the item is of level X.
(org-search-view, org-get-entries-from-diary)
(org-agenda-get-todos, org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-progress)
(org-agenda-get-deadlines, org-agenda-get-scheduled)
(org-agenda-get-blocks, org-agenda-change-all-lines): Add a
new text property 'level, a string with as many whitespaces as
the level of the item.
(org-agenda-format-item, org-compile-prefix-format): Handle
the new `%l' specifier.

This new specifier allows to have a visual clue about the level
of the item in agenda views.
2012-09-12 11:41:50 +02:00
Michael Brand 137bfd0aa7 org.texi: Mention Calc defmath
* org.texi (Formula syntax for Calc): Add a sentence to mention Calc
defmath.
2012-09-12 09:50:59 +02:00
Bastien Guerry d815ca4fb2 Merge branch 'maint' 2012-09-12 09:48:33 +02:00
Bastien Guerry cdc1db5fda org-agenda.el (org-agenda-bulk-action): Fix bug when bulk-shifting timestamps.
* org-agenda.el (org-agenda-bulk-action): Fix bug when
bulk-shifting timestamps.

Thanks to Rainer Stengele for reporting this.
2012-09-12 09:48:21 +02:00
Achim Gratz 2eb1456bfd Merge branch 'maint' 2012-09-11 21:44:37 +02:00
Achim Gratz c5977e7e9d Revert "org-compat.el: New compatibility function `org-random'"
This reverts commit 7719734dd7.

* lisp/org-id.el: Do not use (random t), we just want a new random
  number, not a re-seeding of the PRNG for which (random t) doesn't
  provide enough entropy anyway.  Even if (random) would always
  produce the same sequence, the other components going into the MD5
  hash ensure that the result will be unique.
2012-09-11 21:42:38 +02:00
Jambunathan K b335ce2aa5 org-e-html.el: No section numbers for listified headlines
Lisftified headline is numbered or unnumbered according to the value
of num:N spec.
2012-09-11 04:52:41 +05:30
Bastien Guerry 6bcd44e914 Revert "org-e-html/org-e-odt: Autoload (org-export-define-backend ...)"
This reverts commit 830a0781a6.
2012-09-10 22:14:31 +02:00
Luis Anaya 033abff4c0 Changed `org-babel-tcl-command' from a defvar to a defcustom.
* ob-tcl.el (org-babel-tcl-command):
Changed `org-babel-tcl-command' from a defvar to a defcustom.
2012-09-10 14:54:05 -04:00
Bastien Guerry f7f0445cc1 eldo.el: Minor tweaks 2012-09-10 09:21:14 +02:00
Eric Schulte 27101a3e0e resurrect org-create-formula-image
This commit resurrects the `org-create-formula-image' function which was
removed in commit a9d3ce.  This function is still called elsewhere, and
provides a simpler interface to the two backend-specific image creation
functions.

This also simplifies `org-format-latex', which still has some serious
problems such as optional arguments such as PROCESSING-TYPE which are
never assigned a default value, and extraneous variables.

At some point the `org-create-formula-image-with-imagemagick' and
`org-create-formula-image-with-dvipng' functions should be combined as a
great deal of code and logic is duplicated between the two functions.

* lisp/org.el (org-format-latex): Simplified and now makes use of the
  new `org-create-formula-image' function.
  (org-create-formula-image): Provides a simpler interface to the two
  backend-specific functions.
2012-09-09 13:30:32 -06:00
Nicolas Goaziou faa2be8d57 org-export: Don't overwrite menus or add redundant entries
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Don't overwrite menus or add
  redundant entries.
2012-09-09 15:39:28 +02:00
Nicolas Goaziou fe02e60789 org-e-beamer: Small refactoring
* contrib/lisp/org-e-beamer.el (org-e-beamer-property-changed): Small
  refactoring.
2012-09-09 14:58:10 +02:00
Nicolas Goaziou 8e44533339 Merge branch 'maint' 2012-09-09 14:14:54 +02:00
Nicolas Goaziou f29131c3d2 org-element: Handle nil titles in headlines
* lisp/org-element.el (org-element-headline-parser): Handle nil
  titles.
(org-element-inlinetask-parser): Add :raw-value property.  Also handle
nil titles.
2012-09-09 14:13:24 +02:00