Commit Graph

12022 Commits

Author SHA1 Message Date
Nicolas Goaziou 22ac03bee5 org-export: Add a function to retrieve category of an element or object
* contrib/lisp/org-export.el (org-export-get-category): New function.
* testing/lisp/test-org-export.el: Add tests.
2012-11-02 13:44:46 +01:00
Nicolas Goaziou 869e0fa73d org-e-latex: No \author{} command with author:nil option
* contrib/lisp/org-e-latex.el (org-e-latex-template): No \author{}
  command with author:nil option.
2012-11-01 08:09:29 +01:00
Nicolas Goaziou 32c3456020 org-export: Fix previous/next element finding in secondary strings
* contrib/lisp/org-export.el (org-export-get-previous-element,
  org-export-get-next-element): Correctly retrieve previous and next
  object, if any, in secondary strings.
* testing/lisp/test-org-export.el: Add tests.
2012-10-31 13:21:16 +01:00
Eric Schulte 32a6bae7c0 better hline and None translations in ob-python
* lisp/ob-python.el (org-babel-python-hline-to): Customize hline
  conversion to python.
  (org-babel-python-None-to): Customize none conversion from python.
  (org-babel-python-var-to-python): Use new variable.
  (org-babel-python-table-or-string): Use new variable.
2012-10-30 18:04:50 -06:00
Nicolas Goaziou 14e0cd553f org-export: require ob-exp 2012-10-30 22:21:33 +01:00
Nicolas Goaziou c60ef1d9d9 Export back-ends: Fix planning and clock export
* contrib/lisp/org-e-ascii.el (org-e-ascii-clock,
  org-e-ascii-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-groff.el (org-e-groff-clock,
  org-e-groff-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-html.el (org-e-html-clock, org-e-html-planning):
  Fix export due to recent timestamps changes.
* contrib/lisp/org-e-latex.el (org-e-latex-clock,
  org-e-latex-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-odt.el (org-e-odt-clock, org-e-odt-planning): Fix
  export due to recent timestamps changes.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-clock,
  org-e-texinfo-planning): Fix export due to recent timestamps
  changes.
2012-10-30 21:59:50 +01:00
Nicolas Goaziou 3ea9372860 Fix error when filling items
* lisp/org.el (org-adaptive-fill-function): Items do not have
  a :post-affiliated property. Use :begin property instead.

This patch follows 86f2731125.
2012-10-30 18:38:39 +01:00
Nicolas Goaziou caee8076f8 org-export: Fix docstring
* contrib/lisp/org-export.el (org-export-with-tasks): Fix docstring.
2012-10-30 16:28:33 +01:00
Nicolas Goaziou 1a7610ed98 org-export: Add FILETAGS when retreiving tags with inheritance
* contrib/lisp/org-export.el (org-export-special-keywords): New
  "FILETAGS" keyword.
(org-export--get-inbuffer-options): Handle "FILETAGS" keywords.
(org-export-get-tags): Add FILETAGS when retreiving tags with
inheritance.
* testing/lisp/test-org-export.el: Add test.
2012-10-30 16:03:59 +01:00
Nicolas Goaziou dda56367b8 org-export: Fix :input-file property
* contrib/lisp/org-export.el (org-export-get-environment): Add misc
  properties.
(org-export-as): Extract buffer attributes before entering its copy.
2012-10-30 15:07:44 +01:00
Nicolas Goaziou ad811f5437 org-export: Fix inclusion of files with no final newline
* contrib/lisp/org-export.el (org-export--prepare-file-contents): File
  contents should end with a newline character.
2012-10-30 13:53:28 +01:00
Nicolas Goaziou 5e30d4fa4e org-element: Remove :clockedp property from headlines and inlinetasks
* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser): Remove :clockedp property.

This property isn't even remotely related to the structure of the
document and, as such, doesn't belong to Org element.
2012-10-30 13:13:47 +01:00
Nicolas Goaziou 86f2731125 Fix error when auto filling
* lisp/org.el (org-adaptive-fill-function): All elements do not have
  a :post-affiliated property.
2012-10-30 13:05:56 +01:00
Nicolas Goaziou 6290da183c Signal an error when a circular macro expansion happens
* lisp/org.el (org-macro-replace-all): Signal an error when a circular
  macro expansion happens.
(org-macro-initialize-templates): Fix docstring.
* testing/lisp/test-org.el: Add test.
2012-10-30 09:24:55 +01:00
Nicolas Goaziou 1f3a2c42c6 org-element, org-export: Fix documentation typos
* contrib/lisp/org-export.el (org-export--get-subtree-options): Fix
  code comment.
* lisp/org-element.el (org-element-map): Fix docstring.
2012-10-29 21:57:46 +01:00
Nicolas Goaziou 8fb5987e56 org-export: Fix smart quotes with isolated quotes
* contrib/lisp/org-export.el (org-export-activate-smart-quotes): Fix
  smart quotes in some corner-cases.  Refactor code.
* testing/lisp/test-org-export.el: Add test.
2012-10-29 20:36:03 +01:00
Nicolas Goaziou c7f4a9ebad org-element: Fix accessors and setters wrt secondary strings
* lisp/org-element.el (org-element-contents, org-element-set-contents,
  org-element-adopt-elements): Fix accessors and setters wrt secondary
  strings.
2012-10-29 19:03:54 +01:00
Nicolas Goaziou 07c8895705 org-element: Fix void-function org-clocking-buffer error
* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser): Fix void-function
  org-clocking-buffer error.
