Commit Graph

9693 Commits

Author SHA1 Message Date
Jambunathan K 7c8e9125cb Merge remote-tracking branch 'origin/maint' 2012-03-01 19:19:29 +05:30
Jambunathan K 8506c90c4b org-lparse.el: Correctly handle footnote refs in a list item
* org-lparse.el (org-lparse-end-footnote-definition): Cleanup
newlines in a transcoded footnote definition.  This ensures
that the line that is currently being processed by
`org-do-lparse' loop doesn't get broken up into multiple
lines.  Fix for the following bug -
2012-03-01 19:16:04 +05:30
Jambunathan K 4d58568076 org-e-html: Fix mathjax 2012-03-01 10:53:45 +05:30
Nicolas Goaziou f0af36a348 Merge branch 'maint' 2012-02-29 23:06:17 +01:00
Jambunathan K f6727a9dde org-footnote: Workaround a limitation in the ODT exporter
* lisp/org-footnote.el (org-footnote-normalize): Force a paragraph
break after the last footnote definition.  This is an an
implicit assumption made by the org-lparse.el library.  With
this change, footnote definitions can reliably be exported
with ODT backend.  See
http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg01013.html.
2012-02-29 22:48:17 +01:00
Eric Schulte 7fa08ef095 fix a recursive load error, Thanks to Richard Hansen for pointing this out
* lisp/ob-ditaa.el (org-ditaa-jar-path): Fix a recursive load error.
2012-02-29 13:23:29 -07:00
Nicolas Goaziou b2fb61cd56 Merge branch 'maint' 2012-02-29 21:04:52 +01:00
Nicolas Goaziou bdb66b4c61 org-list: Fix small bug
* lisp/org-list.el (org-list-struct): Fix small bug introduced by
  commit 8b7a3f2498.
* testing/lisp/test-org-list.el: Add test.
2012-02-29 21:04:15 +01:00
Nicolas Goaziou 701e99e923 org-element: Fix misleading comments 2012-02-29 19:06:50 +01:00
Nicolas Goaziou 73c5044963 org-export: Add `org-export-headline-numbered-p' predicate
* contrib/lisp/org-export.el (org-export-numbered-headline-p): New function.
* EXPERIMENTAL/org-e-ascii.el: Apply new function.
* EXPERIMENTAL/org-e-latex.el: Apply new function.
* testing/lisp/test-org-export.el: Add a test.
2012-02-29 19:05:45 +01:00
Nicolas Goaziou 8740f212d0 Move two test files into common test directory
* testing/lisp/test-org-element.el: Moved location from
  testing/contrib/lisp/ to testing/lisp.
* testing/lisp/test-org-export.el: Moved location from
  testing/contrib/lisp/ to testing/lisp.
2012-02-29 18:39:32 +01:00
Eric Schulte e5fa93c9be fix two build complaints 2012-02-29 09:28:34 -07:00
Eric Schulte deb376ff4f remove duplicate definition of org-ditaa-jar-path
* lisp/ob-ditaa.el (org-ditaa-jar-path): Already defined in
  org-exp-blocks.el.
* lisp/org-exp-blocks.el (org-ditaa-jar-path): Declare appropriately
  for the fact that this is really now a Babel thing -- even if it is
  used here and the definition should remain here for reasons of load
  dependencies.
2012-02-29 09:26:27 -07:00
Eric Schulte 87fe06b313 removing trailing ")"s 2012-02-29 09:10:08 -07:00
Eric Schulte 3234811c49 cleaning headers of test files -- removing loads and requires 2012-02-29 09:10:08 -07:00
Jambunathan K 58be118602 org-e-html: Some fixes and more cleanups 2012-02-29 14:09:14 +05:30
Eric Schulte 5061de6ee3 integrating ob-scala and ob-io into Org-mode, with code cleanup 2012-02-28 19:45:01 -07:00
Andrzej Lichnerowicz 806ce38c57 support for execution of Scala code blocks 2012-02-28 19:39:50 -07:00
Andrzej Lichnerowicz f66908cca1 support for execution of IO code blocks 2012-02-28 19:38:05 -07:00
Eric Schulte e4ac36225d org-bibtex-extras --- extras for working with org-bibtex entries
A contributed package which is still in early development, but
  should eventually have some fun extras for working with org-mode
  bibtex entries
