Commit Graph

10576 Commits

Author SHA1 Message Date
Nicolas Goaziou d83ab52626 org-element: Refactor code, add tests
* contrib/lisp/org-element.el (org-element-babel-call-parser): Be sure
  to match "#+CALL:".
(org-element-block-name-alist): New variable.
(org-element-non-recursive-block-alist): Removed variable.
(org-element-current-element): Refactor.
* testing/lisp/test-org-element.el: Add tests.
2012-05-05 09:15:33 +02:00
Bastien Guerry a16814a475 New option ̀org-agenda-bulk-mark-char'.
* org-agenda.el (org-agenda-bulk-mark-char): New option.
(org-agenda-bulk-mark): Use the new option.
2012-05-05 09:07:37 +02:00
Bastien Guerry 578a7f5aa5 New option `org-src-prevent-auto-filling' defaulting to nil.
* org.el (org-src-prevent-auto-filling): New option to prevent
auto-filling in src blocks.  This defaults to nil to avoid people
being surprised that no auto-fill occurs in Org buffers where they
use `auto-fill-mode'.
(org-auto-fill-function): Use the new option.

Thanks to Ken Williams for this feature request and to Charles
C. Berry for a preliminary patch for this.
2012-05-05 08:13:43 +02:00
Mark E. Shoulson 61653a2c01 org.el (org-fontify-entities): Hide {} when prettifying entities.
* org.el (org-fontify-entities): Hide {} when prettifying
entities.

TINYCHANGE
2012-05-05 08:07:26 +02:00
Bastien Guerry e7dda77691 Fix `org-set-property'.
* org.el (org-properties-postprocess-alist): Better
customization type.
(org-set-property): Fix the check against
`org-properties-postprocess-alist'.

Thanks to Bill Wishon for testing/spotting this.
2012-05-04 23:58:55 +02:00
Paul Sexton 5412883c1d org-drill: prevent errors caused by attempting to display inline images on a non-graphical display. 2012-05-05 08:09:22 +12:00
Jason Dunsmore 6a38c1fac3 Fixed indentation in capture template doc. 2012-05-04 14:57:34 -05:00
Jason Dunsmore 67f9bbb7fa Clarified to capture template expansion doc. 2012-05-04 14:47:40 -05:00
Eric Schulte dec32064a7 adding commented out code which should be activated once org-element has been merged
Used to clean up orphaned keywords of blocks removed by
  org-export-blocks-preprocess.
2012-05-04 09:17:36 -04:00
Nicolas Goaziou 72ca00ca09 org-e-ascii: Fix table export bug when ignoring sub/superscript
* contrib/lisp/org-e-ascii.el (org-e-ascii--table-cell-width):
  Refactor code.
* contrib/lisp/org-export.el: Do not normalize contents when expanding
  them, since it will be done at the end of the function, and only for
  elements.
2012-05-04 14:02:41 +02:00
Bastien Guerry ecd4079f0e org-macs.el (orgstruct++-ignore-org-filling): Set `def-edebug-spec' correctly.
* org-macs.el (orgstruct++-ignore-org-filling): Set
`def-edebug-spec' correctly.
2012-05-03 16:44:17 +02:00
Nicolas Goaziou 01d83dc1f4 org-export: Fix table export bug with cells made of only one object
* contrib/lisp/org-export.el (org-export-table-row-is-special-p,
  org-export-table-cell-width, org-export-table-cell-alignment):
  Ensure cell only contains a string before trying to match width
  cookie.
* testing/lisp/test-org-export.el: Modify tests accordingly.

Thanks to Eric Fraga for discovering and investigating about this.
2012-05-03 14:29:30 +02:00
Nicolas Goaziou f4791557e2 org-element: Store fixed-with and comment contents without markers
* contrib/lisp/org-element.el (org-element-comment-parser): Store
  comments without leading hash and maybe plus sign.