2012-10-29 16:26:34 +01:00
Nicolas Goaziou 2e8591783f org-element: Fix org-element-context on parsed keywords
* lisp/org-element.el (org-element-context): Fix org-element-context
  on parsed keywords.
* testing/lisp/test-org-element.el: Update test.
2012-10-29 14:01:49 +01:00
Nicolas Goaziou a2120a9d73 org-export: Expand correctly {{{title}}} and such
* contrib/lisp/org-export.el (org-export-as): Expand correctly
  {{{title}}} and such when they already contain a regular macro.
  This is done by expanding macros in two steps: at first regular
  macros,  then document specific macros.
(org-export-expand-macro): Remove function.
* testing/lisp/test-org-export.el: Add test.
2012-10-29 14:01:20 +01:00
Nicolas Goaziou a8c026cb26 org-export: Explicit error when using invalid syntax for INCLUDE keywords
* contrib/lisp/org-export.el (org-export-expand-include-keyword):
  Error out when file isn't specified within double quotes.
* testing/lisp/test-org-export.el: Add test.
2012-10-29 11:31:19 +01:00
Nicolas Goaziou 99110c60a6 org-element: Find objects in document and parsed affiliated keywords
* lisp/org-element.el (org-element-context): Find objects in document
  and parsable affiliated keywords.
* testing/lisp/test-org-element.el: Add tests.
2012-10-29 11:09:41 +01:00
Nicolas Goaziou 89ec3f1abf org-element: Add `:post-affiliated' property to elements when applicable
* lisp/org-element.el (org-element-center-block-parser,
  org-element-drawer-parser, org-element-dynamic-block-parser,
  org-element-footnote-definition-parser,
  org-element-plain-list-parser, org-element-property-drawer-parser,
  org-element-quote-block-parser, org-element-special-block-parser,
  org-element-babel-call-parser, org-element-comment-parser,
  org-element-comment-block-parser, org-element-diary-sexp-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-src-block-parser,
  org-element-table-parser, org-element-verse-block-parser): Add
  `:post-affiliated' property to elements.
(org-element-inlinetask-parser): Remove affilated keywords.
* lisp/org.el (org-adaptive-fill-function): Use new property.

This property is cheap to compute during parsing and allows to
determine if point is on an affiliated keyword or not by checking if
it is between :begin and :post-affiliated positions.
2012-10-29 11:02:06 +01:00
Bastien Guerry 0513f11b16 Merge branch 'maint' 2012-10-29 07:41:29 +01:00
Le Wang d22e732d7a org-src.el (org-edit-src-exit): Fix editing source section with blank lines
* org-src.el (org-edit-src-exit): Fix editing source section
with blank lines.

TINYCHANGE

This bug was introduced by commit aba9e2b9.
2012-10-29 06:37:41 +01:00
Rafael Laboissiere d0dd2a5308 org-remember.el: Correctly strip the comment lines in remember buffer
* org-remember.el (org-remember-handler): Correctly strip the comment lines
  in the temporary buffer *Remember* when handling a remember note.

TINYCHANGE
2012-10-29 06:30:14 +01:00
Nicolas Goaziou 90fcb4b841 org-export: Add filter set for diary sexp elements
* contrib/lisp/org-export.el (org-export-filters-alist): Add filter
  set for diary sexp elements.
