Commit Graph

9531 Commits

Author SHA1 Message Date
Nicolas Goaziou 711d2ef0e0 org-element: Syntax change for caption
* contrib/lisp/org-element.el (org-element-dual-keywords): Move
  caption in the dual keywords category.
(org-element--affiliated-re): Change regexp matching a dual keyword.
(org-element-collect-affiliated-keywords): Dual parsed keywords also
  get their optional value parsed as a secondary string.
* EXPERIMENTAL/org-e-latex.el (org-e-latex--caption/label-string,
  org-e-latex-src-block): Apply caption status change.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--build-caption): Apply
  caption status change.
(org-e-ascii--list-listings, org-e-ascii--list-tables): Apply caption
  status change.  Also use short caption name when available.

The status change implies a syntax change.  Captions can now share
#+results: syntax, which mean that they can have a secondary
value. Thus, the following Org snippets are valid, the first two being
equivalent.

#+caption: long name
#+caption[]: long name
#+caption[short name]: long name
2012-01-22 21:34:00 +01:00
Nicolas Goaziou 0f29f23b06 org-element: Fix code typo
* contrib/lisp/org-element.el (org-element-string-restrictions):
  Correct name for both verbatim and emphasis successor is
  text-markup.
2012-01-22 14:30:03 +01:00
Nicolas Goaziou d41b9803e2 org-export: Do not export subtree titles as-is
* contrib/lisp/org-export.el (org-export-get-subtree-options):
  Interpret subtree title as a secondary string, not as a simple string.
2012-01-22 14:27:51 +01:00
Nicolas Goaziou f694c3d996 org-export: Fix some errors and corner cases with macros
* contrib/lisp/org-export.el (org-export-get-inbuffer-options):
  Replace macro with an empty string when no value is provided.
  Ignore macros with an ill-formed key.
2012-01-22 10:37:28 +01:00
Nicolas Goaziou fc93b6f340 org-export: Ask user for a file name when exporting from temporary buffer
* contrib/lisp/org-export.el (org-export-output-file-name): Ask user
  for a file name when exporting from temporary buffer.
2012-01-21 22:58:23 +01:00
Nicolas Goaziou 58b509c091 ASCII back-end for new export engine
* EXPERIMENTAL/org-e-ascii.el: New file.
* contrib/lisp/org-export.el (org-export-dispatch): Reference E-ASCII
  back-end in dispatcher.
2012-01-21 20:40:15 +01:00
Nicolas Goaziou 588a7c261b org-element: Correctly parse inlinetasks before first headline
* contrib/lisp/org-element.el (org-element-section-parser): Correctly
  parse inlinetasks before first headline.
2012-01-21 20:38:22 +01:00
Nicolas Goaziou f86de3d233 org-export: Export standard drawers by default
* contrib/lisp/org-export.el (org-export-with-drawers): Export
  standard drawers by default.
2012-01-21 20:16:33 +01:00
Nicolas Goaziou a5766a98d5 org-export: Fix option item for drawers
* contrib/lisp/org-export.el (org-export-option-alist): Use "d"
  instead of "drawer".
2012-01-21 20:04:51 +01:00
Nicolas Goaziou 96dc2b01ce org-e-latex: Silence byte-compiler 2012-01-21 16:51:15 +01:00
Nicolas Goaziou 76f249b4f3 org-export: Filters can only be list of functions
* contrib/lisp/org-export.el
  (org-export-filter-center-block-functions,
  org-export-filter-drawer-functions,
  org-export-filter-dynamic-block-functions,
  org-export-filter-headline-functions,
  org-export-filter-inlinetask-functions,
  org-export-filter-plain-list-functions,
  org-export-filter-item-functions,
  org-export-filter-comment-functions,
  org-export-filter-comment-block-functions,
  org-export-filter-example-block-functions,
  org-export-filter-export-block-functions,
  org-export-filter-fixed-width-functions,
  org-export-filter-footnote-definition-functions,
  org-export-filter-horizontal-rule-functions,
  org-export-filter-keyword-functions,
  org-export-filter-latex-environment-functions,
  org-export-filter-babel-call-functions,
  org-export-filter-paragraph-functions,
  org-export-filter-property-drawer-functions,
  org-export-filter-quote-block-functions,
  org-export-filter-quote-section-functions,
  org-export-filter-section-functions,
  org-export-filter-special-block-functions,
  org-export-filter-src-block-functions,
  org-export-filter-table-functions,
  org-export-filter-verse-block-functions,
  org-export-filter-emphasis-functions,
  org-export-filter-entity-functions,
  org-export-filter-export-snippet-functions,
  org-export-filter-footnote-reference-functions,
  org-export-filter-inline-babel-call-functions,
  org-export-filter-inline-src-block-functions,
  org-export-filter-latex-fragment-functions,
  org-export-filter-line-break-functions,
  org-export-filter-link-functions, org-export-filter-macro-functions,
  org-export-filter-radio-target-functions,
  org-export-filter-statistics-cookie-functions,
  org-export-filter-subscript-functions,
  org-export-filter-superscript-functions,
  org-export-filter-target-functions,
  org-export-filter-time-stamp-functions,
  org-export-filter-verbatim-functions): Only allow list of functions.