(org-element-fixed-width-parser): Store fixed-width contents without
leading colons.
(org-element-comment-interpreter,
org-element-fixed-width-interpreter): Apply changes.
* contrib/lisp/org-e-odt.el (org-e-odt-fixed-width): Apply changes to
  fixed-width `:value' property.
* contrib/lisp/org-e-latex.el (org-e-latex-fixed-width): Apply changes
  to fixed-width `:value' property.
* contrib/lisp/org-e-html.el (org-e-html-fixed-width): Apply changes
  to fixed-width `:value' property.
* contrib/lisp/org-e-ascii.el (org-e-ascii-fixed-width): Apply changes
  to fixed-width `:value' property.
* testing/lisp/test-org-element.el: Add tests.
2012-05-02 17:25:30 +02:00
Bastien Guerry 3c34028497 Merge branch 'maint' 2012-05-01 19:19:16 +02:00
Bastien Guerry 0dbe17b8e0 org-table.el: Fix bug about handling a negative duration value.
* org-table.el (org-table-time-seconds-to-string): Fix bug
about handling a negative duration value.
2012-05-01 19:19:06 +02:00
Bastien Guerry 1c4ac932f3 Merge branch 'maint' 2012-05-01 18:43:41 +02:00
Bastien Guerry 9fa0b5e794 org.texi (Durations and time values): Fix typo.
* org.texi (Durations and time values): Fix typo.
2012-05-01 18:43:28 +02:00
Bastien Guerry 805891523c Fix bugs about computing durations in the column view.
* org-colview.el (org-columns-string-to-number): When
computing the values for the colview, match durations and
convert them to HH:MM values.

* org.el (org-duration-string-to-minutes): Match non-round
numbers.  Add a new optional parameter to allow returning the
output as a string.

Thanks to Sébastien for reporting these bugs.
2012-05-01 17:47:13 +02:00
Bastien Guerry 4d65272e03 Merge branch 'master' of orgmode.org:org-mode 2012-05-01 15:57:27 +02:00
Bastien Guerry 9f3b35a114 Merge branch 'fix-orgstruct' 2012-05-01 15:56:12 +02:00
Bastien Guerry a8c3125a14 Rework `orgstruct++-mode' so that you can turn if off safely.
* org.el (org-auto-fill-fallback-function)
(org-indent-line-fallback-function)
(org-fill-paragraph-fallback-function)
(org-auto-fill-fallback-function)
(org-indent-line-fallback-function)
(org-fill-paragraph-fallback-function): Remove.
(org-fb-vars): New buffer-local variable.
(orgstruct++-mode): Use the fallback variable `org-fb-vars' to
store, use and restore variables if needed.
(org-fill-paragraph): Ignore `orgstruct++-mode' filling
variables when needed.
(org-auto-fill-function, org-indent-line-function): Ditto.

* org-macs.el (orgstruct++-ignore-org-filling): New macro.
2012-05-01 15:55:41 +02:00
Nicolas Goaziou 172d7a6f5e org-element: Apply `org-translate-link' when parsing a link
* contrib/lisp/org-element.el (org-element-link-parser): Apply
  `org-translate-link' when parsing a link.
* testing/lisp/test-org-element.el: Add test.
2012-05-01 15:47:14 +02:00
Nicolas Goaziou 39fc2c445a Merge branch 'maint' 2012-05-01 15:33:36 +02:00
Nicolas Goaziou eed9350ed9 * lisp/org.el (org-link-expand-abbrev): Fix docstring 2012-05-01 15:32:46 +02:00
Nicolas Goaziou b9d98cf926 * lisp/org.el (org-translate-link): Fix bug 2012-05-01 15:32:04 +02:00
Nicolas Goaziou 32a5920e69 org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
  org-element-headline-interpreter, org-element-inlinetask-parser,
  org-element-inlinetask-interpreter): Store headline/inlinetask's
  tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
  org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
  org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
  new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
  org-e-html-format-inlinetask-function, org-e-html--tags): Use new
  tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
  org-e-latex-format-inlinetask-function, org-e-latex-headline,
  org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
  representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 14:29:40 +02:00
Bastien Guerry cadcbe3aa4 Merge branch 'master' of orgmode.org:org-mode 2012-05-01 13:03:56 +02:00
Feng Shu be1727a68f Using 'call-process to launch latex program
* org.el (org-create-formula-image-with-imagemagick): Use 'call-process
to launch latex so that no shell output buffer will be shown when previewing
formulas.
2012-05-01 13:03:43 +02:00
Feng Shu 24dff8f067 spelling fixes
* org.el (org-create-formula-image-with-imagemagick): Fix typo.
2012-05-01 13:03:39 +02:00
Nicolas Goaziou 4f8e1e85b2 org-element: Interpret headlines without a `:pre-blank' property
* contrib/lisp/org-element.el (org-element-headline-interpreter):
  Interpret headlines without a `:pre-blank' property.
2012-05-01 12:20:06 +02:00
Bastien Guerry bf5b4012e9 Use compatibility function for XEmacs.
* lisp/org-exp-block.el: Use `org-find-library-name' instead of `find-library-name'.
2012-05-01 10:40:19 +02:00
Bastien Guerry b3f60f791e Convert compatibility defun to a macro.
* lisp/org-compat.el (org-find-library-name): Convert into a macro to
  avoid compilation of a function from XEmacs in Emacs and vice versa.