(org-export-filter-comment-block-functions): Fix docstring.
(org-export-filter-diary-sexp-functions): New variable.
2012-10-28 23:00:04 +01:00
Nicolas Goaziou 98d5666bac org-element: Allow duals keywords with only secondary value
* lisp/org-element.el (org-element--collect-affiliated-keywords):
  Allow duals keywords with only secondary value.
* testing/lisp/test-org-element.el: Add test.

This patch allows to parse correctly the following:

    #+CAPTION[short caption]:
    #+CAPTION: Very long caption
    Some paragraph.
2012-10-28 22:45:34 +01:00
Nicolas Goaziou f6e936c2b9 Export back-ends: Update timestamp export
* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-groff.el (org-e-groff-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Update timestamp
  export.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-odt.el (org-e-odt-timestamp): Update timestamp
  export.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-timestamp): Update
  timestamp export.
2012-10-28 16:36:45 +01:00
Nicolas Goaziou c1e3aaece3 org-element: Improve timestamps parsing
* lisp/org-element.el (org-element-timestamp-parser): Modify timestamp
  objects properties.
(org-element-headline-parser, org-element-inlinetask-parser): Remove
`:timestamp' and `:clock' property.  Add `:clockedp' property.  Also,
set `:closed', `:deadline' and `:scheduled' values to timestamp
objects, not strings.  Small refactoring.
(org-element-clock-parser): Rename `:time' property into `:duration'.
Also, set `:value' value as a timestamp object, not a string.
(org-element-planning-parser): Set `:closed', `:deadline' and
`:scheduled' values to timestamp objects, not strings.
(org-element-clock-interpreter, org-element-planning-interpreter)
(org-element-timestamp-interpreter): Update interpreters.
(org-element--current-element): Tiny refactoring.
* testing/lisp/test-org-element.el: Add tests.
2012-10-28 16:29:55 +01:00
Nicolas Goaziou 2f2a80fe06 ob: Fix block evaluation in a narrowed buffer
* lisp/ob.el (org-babel-where-is-src-block-result): Insert new results
  keyword in current narrowed part of buffer, if necessary. Small
  refactoring.
(org-babel-insert-result): Do not widen buffer when new results have
to be inserted.  Therefore, results inserted after the last block of
a narrowed buffer still belong to the narrowed part of the buffer.
* testing/lisp/test-ob.el: Add tests.
* testing/lisp/test-ob-exp.el: Move test to test-ob.el
2012-10-28 16:21:30 +01:00
Nicolas Goaziou ccc98ebc2d org-export: Fix expansion of babel calls in included files
* contrib/lisp/org-export.el (org-export-as):
  `org-current-export-file' should refer to current, temporary, buffer
  containing included contents, not to original buffer with include
  keywords.
(org-export-with-current-buffer-copy): Buffer copy must contain the
whole buffer, possibly narrowed to a proper part, not only the
narrowed part.
* testing/lisp/test-org-export.el: Tweak tests.
2012-10-28 16:21:30 +01:00
Nicolas Goaziou a729fae0f7 org-agenda: Tiny stylistic change
* lisp/org-agenda.el (org-agenda-get-deadlines): Tiny stylistic
  change.
2012-10-28 13:53:29 +01:00
Bastien Guerry a4660d4790 org.el (org-additional-option-like-keywords): Add "INDEX:"
* org.el (org-additional-option-like-keywords): Add "INDEX:".
2012-10-28 11:39:01 +01:00
Justus Piater 796fca3f18 org-agenda: New option: skip deadline prewarning if scheduled in the future
* lisp/org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled):
  Add an option to skip the deadline prewarning if the scheduled date is
  in the future.
2012-10-28 11:13:53 +01:00
Bastien Guerry 53a7683fd7 Merge branch 'maint' 2012-10-28 11:10:44 +01:00
Rafael Laboissiere f9e89cb849 org-remember.el: Start the commented lines with the appropriate characters
* org-remember.el (org-remember-apply-template): Start the commented
  lines in the Remember temporary buffer with the appropriate
  characters.

TINYCHANGE
2012-10-28 11:10:28 +01:00
Bastien Guerry 70e4a89a5d Merge branch 'maint' 2012-10-27 21:44:21 +02:00
Bastien Guerry 4aa416876b org.texi (Comment lines): Fix description of the comment syntax
* org.texi (Comment lines): Fix description of the comment
syntax.

Thanks to Rafael Laboissiere for reporting this.
2012-10-27 21:44:09 +02:00
Nicolas Goaziou d81982ae9d org-element: Parse diary-sexp elements
* lisp/org-element.el (org-element-paragraph-separate): Diary-sexp
  elements can separate paragraphs.