2012-01-21 15:29:25 +01:00
Nicolas Goaziou 5f81b563e0 org-export: Implement access to filters through communication channel
* contrib/lisp/org-export.el (org-export-option-alist): Add filters as
  properties in the communication channel.  This allows back-end
  developers to install their own filters at run time instead of
  making them reside in a global variable.
(org-export-data, org-export-as): Read filters from communication
  channel instead of global variables.
(org-export-filter-apply-functions): Only accept list of functions.
  Also change order of calling: it is now LIFO.
2012-01-21 15:23:49 +01:00
Nicolas Goaziou e760c0c1f2 org-export: Fix code typos 2012-01-20 20:27:04 +01:00
Nicolas Goaziou b6610f8609 org-export: Change signature of collect functions
* contrib/lisp/org-export.el (org-export-collect-elements): Change
  output to list of elements instead of their beginning position.
  Also add an optional predicate argument for fine grain control.
  Remove back-end argument.
(org-export-collect-tables, org-export-collect-listings): Apply
  changes from previous function.
(org-export-collect-figures): Apply changes from previous function.
  Also require a predicate to correctly define the concept of figure.
2012-01-20 20:12:30 +01:00
Nicolas Goaziou 3dc734eaf2 org-export: Correctly handle predicate in `org-export-get-ordinal'
* contrib/lisp/org-export.el (org-export-get-ordinal): Correctly
  handle predicate in `org-export-get-ordinal'. Also allow to count
  more than one element type in the same sequence with optional
  argument TYPES.
2012-01-20 20:12:30 +01:00
Eric Schulte 10f26fb805 Merge branch 'origin-maint' 2012-01-20 12:00:31 -07:00
Eric Schulte 4f5b6317b5 correctly position point when mapping hits an inline code block
* lisp/ob.el (org-babel-map-executables): Correctly position point when
  mapping hits an inline code block.
2012-01-20 11:59:53 -07:00
Litvinov Sergey f92facd890 Map "screen" to shell-script-mode 2012-01-20 11:47:13 -07:00
Eric Schulte 97e8e03eea Ensure params are incorporated *before* checking if evaluation is legal
* lisp/ob.el (org-babel-execute-src-block): Ensure params are
  incorporated *before* checking if evaluation is legal.
2012-01-20 11:44:12 -07:00
Eric Schulte 5a0bf5e7d1 Ensure markers are used during lob export
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Ensure `end' is a
  marker so it is updated as required during export.
2012-01-20 11:32:49 -07:00
Eric Schulte 5852cf7fbf tangle the parent buffer of a code edit buffer
* lisp/org-src.el (org-src-in-org-buffer): Run commands in the parent
  buffer.
  (org-edit-src-save): Use new macro.
  (org-src-tangle): Tangle the parent buffer.
2012-01-20 11:00:46 -07:00
Eric Schulte 041c68f586 Merge branch 'maint' of orgmode.org:org-mode into origin-maint 2012-01-20 10:55:32 -07:00
Konrad Hinsen f2a9d83824 Support for links to IMAP folders in org-vm.el 2012-01-20 17:06:04 +01:00
Bastien Guerry d19a347a8b 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-01-20 16:45:53 +01:00
Bastien Guerry c79c5767d3 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-01-20 16:44:25 +01:00
Bastien Guerry fd233c0491 org.el (org-return): Act normally when in code blocks.
* org.el (org-return): Act normally when in code blocks.

Thanks to Sébastien Vauban for spotting this.
2012-01-20 16:32:03 +01:00
Bastien Guerry ed1a701cf5 org.el: `org-context' now returns :clocktable and :src-block.
* org.el (org-in-src-block-p): New function.
(org-context): Return new contexts :clocktable and :src-block.
2012-01-20 16:28:04 +01:00
Bastien Guerry d447fe8792 org.el: Make ̀C-u C-c C-q' do the right thing even when point is before the first heading.
* org.el (org-set-tags-command, org-set-tags): Make ̀C-u C-c
C-q' do the right thing even when point is before the first
heading.