Based on a not fully working proposal by A. Gratz to the orgmode
mailing list:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00009.html
2012-05-01 10:40:15 +02:00
Achim Gratz a965630293 spelling fixes
Makefile: dito -> ditto
2012-05-01 10:07:29 +02:00
Bastien Guerry e5c8780e5c Merge branch 'maint' 2012-05-01 10:04:46 +02:00
Bastien Guerry adb10d1543 org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug.
* org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug when
setting the number of marked entries.
2012-05-01 10:04:31 +02:00
Bastien Guerry 8342fdb70a org-table.el: Fix bug in ̀org-table-maybe-eval-formula'.
* org-table.el (org-table-store-formulas): Fix typo.
(org-table-maybe-eval-formula): Fix the regexp to only match
formulas, which never end with the `=' character.  If the
field only contain this character, don't eval either.

Thanks to Thomas S. Dye for reporting this.
2012-05-01 02:03:12 +02:00
Bastien Guerry 1f663e7ab3 Merge branch 'maint' 2012-05-01 01:42:17 +02:00
Bastien Guerry 3053c13d2c org-table.el: Fix bug in a free variable name.
* org-table.el (org-tbl-calc-modes): Rename from
`org-table-modes'.
(org-set-calc-mode, org-table-eval-formula): Use it.

Thanks to Mikkel Kristiansen for reporting this and
to Nick Dokos for tracking down the bug and proposing
a fix.
2012-05-01 01:41:50 +02:00
Nicolas Goaziou 49228181ee org-element: code clean-up and some optimizations
* contrib/lisp/org-element.el (org-element-center-block-parser,
  org-element-plain-list-parser, org-element-quote-block-parser,
  org-element-special-block-parser, org-element-comment-parser,
  org-element-comment-block-parser, org-element-example-block-parser,
  org-element-export-block-parser, org-element-fixed-width-parser,
  org-element-horizontal-rule-parser, org-element-keyword-parser,
  org-element-latex-environment-parser, org-element-paragraph-parser,
  org-element-property-drawer-parser, org-element-src-block-parser,
  org-element-table-parser): Since parser will alway be called at the
  beginning of the element, simplify code.
2012-05-01 01:02:48 +02:00
Nicolas Goaziou 2ab6367daf org-element: Interpret correctly switches in example blocks
* contrib/lisp/org-element.el (org-element-example-block-interpreter):
  Interpret correctly switches in example blocks.