(org-element-all-elements): Install new `diary-sexp' type.
(org-element--current-element): Recognize new `diary-sexp' elements.
(org-element-diary-sexp-parser, org-element-diary-sexp-interpreter):
New functions.
* testing/lisp/test-org-element.el: Add tests.
2012-10-27 14:43:30 +02:00
Nicolas Goaziou 1d58b0b2cd org-element: Small refactoring
* lisp/org-element.el (org-element-horizontal-rule-parser,
  org-element-keyword-parser, org-element--current-element): Small
  refactoring.
2012-10-27 14:37:18 +02:00
Nicolas Goaziou f04a5bcea1 Export back-ends: Install smart quotes module
* contrib/lisp/org-e-ascii.el (org-e-ascii-plain-text): Install smart
  quotes module.
* contrib/lisp/org-e-html.el (org-e-html-plain-text): Install smart
  quotes module.  Fix :preseve-breaks option.
(org-e-html--quotation-marks): Remove function.
(org-e-html-quotes): Remove variable.
* contrib/lisp/org-e-latex.el (org-e-latex-plain-text): Install smart
  quotes module.
(org-e-latex--quotation-marks): Remove function.
(org-e-latex-quotes): Remove variable.
* contrib/lisp/org-e-odt.el (org-e-odt-plain-text): Install smart
  quotes module.
(org-e-odt--quotation-marks): Remove function.
(org-e-odt-quotes): Remove variable.
* contrib/lisp/org-md.el (org-md-plain-text): Install smart quotes
  module.  Fix characters escaping.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-center-block,
  org-e-texinfo-special-block): new functions.
(org-e-texinfo-quotes): Remove variable.
(org-e-texinfo--quotations-marks): Remove function.
(org-e-texinfo-plain-text): Install smart quotes module.
* contrib/lisp/org-e-groff.el (org-e-groff-plain-text): Install smart
quotes module.  Fix line break preservation.
(org-e-groff--quotation-marks): Remove function.
(org-e-groff-quotes): Remove variable.
(org-e-groff-entity): Fix property name.
* contrib/lisp/org-e-man.el (org-e-man-entity): Fix property name.
(org-e-man-plain-text): Install smart quotes module.  Fix line break
preservation.
(org-e-man-quotes): Remove variable.
(org-e-man--quotation-marks): Remove function.
2012-10-27 11:42:31 +02:00
Nicolas Goaziou b2047a2565 org-export: Implement a generic smart quote module
* contrib/lisp/org-export.el (org-export-options-alist): Add an option
  item to toggle smart quotes during export.
(org-export-with-smart-quotes, org-export-smart-quotes-alist,
org-export-smart-quotes-regexps): New variables.
(org-export-activate-smart-quotes): New function.
(org-export-data): Remove residual text properties.
* testing/lisp/test-org-export.el: Add tests.
2012-10-27 11:42:31 +02:00
Nicolas Goaziou 95c305490e org-element: Add :parent text property to strings in parse tree
* lisp/org-element.el (org-element-property): Access to text
  properties when argument is a string.
(org-element-put-property): Correctly set property when target is
a string.
(org-element-adopt-elements): Also put :parent properties on strings.
* testing/lisp/test-org-element.el: Add test.
2012-10-27 11:42:30 +02:00
Bastien Guerry 7221b88f6d Merge branch 'maint' 2012-10-27 09:39:12 +02:00
Erik Hetzner dda453eb7e org.el (org-log-into-drawer): Honor the nil value for the :LOG_INTO_DRAWER: property.
* org.el (org-log-into-drawer): Honor the nil value for the
:LOG_INTO_DRAWER: property.

TINYCHANGE
2012-10-27 09:37:54 +02:00
Bastien Guerry b0eeb260ef Merge branch 'maint' 2012-10-27 09:25:18 +02:00
Bastien Guerry b1f20bde27 org-install.el: Enhance warning
* org-install.el: Enhance warning.

Thanks to Simon Thum for requesting this.
2012-10-27 09:25:14 +02:00
Bastien Guerry 4c3527d2e6 Merge branch 'maint' 2012-10-27 09:08:35 +02:00
Bastien Guerry 1fe4e9ecc7 org.texi (Installation): Mention "make test" in the correct section
* org.texi (Installation): Mention "make test" in the correct
section.

Thanks to Uvius for reporting this problem.
2012-10-27 09:08:28 +02:00