2012-02-28 13:01:22 -07:00
Jambunathan K d37b3681d6 org-e-odt: Few cleanups 2012-02-28 13:09:10 +05:30
Nicolas Goaziou d25dc1ed18 org-e-latex: Don't ignore num:number option
* EXPERIMENTAL/org-e-latex.el (org-e-latex-headline): Don't ignore
  num:number option.
2012-02-27 22:21:20 +01:00
David Maus ab36517016 Merge branch 'maint' 2012-02-27 21:32:57 +01:00
David Maus ddf4f1e7a9 org-bbdb: Wrap defvar org-bbdb-old in eval-after-load
* org-bbdb.el (org-bbdb-old): Wrap `defvar' so the variable gets
  defined after bbdb was loaded.

Thanks to Nick Dokos for reporting this glitch in
<8273.1330161610@alphaville>.
2012-02-27 21:22:39 +01:00
Eric Schulte 8748096674 Merge branch 'origin-maint' 2012-02-26 10:10:23 -07:00
Eric Schulte a8234eb7f1 Don't add spurious preceding newline if caption is not above a longtable
* lisp/org-latex.el (org-export-latex-tables): Don't add spurious
  preceding newline if caption is not above a longtable.
2012-02-26 10:09:49 -07:00
Nicolas Goaziou fcd4418a70 org-element: Refactor code 2012-02-26 13:24:27 +01:00
Nicolas Goaziou 29e633f7cd org-element: Fix small bug in org-element-map
* contrib/lisp/org-element.el (org-element-map): Don't forget to apply
  function on paragraph even when no object should be mapped.  Just
  don't recurse in it.
2012-02-26 11:24:26 +01:00
Nicolas Goaziou c166bfbb1a org-export: fix bug with nested footnotes in invisible definitions
* contrib/lisp/org-export.el (org-export-collect-footnote-definitions):
  Also collect footnotes in footnote definitions
(org-export-get-footnote-number): Remove unused check.
* testing/contrib/lisp/test-org-export.el: Add test.
2012-02-26 10:57:42 +01:00
Nicolas Goaziou 12c94310a2 org-export: Allow nested footnotes (part 2)
* EXPERIMENTAL/org-e-latex.el (org-e-latex-footnote-reference):
  Correctly handle numbering with nested footnotes.
* contrib/lisp/org-element.el (org-element-map): Apply function to
  element or object before applying it to its secondary string, if
  any.  Otherwise, linearity is broken.
* contrib/lisp/org-export.el (org-export-footnote-first-reference-p,
  org-export-get-footnote-number): Take care of recursive footnotes.
(org-export-get-genealogy): Correctly get genealogy of an item within
a secondary string.
* testing/contrib/lisp/test-org-export.el: Add tests.
2012-02-26 01:38:26 +01:00
Jambunathan K 73f2ff2acc Merge remote-tracking branch 'origin/maint' 2012-02-26 00:55:00 +05:30
Jambunathan K 580218709b org-odt.el: Fix a regression in handling TOC
* lisp/org-odt.el (org-odt-insert-toc): Remove this stray,
dysfunctional routine.  This possibly has crept in because of the
broken merges between "maint" and "origin" branches.
(org-odt-begin-table): Don't emit an empty paragraph when a table is
neither labelled or captioned.
(org-odt-init-outfile): Remove reference to an unused variable.
2012-02-26 00:43:59 +05:30
Viktor Rosenfeld bd3b1aee2f add support for MonetDB to SQL code blocks
* lisp/ob-sql.el(org-babel-execute:sql): Add support for MonetDB to
  SQL code blocks.

  Hi,

  the attached patch adds support for evaluating SQL blocks on MonetDB.
  The MonetDB client normally requires the password to be inputted on the
  console. To get around this, you have to use a dotfile ~/.monetdb with
  authentification data. Note that this file is ignored if you specify a
  user on the cmdline. See
  http://www.monetdb.org/Documentation/mclient-man-page for details.

  A usage example follows.

  Setup MonetDB test database and authentification data

  #+BEGIN_SRC sh :results output verbatim
  MONETDB_DIR=$HOME/unix/var/monetdb/demodb
  monetdbd create $MONETDB_DIR
  monetdbd start $MONETDB_DIR
  monetdb create demodb
  monetdb release demodb
  cat > ~/.monetdb <<EOF
  user=monetdb
  password=monetdb
  EOF
  #+END_SRC

  #+RESULTS:
  : created database in maintenance mode: demodb
  : taken database out of maintenance mode: demodb

  Data is returned without column names (the default return format
  cannot be parsed by Babel).

  #+BEGIN_SRC sql :engine monetdb :cmdline demodb
  CREATE TABLE foo ( bar INTEGER );
  SELECT 'Table count', count(*) FROM foo;
  #+END_SRC

  #+RESULTS:
  | Table count | 0 |

  The parameter "-i" is required on the command line in order to use
  special client commands. Also note that a newline is required at the
  end if the last line contains a special client command.

  #+BEGIN_SRC sql :engine monetdb :cmdline demodb -i :results output
  verbatim
  \d
  \?

  #+END_SRC

  #+RESULTS:
  #+begin_example
  TABLE  sys.foo
  \?      - show this message
  \<file  - read input from file
  \>file  - save response in file, or stdout if no file is given
  \|cmd   - pipe result to process, or stop when no command is given
  \h      - show the readline history
  \D table- dumps the table, or the complete database if none given.
  \d[Stvsfn]+ [obj] - list database objects, or describe if obj given
  \A      - enable auto commit
  \a      - disable auto commit
  \e      - echo the query in sql formatting mode
  \f      - format using a built-in renderer {csv,tab,raw,sql,xml}
  \w#     - set maximal page width (-1=unlimited, 0=terminal width,
  >0=limit to num)
  \r#     - set maximum rows per page (-1=raw)
  \L file - save client/server interaction
  \X      - trace mclient code
  \q      - terminate session
  #+end_example

  Have fun!
2012-02-25 09:44:18 -07:00
Andreas Leha 87216ffa56 enhancements to org-babel-goto-named-src-block
> attached is a patch that enhances org-babel-goto-named-src-block (bound
> to C-c C-v g by default).  Included are two enhancements:
>
>  1. the point is pushed to the org-mark-ring, such that returning with
>     C-c & becomes possible
>  2. the target src block is guessed from
>      a) noweb-reference
>      b) #+call:
>      c) #+results:
>      d) symbol-at-point
>     if one of these is found (in that order)

* lisp/ob.el (org-babel-goto-named-src-block): Pushing the point to
  the org-mark-ring and guessing at the code block name to jump to.
2012-02-25 09:36:15 -07:00
Nicolas Goaziou 81cc6dff19 org-e-latex: Allow nested footnotes
* EXPERIMENTAL/org-e-latex.el (org-e-latex-footnote-reference): Allow
  nested footnotes.
* contrib/lisp/org-element.el (org-element-string-restrictions): Allow
  footnote references within a footnote reference.
* testing/contrib/lisp/test-org-export.el: Add a test for nested
  footnotes.
2012-02-25 14:56:37 +01:00
Nicolas Goaziou 5313dc9d09 org-export: Allow user to explicitely ignore parts of parse tree
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Do not overwrite any user's ignore list.
* testing/contrib/lisp/test-org-export.el: Add test.

A good way to populate `:ignore-list' is through the use of
`org-export-filter-parse-tree-functions', with the help of
`org-element-map' and `org-export-ignore-element'.  As an example, the
following code will skip every headline containing the word "note"
in its title during a LaTeX export:

(defun user-skip-note-headlines (data backend info)
  ;; For now LaTeX back-end is called `e-latex'.
  (when (eq backend 'test)
    ;; Traverse the parse tree, adding to ignore list any headline
    ;; matching criteria.
    (org-element-map
     data 'headline
     (lambda (headline)
       (when (string-match "\\<note\\>"
                           (org-element-property :raw-value headline))
         (org-export-ignore-element headline info)))
     info))
  ;; Return original DATA.
  data)

Then install it in parse-tree filters:

(add-to-list 'user-skip-note-headlines org-export-filter-parse-tree-functions)

Back-end delevopers will install it via `org-BACKEND-filters-alist'
where BACKEND stands for the name of the back-end considered.  Se
`org-export-filters-alist' for more information.
2012-02-25 14:55:21 +01:00
Nicolas Goaziou 9f7965a80e org-element: Function mapped through org-element-map accepts only one argument
* contrib/lisp/org-element.el (org-element-map): Remove use of an
  alternate communication channel.  Function is now called with only
  one argument.
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
(org-export-collect-headline-numbering, org-export--selected-trees,
org-export-collect-footnote-definitions,
org-export-footnote-first-reference-p,
org-export-get-footnote-number, org-export-resolve-fuzzy-link,
org-export-resolve-id-link, org-export-resolve-ref-link,
org-export-resolve-coderef, org-export-get-ordinal,
org-export-get-loc, org-export-collect-headlines): Apply changes.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--unique-links): Apply
  changes.
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index): Apply
  changes.
2012-02-25 14:53:35 +01:00
Nicolas Goaziou 3b3936b9a9 org-export: Do not ignore automatically elements with empty output
* contrib/lisp/org-export.el (org-export-data): org-export: Do not
  ignore automatically elements with empty output.
2012-02-25 14:53:34 +01:00
David Maus 2adf4b059b Merge branch 'maint' 2012-02-25 11:13:58 +01:00
David Maus 89949e69a3 org-agenda: Fix handling of indirect buffer and window
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Fix handling of
indirect buffer and window.

Check if the window of last indirect buffer is still live and properly
handle the case of `org-last-indirect-buffer' being nil.

Changes suggested by Dave Abrahams in <m2boow1q9e.fsf@boostpro.com>.
2012-02-25 11:13:33 +01:00
Nicolas Goaziou 752a531eb5 org-element: Refactor code 2012-02-24 22:33:16 +01:00
Nicolas Goaziou 404ede23fc org-element: Change algorithm for `org-element-at-point'
* contrib/lisp/org-element.el (org-element-at-point): Change
  algorithm.
(org-element-guess-type): Removed function.
(org-element--element-block-types): Removed variable.
(org-element-forward, org-element-backward, org-element-up): Rewrite
functions.
* testing/contrib/lisp/test-org-element.el: Add tests.
2012-02-24 17:52:43 +01:00
Nicolas Goaziou fc7c80c37e org-export: Minor UI change
* contrib/lisp/org-export.el (org-export-dispatch-ui): Small UI change.
2012-02-24 17:52:43 +01:00
Jambunathan K ad59c0c659 Merge remote-tracking branch 'origin/maint' 2012-02-24 16:27:19 +05:30
Jambunathan K f7ea4bef43 Makefile: Support DESTDIR in Makefile
* Makefile (install-lisp, install-info, install-data): Support
DESTDIR.

Patch by Ulrich Mueller <ulm@gentoo.org>. See
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00042.html
2012-02-24 16:20:25 +05:30
Nicolas Goaziou 847d2b434a Merge branch 'maint' 2012-02-24 09:45:21 +01:00
Nicolas Goaziou 9ae171a86e org-footnote: Allow footnotes in verse blocks
* lisp/org-footnote.el (org-footnote-forbidden-blocks): Allow
  footnotes in verse blocks.
2012-02-24 09:44:36 +01:00
Nicolas Goaziou a356059f38 org-footnote: Allow footnotes in verse blocks
* lisp/org-footnote.el (org-footnote-forbidden-blocks): Allow
  footnotes in verse blocks.
2012-02-24 09:42:15 +01:00
Nicolas Goaziou 94185eac92 org-export: Fix bug with recursive file inclusion and relative paths
* contrib/lisp/org-export.el (org-export-expand-include-keyword): Use
  another optional argument to specify the current working directory.
(org-export-as): Apply changes.
* testing/contrib/lisp/test-org-export.el: Add tests.
* testing/examples/include.org: New test file.
* testing/examples/include2.org: New test file.
2012-02-23 21:28:15 +01:00
Nicolas Goaziou 186f0f7594 org-element: Small refactoring
* contrib/lisp/org-element.el (org-element-parse-elements): Small refactoring.
2012-02-23 19:08:23 +01:00