* testing/lisp/test-org-element.el: Add test.
2012-04-30 23:44:30 +02:00
Nicolas Goaziou 537ab2ada3 org-element: Interpret secondary strings with `org-element-interpret-data'
* contrib/lisp/org-element.el (org-element-headline-interpreter,
  org-element-inlinetask-interpreter, org-element-item-interpreter,
  org-element-footnote-reference-interpreter,
  org-element-interpret--affiliated-keywords): Use
  `org-element-interpret-data' instead of
  `org-element-interpret-secondary'.
(org-element-interpret-data): Handle secondary strings.  Refactor
code.
(org-element-interpret-secondary): Remove function
* contrib/lisp/org-export.el (org-export-table-cell-alignment): Use
  `org-element-interpret-data' instead of
  `org-element-interpret-secondary'.
2012-04-30 20:10:54 +02:00
Nicolas Goaziou 03813d9bc4 org-export: Secondary strings are transcoded with `org-export-data'
* contrib/lisp/org-export.el (org-export-transcoder): New function.
(org-export-data): Also export secondary strings.  Refactored.
(org-export-secondary-string): Remove function.
(org-export-expand): Fix code indentation.
(org-export-expand-macro): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
  org-e-ascii--build-caption, org-e-ascii--list-listings,
  org-e-ascii--list-tables, org-e-ascii--describe-links,
  org-e-ascii-template--document-title, org-e-ascii-inlinetask,
  org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section,
  org-e-ascii--table-cell-width): Use `org-export-data' instead of
  `org-export-secondary-string'.
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
org-e-html--caption/label-string, org-e-html-meta-info,
org-e-html-preamble, org-e-html-template,
org-e-html-format-headline--wrap, org-e-html-headline,
org-e-html-item, org-e-html-link): Use `org-export-data' instead of
`org-export-secondary-string'.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
  org-e-latex-template, org-e-latex-footnote-reference,
  org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item,
  org-e-latex-link, org-e-latex-src-block): Use `org-export-data'
  instead of `org-export-secondary-string'.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
  org-e-odt-format-label, org-e-odt-update-meta-file,
  org-e-odt--caption/label-string, org-e-odt-footnote-def,
  org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item,
  org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block):
  Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 20:10:54 +02:00
Bastien Guerry 330257949d Merge branch 'master' of orgmode.org:org-mode 2012-04-30 18:30:31 +02:00
Bastien Guerry 96dd842ee1 UTILITIES/mansplit.pl: mention http://orgmode.org
Thanks to Thierry Stoehr for suggesting this.
2012-04-30 18:30:13 +02:00
Bastien Guerry ad812d8cd1 UTILITIES/manfull.pl: mention http://orgmode.org
Thanks to Thierry Stoehr for suggesting this.
2012-04-30 18:28:31 +02:00
Nicolas Goaziou 15315c5cc6 org-element: Fix src-block switches parsing
* contrib/lisp/org-element.el (org-element-src-block-parser): Fix
  switches parsing.
* testing/lisp/test-org-element.el: Add test.
2012-04-30 18:21:35 +02:00
Nicolas Goaziou 99a5d6bea8 org-element: Small fix to previous commit
* contrib/lisp/org-element.el (org-element-export-snippet-parser):
  Small fix.
* testing/lisp/test-org-export.el: Fix test.
2012-04-30 17:49:55 +02:00
Nicolas Goaziou 803d76825a org-element: Change to export-snippet syntax
* contrib/lisp/org-element.el (org-element-export-snippet-parser):
  Change syntax from @back-end{contents} to <back-end@contents>.
(org-element-export-snippet-successor): Use new syntax
* testing/lisp/test-org-element.el: Add test.

This change is required as curly braces conflict with LaTeX syntax
when trying to break a command in two parts.  On the other hand, HTML
tags can be broken easily in two.  More explicitely, both the
following constructs are possible now:

  <latex@\textsc{>Name<latex@}> and <html@<b>>
2012-04-30 17:34:01 +02:00
Bastien Guerry 237c65b1f7 org.el: Fix `org-diary' again by checking `org-agenda-buffer' correctly. 2012-04-30 00:04:20 +02:00
Nicolas Goaziou bea597be96 org-export: Add `active' and `inactive' alternatives to `org-export-with-timestamps'
* contrib/lisp/org-export.el (org-export-with-timestamps): Allow to
  keep only active timestamps or inactive ones with respectively
  `active' and `inactive' values.
(org-export--skip-p): Update tests to determine if a timestamp should
be ignored.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-element.el: Fix some comments.
2012-04-29 22:55:37 +02:00