Thanks to François Pinard for mentioning this.
2012-01-20 15:44:16 +01:00
Eric Schulte bded90ba48 Disambiguate intersection name.
* lisp/ob.el (org-babel-noweb-p): Disambiguate intersection name.
2012-01-19 15:04:36 -07:00
Jambunathan K 5bbc0a593e 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-01-20 00:12:11 +05:30
Nicolas Goaziou 95744ce7f8 org-element: Fix docstrings 2012-01-19 19:14:41 +01:00
Nicolas Goaziou 3bace4b335 org-element: Use correct regexp to identify comments at column 0
* contrib/lisp/org-element.el (org-element-guess-type,
org-element-current-element): Use correct regexp to identify comments
at column 0.
2012-01-19 19:14:41 +01:00
Eric Schulte 3be1f755b0 Merge branch 'origin-maint' 2012-01-19 11:07:41 -07:00
Eric Schulte 70c58b93f1 Revert "remove #+name and #+result hiding"
This reverts commit 8a8a56c277.
2012-01-19 11:07:12 -07:00
Eric Schulte b44c08dd45 remove all calls to `gensym'
* lisp/ob.el (org-babel-map-src-blocks): Replace gensym with make-symbol.
  (org-babel-map-inline-src-blocks): Replace gensym with make-symbol.
  (org-babel-map-call-lines): Replace gensym with make-symbol.
  (org-babel-map-executables): Replace gensym with make-symbol.
2012-01-19 11:07:11 -07:00
Nicolas Goaziou c2fd307df3 org-element: Fix `quote-section' detection and parsing
* contrib/lisp/org-element.el (org-element-quote-section-parser):
  Assume point is at quote-section beginning.
(org-element-guess-type): Move point to section beginning before
  calling for quote-section parser.
(org-element-parse-elements, org-element-current-element): Correctly
  detect and parse quote section.
2012-01-19 18:09:10 +01:00
Nicolas Goaziou 6c9c6eff05 org-export: Fix docstrings 2012-01-19 17:14:22 +01:00
Nicolas Goaziou c12246931f org-export: Add a function to resolve id or custom-id links
* contrib/lisp/org-export.el (org-export-resolve-id-link): New function.
2012-01-19 17:07:18 +01:00
Bastien Guerry 95e71f5705 Revert "Honour existing restrictions when visiting tasks from the agenda"
This reverts commit 8f93a75cac.
2012-01-19 16:21:50 +01:00
Bastien Guerry 3a6c081367 Revert "Honour existing restrictions when regenerating the agenda"
This reverts commit a0a26cddda.
2012-01-19 16:20:12 +01:00
Bastien Guerry 9b9f2d0d8d Revert "Honour existing restrictions when clocking in from the agenda"
This reverts commit c41a6f5a33.
2012-01-19 16:20:07 +01:00
Bastien Guerry a7c6f70ab1 Revert "Remove file restrictions when generating clock report data"
This reverts commit 7a73e155a3.
2012-01-19 16:19:42 +01:00
Nicolas Goaziou 46ff3b7a56 org-export: Remove :point-max property
* contrib/lisp/org-export.el (org-export-last-sibling-p): Make use
  of :genealogy property instead.
(org-export-get-point-max): Removed function.
(org-export-collect-tree-properties): Remove :point-max property.
2012-01-18 23:45:02 +01:00
Nicolas Goaziou 0bd090379b org-element: Fix block parsing
* contrib/lisp/org-element.el (org-element-parse-elements): Fix
  erroneous block parsing introduced by recent speed improvements.
  Also refactor code a bit.
2012-01-18 22:12:36 +01:00
Nicolas Goaziou 3c4a0795df Fix some docstrings 2012-01-17 21:06:30 +01:00
Nicolas Goaziou ecfb12de19 New interactive export functions for 'e-latex back-end
* EXPERIMENTAL/org-e-latex.el (org-e-latex-export-to-latex,
  org-e-latex-export-to-pdf): New functions.
* contrib/lisp/org-export.el (org-export-dispatch): Make use of new
  functions.
2012-01-17 20:27:38 +01:00
Nicolas Goaziou 418f63c8b1 org-export: Externalize output file name retrieval
* contrib/lisp/org-export.el (org-export-output-file-name): New function.
(org-export-to-file): Remove post-process and pub-dir arguments. Add
a file argument to specify an output file.
2012-01-17 19:14:14 +01:00
Bastien Guerry 7233671658 Merge branch 'master' of orgmode.org:org-mode 2012-01-17 08:44:38 +01:00
Eric Schulte 94f10ddfd7 don't always replace <<noweb>> references when :exports both
* lisp/ob-exp.el (org-babel-exp-results): Alter a copy of info.
* testing/examples/babel.org (an): Example data for test behavior.
* testing/lisp/test-ob-exp.el (ob-exp/noweb-no-export-and-exports-both):
  Confirm proper behavior.
2012-01-16 20:39:12 -07:00
Jambunathan K bf1d5cfe95 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-01-17 02:25:47 +05:30