Commit graph

4934 commits

Author SHA1 Message Date
Bastien Guerry c4dbff58be Whitespaces clean up. 2011-03-23 15:08:49 +01:00
Puneeth Chaganti a201b11286 Fix HTML export of footnotes with lists, tables, quotes, etc.
* org-html.el (org-export-as-html): Fix export of footnotes
containing lists, tables, quotes, etc.
2011-03-23 15:07:07 +01:00
Lawrence Mitchell c109334152 Protect starred commands in LaTeX export correctly
* lisp/org-latex.el (org-export-latex-preprocess): Correctly
match starred command names.

Many LaTeX commands exist in both normal and starred forms.  Adjust
the regexp in `org-export-latex-preprocess' to match the starred form
as well.
2011-03-23 15:05:43 +01:00
Lawrence Mitchell 9f57b8e85d Allow mixed export of numbered and unnumbered sections in HTML
* lisp/org-html.el (org-export-as-html): Get local value of
org-export-with-section-numbers from the buffer's plist.  Deal
specially with the case the resulting value is an integer.
(org-html-level-start): New optional argument of the option plist used
instead of `org-export-with-section-numbers'.  Also deal specially
with the case that the value is an integer.

When `org-export-with-section-numbers' (or the buffer-local
:section-numbers option) is an integer, we now export the first NUM
levels of headings with numbers and lower-level headings without.
2011-03-23 15:04:59 +01:00
Lawrence Mitchell 087d94b488 Allow mixed export of numbered and unnumbered sections in LaTeX
* lisp/org-latex.el (org-export-latex-subcontent): Deal specially with
the case that NUM is an integer.

We would sometimes like to have numbered \sections in LaTeX export but
unnumbered \subsections and so forth.  That is, use the starred
equivalents for all sectioning commands below a certain level.
Previously, the num: option specification could only specify whether
sections should be numbered or unnumbered at all levels.  We now treat
an integer value specially, if num:N is supplied then the highest N
levels are numbered, and lower levels are exported without numbering.
2011-03-23 15:04:27 +01:00
Bastien Guerry ac6e4c28b8 Allow org-protocol templates to be set to two characters.
* org-protocol.el (org-protocol-do-capture): allow template
keys of two characters.
(org-protocol-default-template-key): Update the docstring to
reflect the change in `org-protocol-do-capture'.
2011-03-23 10:25:38 +01:00
Bastien Guerry fab2788864 org-protocol.el: minor documentation and formatting clean up. 2011-03-23 10:14:03 +01:00
Puneeth Chaganti 078c01bf3b Tiny docstring fix in org-footnote.el
Hi,

A tiny docstring fix in org-footnote.el
2011-03-22 10:48:24 +01:00
Christian Egli f9923ecc4a Fix a typo in the commentary.
* org-taskjuggler.el: Fix a typo in the commentary.
2011-03-22 10:47:47 +01:00
Christian Egli e5340a3650 Fix allocations handling for tj3
* org-taskjuggler.el (org-taskjuggler-open-task): Only emit a "purge
allocations" statement if we are not targeting tj3.
2011-03-22 10:47:23 +01:00
Bastien Guerry ce9f1d858c Merge branch 't/patch707' 2011-03-22 10:44:53 +01:00
Christian Egli 70b8d8397f Replace recursive implementation with an iterative one
* org-taskjuggler.el (org-taskjuggler-assign-resource-ids): Replace
recursive implementation with an iterative one.

That way we can avoid to have ask users to increase
`max-lisp-eval-depth'.
2011-03-22 10:44:42 +01:00
Eric Schulte f702991626 ob-sh: fixed insertion of table data into shell variables
* lisp/ob-sh.el (org-babel-sh-var-to-sh): Fixed insertion of tabular
  data into shell variables.
2011-03-21 11:20:21 -06:00
David Maus 38c6b17822 Protected linebreak element after timestamp markup
* org-html.el (org-html-handle-time-stamps): Protected linebreak
element after timestamp markup.

Follow up of 1fb33b595d.
2011-03-21 06:45:10 +01:00
David Maus 1fb33b595d Don't protect img tag in link description
* org-html.el (org-html-handle-links): Don't protect img tag in link
description.

Follow up of 7b74ef1c13.
2011-03-20 12:14:36 +01:00
Carsten Dominik 3d802ee691 Keep byte compiler happy
* lisp/org-table.el (org-table-formula-handle-first/last-rc): Bind `char'.
2011-03-20 10:06:25 +01:00
Nicolas Goaziou 74169a8029 org-list: org-drawer-regexp is nil outside Org buffers
* lisp/org-list.el (org-in-item-p): re-build org-drawer-regexp,
  whatever the major mode is.
2011-03-20 09:10:53 +01:00
Nicolas Goaziou eab89fd82b org-inlinetask: modify export of inline tasks
* lisp/org-inlinetask.el (org-inlinetask-export-templates): fix
  default templates.
  (org-inlinetask-export-handler): Ensure contents of inline task, if
  any, starts and ends with a newline character. Refactor and comment
  code.
2011-03-19 18:18:28 +01:00
Carsten Dominik 6daac769f5 Minor fix
* lisp/org-capture.el (org-datetree-find-date-create): Lower-case for
variable names in define-function form.
2011-03-19 14:55:41 +01:00
Carsten Dominik bd089631fc Merge branch 'master' of orgmode.org:org-mode 2011-03-19 07:42:30 +01:00
Carsten Dominik 622599ca07 Avoid infinite loop when converting a table with prefix arg 0
* lisp/org-table.el (org-table-convert-region): Throw error when SEPARATOR
is smaller than 1.
2011-03-19 07:42:13 +01:00
Nicolas Goaziou 1bd87fb09f Fix export of empty items in HTML and DocBook 2011-03-18 18:36:22 +01:00
Julien Danjou 7dc1f1a973 org-colview: fix heading retrieval in Org buffers
* lisp/org-colview.el (org-columns-display-here): Fix heading retrieval in
Org buffers.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-18 18:05:12 +01:00
Nicolas Goaziou c01c2ad035 org-latex: fix lists in footnotes.
* lisp/org-latex.el (org-export-latex-preprocess): last brace
  shouldn't be on the same line as a list end marker.
2011-03-18 16:12:27 +01:00
Julien Danjou d5383b1769 org-icompleting-read cosmetic cleanup
* lisp/org.el (org-icompleting-read): Do not use useless lambda.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-18 15:24:31 +01:00
Julien Danjou 9939312b37 org-agenda: fix length computing
* lisp/org-agenda.el (org-format-agenda-item): Fix length computing.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-18 11:22:54 +01:00
Julien Danjou 7426874fd9 org-agenda: fix comment and use add-text-properties when formatting
* lisp/org-agenda.el (org-format-agenda-item): Fix comment and use
`add-text-properties'.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-17 17:50:39 +01:00
Julien Danjou 9216453a38 org-agenda: remove useless concat
* lisp/org-agenda.el (org-agenda-highlight-todo): Remove useless `concat'.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-17 17:50:39 +01:00
Nicolas Goaziou b6fc03b70c org-list: enhance list transformations and fix glitches
* lisp/org-list.el (org-list-to-generic): set a default term for
  ill-formed description lists. Do not insert newline characters
  unless told to.
  (org-list-to-texinfo,org-list-to-html): apply changes to
  `org-list-parse-liste'.
2011-03-17 16:11:04 +01:00
Bastien Guerry 294dcb25ab org-taskjuggler.el: fix `org-taskjuggler-targeting-tj3-p'.
Thanks to Christian Egli for checking this.
2011-03-17 11:56:21 +01:00
Bastien Guerry 39dacd3e7e Tiny docstring typo. 2011-03-17 11:41:39 +01:00
Bastien Guerry 5a351a23e8 org-clock.el: localize the "Clock summary at" string.
* org-clock.el (org-clock-clocktable-language-setup): Add a
string.
(org-clocktable-write-default): Use the new localized string
in `org-clock-clocktable-language-setup'.
2011-03-17 11:22:00 +01:00
Bastien Guerry 58e351efbf * org-taskjuggler.el (org-taskjuggler-compute-task-leafiness):
(org-taskjuggler-assign-resource-ids): Replace recursive
implementation with an iterative one.

That way we can avoid to have ask users to increase
`max-lisp-eval-depth'.
2011-03-17 09:52:01 +01:00
Christian Egli 8b1260aa08 Escape double quotes in headlines
* org-taskjuggler.el (org-taskjuggler-components): Escape quotes in
headlines.

Taskjuggler will barf if the task names (which are double quoted
strings) contain double quotes.
2011-03-17 09:48:55 +01:00
Bastien Guerry 16a1897fd9 Whitespaces clean up. 2011-03-17 09:48:19 +01:00
Christian Egli 786957ed91 Mark a task as a milestone if it is a leaf node and cannot be scheduled
* org-taskjuggler.el (org-taskjuggler-compute-task-leafiness): Compute
the leafiness of a node.
(org-taskjuggler-open-task, org-export-as-taskjuggler): Mark a node as
a milestone if it is a leaf and has no effort.

Mark a task as a milestone if it has neither an effort, a duration, an
end or a period. This is needed for tj3 export as tj3 fails to compile
the file if there is a leaf node with no computable end date. tj2
happily ignored the situation, but TJ3 throws an error.
2011-03-17 09:45:22 +01:00
Christian Egli 1eb1152155 Add some minimal infrastructure to handle export to both tj2 and tj3
* org-taskjuggler.el (org-export-taskjuggler-target-version):
(org-taskjuggler-targeting-tj3-p): Add some minimal infrastructure to
handle export to both tj2 and tj3.
(org-taskjuggler-open-task): Use a different way to purge allocations
for tj2 and tj3.
2011-03-17 09:26:50 +01:00
Matt Lundin 743bb4e14f New option to create unique, random labels for footnotes.
* lisp/org-footnote.el: (org-footnote-auto-label): New random option
* lisp/org-footnote.el: (org-footnote-new): Create random footnote
  labels with unique ids
2011-03-17 09:25:10 +01:00
Matt Lundin 2444744985 Prevent creation of duplicate footnote sections.
* lisp/org-footnote.el: (org-footnote-create-definition): Allow for
  footnote sections above the current footnote insertion point.

Fixes bug in which org-mode will create a new footnote section if the
current footnote section is not beneath the current insertion point.
2011-03-17 09:24:30 +01:00
Matt Lundin 51244d5344 Goto correct footnote insertion point in org-mode buffers
* lisp/org-footnote.el: (org-footnote-create-definition): Don't search
  for last footnote when in org-mode file.

The recent changes to accommodate signatures in message-mode instruct
org-mode to search for the last footnote in the entire buffer when
inserting a new footnote definition. This causes problems in org
buffers, since org-footnote-goto-local-insertion-point already finds
the correct insertion point. (I.e., the insertion point is always
placed in beneath the last footnote in the buffer, even if
org-footnote-section is nil.) This patch invokes the search only if in
non org-mode buffers.
2011-03-17 09:24:02 +01:00
Bastien Guerry 7b74ef1c13 org-html.el: Fix problems with special chars in links.
* org-html.el (org-export-as-html): Handle links with
`org-html-handle-links' after we handle special characters
conversions.
(org-html-make-link, org-export-html-format-image): Don't
protect html with @ anymore, as links are now handled after
special characters conversions.
2011-03-17 09:07:14 +01:00
Carsten Dominik 3dd4745752 Tables: Make @< and $< point to row/column 1 in a stable way 2011-03-17 06:50:39 +01:00
Julien Danjou 706a0b509c org-agenda: remove no-prefix argument
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-scheduled): Fix call to `org-format-agenda-item'.
(org-format-agenda-item): Remove no-prefix argument.
(org-agenda-change-all-lines): Call org-format-agenda-item without the
no-prefix argument.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-16 18:26:29 +01:00
Julien Danjou c84d77a7a0 org-agenda: remove prefix-length property
* lisp/org-agenda.el (org-agenda-highlight-todo): Stop using prefix-length.
(org-cmp-alpha): Stop using prefix-length.
(org-agenda-open-link): Stop using prefix-length.
(org-agenda-change-all-lines): Stop using prefix-length.
* lisp/org-colview-xemacs.el (org-columns-display-here): Stop using
prefix-length. Always return claned items.
* lisp/org-colview.el (org-columns-display-here): Stop using
prefix-length. Always return claned items.
* lisp/org-mobile.el (org-mobile-write-agenda-for-mobile): Stop using
prefix-length.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-16 18:18:23 +01:00
Bastien Guerry 0b8852b5c1 org-crypt.el: only send a warning when Emacs is not running in daemon mode. 2011-03-16 17:13:36 +01:00
Eric Schulte 59ad74f047 Merge branch 'master' of orgmode.org:org-mode 2011-03-16 07:45:51 -06:00
Eric Schulte 814012ca80 ob-tangle: don't call `org-store-link' interactively when tangling
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Don't call
  `org-store-link' interactively as it can confuse the setting of
  `org-link-to-org-use-id' and cause undue edits to the org-mode
  buffer during tangling.
2011-03-16 07:45:27 -06:00
Nicolas Goaziou 87c427981f Open a new paragraph when closing a list in HTML and DocBook 2011-03-15 21:51:19 +01:00
David Maus c295c09fb2 Protect <p> element of image caption.
* org-html.el (org-export-html-format-image): Protect <p> element of
image caption.

Follow up of 1052f07ecf, forgot a <p>
element.
2011-03-15 21:18:40 +01:00
Carsten Dominik f4387417c4 Improve handling of years with limitations on representable dates
* lisp/org.el (org-read-date-force-compatible-dates): New option.
(org-read-date, org-read-date-analyze): Check representable date range.
* doc/org.texi (The date/time prompt): Document date range protection.

New variable `org-read-date-force-compatible-dates' to control
handling of dates.
2011-03-15 20:01:33 +01:00
Bastien Guerry 0dc16a0fe9 Merge branch 'master' of orgmode.org:org-mode 2011-03-15 18:36:22 +01:00
Bastien Guerry 76a8c2bb17 * org-html.el (org-export-as-html): fix export of email. 2011-03-15 18:36:10 +01:00
Eric Schulte cf076fd654 adding support for Maxima code blocks -- thanks to Eric Fraga 2011-03-15 11:25:40 -06:00
Eric Schulte d0a4ed53f1 ob: new header argument `padline' controls newline padding around tangled code
* lisp/ob-tangle.el (org-babel-spec-to-string): Check value of padline
  on tangling, no longer use the now-removed variable
  `org-babel-tangle-pad-newline'.
* lisp/ob.el (org-babel-header-arg-names): Add padline to the list of
  header argument names.
  (org-babel-default-header-args): Set the default value of padline to
  "yes".
  (org-babel-merge-params): Cleaned up the merge logic, added padline.
* doc/org.texi (padline): Documentation of the new padline header
  argument.
2011-03-15 11:16:09 -06:00
Eric Schulte ae68febfbb ob: adding "shebang" to known code block header argument names
* lisp/ob.el (org-babel-header-arg-names): Adding "shebang" to known
  code block header argument names.
2011-03-15 10:44:26 -06:00
Bastien Guerry 4d9f2b4baf * org-crypt.el: remove useless TODO in comments. 2011-03-15 16:24:32 +01:00
Bastien Guerry b6b7057467 Tiny docstring fix. 2011-03-15 16:18:38 +01:00
Bastien Guerry 1b02fe8c6e org-html.el: let `org-export-time-stamp-file' control the postamble date.
* org-html.el (org-export-as-html): the default postamble now
only export a date paragraph if `org-export-time-stamp-file'
is non-nil.
2011-03-15 15:53:36 +01:00
Bastien Guerry df38f5648c * org-exp.el (org-export-xml): Remove the defgroup of org-export-xml. 2011-03-15 15:43:12 +01:00
Bastien Guerry a786464ae8 Various fixes for org-export-html-preamble/postamble.
* org-html.el (org-export-html-insert-plist-item): Remove.
(org-export-html-preamble): Default to `t'.  Accept functions.
(org-export-html-postamble): Default to `auto'.  Accept
functions and distinguish between 'auto (no formatting string)
and `t' (default formatting string).
(org-export-as-html): Handle org-export-html-preamble and
org-export-html-postamble new defaults/allowed values.
Define email and creator-info before using them.
2011-03-15 15:36:25 +01:00
Bastien Guerry 187b47f412 Merge branch 'master' of orgmode.org:org-mode 2011-03-15 14:13:40 +01:00
Bastien Guerry 2ff34a5fac * org-html.el (org-export-html-protect-char-alist): Fix typo in custom type definition. 2011-03-15 14:13:25 +01:00
Eric Schulte c6b81ca3a1 ob-exp: no longer requires :session to have an argument for eval on export
* lisp/ob-exp.el (org-babel-exp-do-export): Now runs for empty
  :session arguments.
2011-03-15 07:12:25 -06:00
Nicolas Goaziou f8c627a44b org-list: fix parsing of counters
* lisp/org-list.el (org-list-parse-list): fixed regexp.
2011-03-14 23:36:19 +01:00
David Maus 1052f07ecf Protect image elements
* org-html.el (org-export-html-format-image): Protect image elements.

Follow up of 6a369c26d3.
2011-03-14 20:38:04 +01:00
Eric Schulte bb2dd85938 Merge branch 'master' of orgmode.org:org-mode 2011-03-14 09:31:47 -06:00
Eric Schulte a793b77625 ob-tangle: new hook for pre-processing code block bodies on tangling
* lisp/ob-tangle.el (org-babel-tangle-body-hook): Hook for changing
  the contents of a code block body on export.
  (org-babel-tangle-collect-blocks): Apply
  `org-babel-tangle-body-hook' to the collected bodies of code blocks.
2011-03-14 09:31:33 -06:00
David Maus 6a369c26d3 Expand char entities after creating markup for links and timestamps
* org-html.el (org-html-make-link, org-html-handle-links): Protect
generated XHTML elements.
(org-export-as-html): Expand character entities after creating markup
for links and timestamps.

This fixes a problem with exporting active timestamps, reported by
Daniel Clemente <n142857@gmail.com>.
2011-03-13 20:27:12 +01:00
David Maus c6f5bf72e9 Revert "Fix bug when exporing inactive timestamps."
This reverts commit ca69b55624.
2011-03-13 20:08:10 +01:00
Nicolas Goaziou df26ae8e69 Checkboxes should progress from intermediate state to checked
Thanks to Matt Lundin for pointing that out.
2011-03-12 16:40:37 +01:00
Bastien Guerry 70de130bba * org-html.el (org-export-as-html): bugfix: insert email correctly.
Thanks to Bernt Hansen for spotting this.
2011-03-12 05:22:41 +01:00
Kim Rutherford 3bf379aee9 Fix for infinite loop in org-html-protect
When I export the following as HTML, emacs hangs in org-html-protect:

#+begin_src org
&
#+end_src

The attached patch fixes the problem for me.

Thanks,
Kim.
>From cfb1ccb6f9cfd84530c73b7f72d686a2062b3c3b Mon Sep 17 00:00:00 2001
From: Kim Rutherford <kmr44@cam.ac.uk>
Date: Fri, 11 Mar 2011 16:44:09 +0000
Subject: [PATCH] Fix infinite loop in org-html-protect
2011-03-11 18:38:18 +01:00
Bastien Guerry ed8a9616a2 Revert "* org-html.el: Bugfix: prevent infinite matching of the `&' character."
This reverts commit f6752c805e.
2011-03-11 18:37:22 +01:00
Bastien Guerry f6752c805e * org-html.el: Bugfix: prevent infinite matching of the `&' character.
* org-html.el (org-html-protect): Bugfix: prevent infinite
matching of the `&' character.

This bug was spotted by Rehan Iftikhar.
2011-03-11 18:30:36 +01:00
Nicolas Goaziou efa562c1ee Fix compatibility with emacsen < 23
* lisp/org.el (org-fill-paragraph): fill-forward-paragraph function
  has been introduced with emacs 23.1.
2011-03-10 19:45:47 +01:00
Rodrigo Lazo a0dead7f10 Docstring fix for org-export-preprocess-string
Hi,

I found a trivial error with this docstring.

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb
2011-03-10 19:08:59 +01:00
Bastien Guerry aaf0bb3967 (org-attach-store-link-p): Use 'attached instead of 'attach-dir. 2011-03-10 11:25:17 +01:00
Bastien Guerry b1909f0afa (org-attach-store-link-p): Use `t' instead of 'origin for backward compatibility. 2011-03-10 11:22:33 +01:00
Bastien Guerry b814d83b51 * org-attach.el: Allow to store a link to the attach-dir location.
* org-attach.el (org-attach-store-link-p): Allow to create a
link to the attach-dir location of the file.
(org-attach-attach): Allow to store a link to the attach-dir
location.

This was requested by Darlan Cavalcante Moreira.
2011-03-10 11:18:40 +01:00
Bastien Guerry 25ea18739d Remove trailing whitespaces. 2011-03-10 10:42:57 +01:00
Puneeth Chaganti 5b1b94ac42 * org-agenda.el (org-agenda-bulk-action): Allow the user to run a function.
* org-agenda.el (org-agenda-bulk-action): Allow the user to
run a function.
2011-03-10 10:41:00 +01:00
Bernt Hansen 0f301d133b Allow clocking in new tasks inserted before the current clocking task
* lisp/org-clock.el (org-clock-in): Allow clocking in new tasks inserted
  before the current clocking task

org-clock-in now checks that the name of the task you are clocking in
also matches org-clock-current-task.  This allows us to insert a new
task in front of the current clocking task (with M-S-RET on the
heading of the current clocking task) and then clock in the new task.

Previously this just stated that clocking continues in the old task
since the marker point now matches the new task.

A side-effect of this change is that changing the current clocking
task headline and clocking in again will now close the current clock
and open a new entry as well as update the name of the current
clocking task in the modeline.
2011-03-10 10:21:19 +01:00
Bernt Hansen d008facdab Allow setting default clocking task to current clocking task
* lisp/org-clock.el (org-clock-in): Set default clocking task when already clocking the task

The default clocking task can now be set to the current clocking task.
Previously this just threw an error stating the clock continues in the
current clocking task.  The double prefix now forces setting the
default clocking task instead of forcing the user to clock out and
back in again just to set the default clocking task to the current
clocking task.
2011-03-10 10:20:40 +01:00
Nicolas Goaziou b12f0dd309 Fix fill-region in an item
* lisp/org.el (org-adaptive-fill-function): when a region is specified
  first line of paragraph isn't skipped, so fill-paragraph have to be
  computed even if point is at an item.
2011-03-10 00:51:03 +01:00
Nicolas Goaziou f8ca5d85ba org-list: small refactoring
* lisp/org-list.el (org-list-in-valid-block-p): new function.
(org-at-item-p,org-list-search-generic): use new function.
2011-03-09 20:30:18 +01:00
Nicolas Goaziou 6ff4c9f42f List indentation has priority over block indentation
* lisp/org.el (org-indent-line-function): text in both a list and
  a valid block is indented with regards to current item, not to block
  boundaries.
2011-03-09 17:48:16 +01:00
Manuel Giraud 72011fc407 org-html.el: correct HTML export of dedicated target.
* org-html.el (org-format-org-table-html): fix anchors in HTML
export (thanks to <aankhen@gmail.com>)
(org-html-protect): fix a  bug that prevents some target to be
rendered correctly.

* org-exp.el (org-solidify-link-text): a single "-" to avoid a
"&ndash" rewrite in HTML export later.
2011-03-09 16:37:32 +01:00
Bastien Guerry eafdbc575b * org.el (org-default-properties): Add EXPORT_TEXT. 2011-03-09 15:44:11 +01:00
Matt Lundin f920974f43 org-footnote.el: Fix sorting of footnotes.
* org-footnote.el (org-footnote-create-definition)
(org-insert-footnote-reference-near-definition): Fix sorting
of footnotes.
2011-03-09 11:42:56 +01:00
Manuel Giraud 44684a9977 org-html.el: Bugfix: don't insert closing HTML tags when exporting body only.
* org-html.el (org-export-as-html): Bugfix: don't insert
closing HTML tags when exporting body only.
2011-03-09 11:28:38 +01:00
Bastien Guerry 3151ef60be org.el (org-default-properties): Add EXPORT_OPTIONS.
(org-buffer-property-keys): docstring fix.
(org-default-properties): Add EXPORT_OPTIONS.

Thanks to Sébastien Vauban for catching this and his patch.
2011-03-09 11:17:33 +01:00
Bastien Guerry e6d74f9253 org.el: remove useless comment. 2011-03-09 11:06:57 +01:00
Jason Dunsmore 85f03c0859 Bugfix: honor `org-blank-before-new-entry' correctly in various contexts.
* org.el (org-back-over-empty-lines): Bugfix.  Honor
`org-blank-before-new-entry' correctly in various contexts.
2011-03-09 11:06:09 +01:00
Bastien Guerry f54814d108 org-macs.el (org-with-wide-buffer): Bugfix.
* org-macs.el (org-with-wide-buffer): Bugfix: use
`save-excursion' and `save-restriction'.
2011-03-09 10:56:47 +01:00
Nicolas Goaziou 4090006ab1 org-list: fix confusion due to indent-tabs-mode 2011-03-08 23:49:39 +01:00
Nicolas Goaziou 11f19abcf2 org-timer: fix bug with `org-timer-item'
* lisp/org-timer.el (org-timer-item): save-excursion prevents
  `org-list-struct' to get the list structure when point isn't on the
  first line of the item.
2011-03-08 10:40:46 +01:00
Bastien Guerry 4fc3e71f10 Merge branch 'master' of orgmode.org:org-mode 2011-03-07 17:25:11 +01:00
Bastien Guerry 9784af675c Fix bug with the handling of the new :clock-keep option.
Thanks to Bernt for the detailed report.
2011-03-07 17:25:00 +01:00
Eric Schulte 7cb0891f7a ob-sql: feed mysql through a pipe, thanks to Alain Clément 2011-03-07 08:32:37 -07:00
emacs 11a10bdfe7 Update website to show 7.5 as current release 2011-03-07 14:27:39 +00:00
Bastien Guerry 54c638523d org-capture.el: Rename :no-clock-out to :clock-keep.
(org-capture-templates): Rename :no-clock-out to :clock-keep.
(org-capture): Use :clock-keep instead of :no-clock-out.

Thanks to Bernt Hansen for the suggestion.
2011-03-07 15:21:13 +01:00
Bastien Guerry b969081ebd org-capture.el: new :no-clock-out template option.
* org-capture.el (org-capture-templates): New option
:no-clock-out.
(org-capture): Use the new option.

* org.texi (Template elements): document the new template
option :no-clock-out.
2011-03-07 11:43:58 +01:00
Bastien Guerry 5780612759 Fix typo in docstring. 2011-03-07 00:20:42 +01:00
Nicolas Goaziou 38877e6cf9 org-list: update statistical cookies with check-boxes in an hidden subtree
* lisp/org-list.el (org-update-checkbox-count): Ensure cookies on an
  heading are correctly updated when checkboxes are hidden. It allows,
  for example, to use C-c C-x C-b on a collapsed tree and still get
  the update.
2011-03-06 21:34:35 +01:00
Bastien Guerry 846ff13247 Merge branch 'master' of orgmode.org:org-mode 2011-03-06 19:31:46 +01:00
David Maus 1a03c5f256 Accept keys for org-export-as-html-to-buffer' and `org-export-region-as-html'
* org-exp.el (org-export-visible): Accept keys for
`org-export-as-html-to-buffer' and `org-export-region-as-html'.

H and R were not in the list of allowed keys but bound to the
respective function later.

Missing keys reported by Samuel Wales <samologist@gmail.com>.
2011-03-06 19:08:42 +01:00
Bastien Guerry 6a0de0dc7b * org.el (org-duration-string-to-minutes): Don't use `rx-to-string'. 2011-03-06 18:45:03 +01:00
Lawrence Mitchell 75a1b98cfb Support modifiers in effort durations (was: Re: Does Effort support hours only?)
Luke Crook wrote:
> Is it possible to specify estimated effort in something other
> than hours (0.5, or 0:30)?

> For example 1w, 1m, 2d etc?

Here's a cleaned up patch that allows user-specified modifiers
for effort strings.  The new variable `org-effort-durations'
lists modifiers, and their mapping to minutes (words, as well as
single-letter modifiers, are supported).  The default value is:

(("h" . 60)
 ("d" . 480) ; 8 hours
 ("w" . 2400) ; five days
 ("m" . 9600) ; 4 weeks
 ("y" . 96000)) ; 40 weeks

But you can change this.

Old effort strings (HH:MM) are still interpreted correctly.  See
the docstrings of `org-effort-durations' and
`org-duration-string-to-minutes' for more details.

>From a0e24b14755eb4087d9c47bb4eea11eb9151efcf Mon Sep 17 00:00:00 2001
From: Lawrence Mitchell <wence@gmx.li>
Date: Fri, 18 Feb 2011 11:01:46 +0000
Subject: [PATCH] Allow human-readable effort durations
To: emacs-orgmode@gnu.org

* lisp/org.el (org-effort-durations): New variable.
* lisp/org.el (org-duration-string-to-minutes): New function.
* lisp/org-agenda.el (org-agenda-filter-effort-form)
(org-format-agenda-item): Use it.
* lisp/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-modify-effort-estimate, org-clock-get-clock-string): Use it.

Specifying large effort durations in hours and minutes is difficult.
Is 130:25 more than two weeks effort?  More than three?  This patch
allows specification of an effort duration as a friendly string.  For
example 2w 5d is two weeks and five days of effort.  Existing H:MM
entries will still be recognised correctly.
2011-03-06 18:27:14 +01:00
Bastien Guerry ef549e0891 org-agenda.el: Rename org-run-agenda-series to org-agenda-run-series.
* org-agenda.el (org-agenda-run-series): Rename from
`org-run-agenda-series'.
2011-03-06 18:12:35 +01:00
Bastien Guerry 25dfaf717c * org-capture.el: Don't allow currentfile anymore.
* org-capture.el (org-capture-templates): Don't allow
currentfile anymore.
2011-03-06 18:10:48 +01:00
Bastien Guerry 030960559e org-capture.el: remove (currentfile) as a file specification in templates.
You can already use a function like (buffer-file-name) to get the currently
visited file.  So (currentfile) is not necessary.
2011-03-06 17:31:56 +01:00
Bastien Guerry d2fb95dd4e Merge branch 'master' of orgmode.org:org-mode 2011-03-06 16:38:19 +01:00
Bastien Guerry 82224d6b34 org-agenda.el: bugfix, remove useless `org-agenda-current-span'.
* org-agenda.el (org-agenda-list): Fix bug: don't rely on
`org-agenda-current-span' when calling `org-agenda-list'.
2011-03-06 16:37:55 +01:00
Nicolas Goaziou 1ecee90f47 org-list: slight speed-up for org-list-context 2011-03-06 16:00:34 +01:00
Bastien Guerry 35effd6b6d org-capture.el: Fix bug about capturing to narrowed buffers.
* org-capture.el (org-capture-put-target-region-and-position):
New function to store information about the target buffer.
(org-capture-set-target-location): Use it.
(org-capture-finalize): restore the target buffer in its
possibly narrowed state.  Also restore the cursor position.
2011-03-06 14:10:28 +01:00
Bastien Guerry e4899b1742 org-crypt.el: replace previous commit with a warning. 2011-03-06 10:56:30 +01:00
Bastien Guerry 7c56155933 org-crypt.el: add a hook to make sure entries are encrypted before auto-saving.
* org-crypt.el (auto-save-default): make sure entries are
encrypted before auto-saving.
2011-03-06 10:41:12 +01:00
Bastien Guerry 37ac289714 org-crypt.el: fix the default value of `org-crypt-key' (should be a string). 2011-03-06 10:01:33 +01:00
Nicolas Goaziou 9f0745d93c Promote and demote inline tasks
* lisp/org-inlinetask.el (org-inlinetask-promote,
  org-inlinetask-demote): new functions.

* lisp/org.el (org-metaleft, org-metaright): when point is at an
  inline task, promote or demote it.
2011-03-06 09:30:47 +01:00
Nicolas Goaziou 7ac8c529f2 When demoting a subtree, don't change level of inline tasks within
* lisp/org.el (org-demote-subtree,org-promote-subtree): wrap
  org-map-tree into org-with-limited-levels macro, so it avoids
  operating on inline tasks.
2011-03-06 09:30:06 +01:00
Nicolas Goaziou 1e59039f8c Fix bug when narrowing to subtree with point at an inline task
* lisp/org.el (org-narrow-to-subtree): ensure `org-back-to-heading'
  will move point to a real heading and not an inline task by wraping
  function into a org-with-limited-levels macro.
2011-03-06 09:29:16 +01:00
Bastien Guerry df7f2bf3d9 org-id.el: Don't set `kill-emacs-hook' on noninteractive sessions.
Upstream change from Juanma Barranquero <lekktu@gmail.com>
See message on Sun, 06 Mar 2011 01:30:16 on emacs-diff:

  [Emacs-diffs] /srv/bzr/emacs/trunk r103541: * lisp/bookmark.el:
2011-03-06 02:44:33 +01:00
Bastien Guerry de7005c7c2 Small docstring typo. 2011-03-06 01:33:19 +01:00
Bastien Guerry c255f03676 org-capture.el: make :immediate-finish cooperate with :clock-in.
* org-capture.el (org-capture-finalize): New argument
clock-out, to tell whether finalizing the capture process
should clock out the running clock.
(org-capture): Use the new argument.
2011-03-06 01:09:51 +01:00
Bastien Guerry 5606a6a941 Rename org-get-refile-targets' to org-refile-get-targets'.
* org.el (org-refile-get-targets): Rename from
`org-get-refile-targets.'
2011-03-05 23:48:29 +01:00
Bastien Guerry cde08b138e New variable `org-export-table-remove-empty-lines'.
* org-exp.el (org-export-table-remove-empty-lines): New custom
variable.
(org-export-remove-special-table-lines): Use it.

This was requested by Eric S Fraga.
2011-03-05 23:35:09 +01:00
Bastien Guerry cc44c2b30a New custom variable `org-table-fix-formulas-confirm'.
* org-table.el (org-table-fix-formulas-confirm): new custom
variable.
(org-table-insert-column, org-table-delete-column)
(org-table-move-column, org-table-move-row)
(org-table-insert-row, org-table-kill-row): Use it.
2011-03-05 23:22:32 +01:00
Bastien Guerry 9a35e5d0be Small docstring fix.
Thanks to Tassilo Horn for spotting this.
2011-03-05 22:53:06 +01:00
Tassilo Horn 9d1ce51c09 Use and show default refiling location.
* org.el (org-refile-get-location): Set and show default
	value.
	(org-goto, org-refile): Adapt calls.

	* org-id.el (org-id-get-with-outline-path-completion): Adapt
	call.

	* org-agenda.el (org-agenda-refile, org-agenda-bulk-action):
	Adapt calls.

	* org-remember.el (org-remember-handler): Adapt call.
2011-03-05 12:24:47 +01:00
Bastien Guerry 2ebf586e05 org-mobile.el: new custom variable org-mobile-files-exclude-regexp.
* org-mobile.el (org-mobile-files-exclude-regexp): New custom
variable.
(org-mobile-files-alist): Use it.
2011-03-05 11:49:30 +01:00
Bastien Guerry 2d37c8caf5 Minor stylish fix. 2011-03-05 11:44:22 +01:00
Bastien Guerry 7a0f8bccb8 Minor stylish fix. 2011-03-05 11:44:00 +01:00
Bastien Guerry 9a7f9eda3c Fix bug when using org-confirm-shell/elisp-link-not-regexp. 2011-03-05 11:36:15 +01:00
Bastien Guerry 4369d4f9a3 Bugfix: allow org-blocker-hook to check against headings outside of a narrowed buffer.
* org.el (org-todo): Bugfix: use `org-with-wide-buffer' to
check against headings outside of a narrowed buffer.

* org-macs.el (org-with-wide-buffer): New macro.
2011-03-05 11:01:28 +01:00
Bastien Guerry ae8d522a6c New variables to skip confirmation for elisp/shell links.
* org.el (org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp): New custom variables.
(org-open-at-point): Use the new custom variables.
2011-03-05 10:08:19 +01:00
Bastien Guerry 71d2ccb54c Fix docstring. 2011-03-05 01:27:13 +01:00
Bastien Guerry c682c9bd50 Minor comments rearrangment. 2011-03-04 20:20:12 +01:00
Lawrence Mitchell d98fc9d57b * org-latex.el: place \title \author \date before \begin{document}.
* org-latex.el (org-export-latex-make-header): place
\title \author \date before \begin{document}.
2011-03-04 20:19:21 +01:00
Bastien Guerry 5953798522 Clean handling :html-pre/postamble options wrt author/email/creator-info.
* org-html.el (org-export-html-preamble)
(org-export-html-postamble): now default to `nil'.
(org-export-as-html): when :html-pre/postamble is nil, fall
back on the default pre/postamble, which depends on the
:author-info, :email-info, :creator-info options.

* org-exp.el (org-export-plist-vars): reorder the alist.

* org.texi (Export options): better document :html-preamble
and :html-postamble: setting these options will override any
:author-info, :email-info and :creator-info options for the
HTML export.
2011-03-04 16:32:10 +01:00
Bastien Guerry fc702a8345 Keep the compiler happy. 2011-03-04 15:21:05 +01:00
Bastien Guerry 896654edc2 Merge branch 'master' of orgmode.org:org-mode 2011-03-04 10:07:59 +01:00
Carsten Dominik b1f9750fd6 Merge branch 'master' of orgmode.org:org-mode 2011-03-04 06:39:25 +01:00
Eric Schulte 9ce7d60076 ob-exp: fix export for inline source blocks
* lisp/ob-exp.el (org-babel-exp-results): Don't use cached results if
  there is no hash.
2011-03-03 15:53:25 -07:00
Carsten Dominik 4d02ff89f5 Minor fix 2011-03-03 22:16:36 +01:00
Carsten Dominik df78e9ff4e ttt 2011-03-03 22:16:36 +01:00
Carsten Dominik 4161d85da8 Fix relative column references
* lisp/org-table.el (org-table-eval-formula): Treat relative column refs.

I cannot believe this did not work and nobody complained about this.
$-1 is supposed to refer to the value in the column to the left.  Now
this does work.
2011-03-03 22:16:35 +01:00
Carsten Dominik 3bff7ce776 Change default for `org-table-use-standard-references'.
* lisp/org-table.el (org-table-use-standard-references): Change default
to `from'.
2011-03-03 22:16:35 +01:00
Carsten Dominik 5631a309ab Use @> and $> for referring to last row and column 2011-03-03 22:16:35 +01:00
Matt Lundin 9bb4ef66ab org-agenda-append-agenda: check that we are in an agenda buffer. 2011-03-03 17:40:08 +01:00
Eric Schulte c6f6b3421e Revert "new babel latex feature :imagemagick -- By Andreas Leha"
This reverts commit 3ea00f215a.

Due to copyright concerns
2011-03-03 07:53:42 -07:00
Bastien Guerry 87ce7900c6 * org.el (org-move-subtree-down): leave the cursor at the same column we were at.
* org.el (org-move-subtree-down): leave the cursor at the same
column we were at.
2011-03-03 11:51:47 +01:00
Bastien Guerry 85d4d65af0 Allow to store a link in `org-stored-links' to a newly attached file.
* org-attach.el (org-attach-store-link-p): New variable.
(org-attach-store-link): New function.
(org-attach-attach): When `org-attach-store-link-p' is
non-nil, store a link in `org-stored-links' to a newly
attached file.

Thanks to Darlan Cavalcante Moreira for this idea.
2011-03-03 11:17:55 +01:00
Bastien Guerry dc60852d24 Fix small typo in docstring. 2011-03-03 09:34:34 +01:00
Bastien Guerry 8892fe3f04 Fix small typo in docstring. 2011-03-03 09:30:16 +01:00
Bastien Guerry b8a17b7af2 Merge branch 'master' of orgmode.org:org-mode 2011-03-02 18:44:14 +01:00
Bastien Guerry 35ba10c0af Bugfix when exporting TODO keywords from the headline.
* org-exp.el (org-export-remove-headline-metadata): bugfix:
don't case-fold-search to avoid mixing TODO keywords with real
headline words.

Thanks to Samuel Wales for spotting and reporting this.
2011-03-02 18:43:50 +01:00
Carsten Dominik 8237c9ae6d Implement table formulas that apply to field ranges, fix minor issues
* lisp/org-table.el (org-table-fedit-finish): Read more general LHS of formulas.
(org-table-formula-handle-@L): New function to hanle @L references.
(org-table-current-ncol): New variable.
(org-table-line-to-dline): New function.
(org-table-get-stored-formulas): Accept range formulas as matches.
(org-table-get-specials): Compute and store the number of columns.
(org-table-get-range): New optional argument CORNERS-ONLY, to retrieve
only the region marked by the range, not the content.
(org-table-recalculate): Call `org-table-expand-lhs-ranges' to expand
range targets.  Also check for duplicate access to fields.
(org-table-expand-lhs-ranges): New funktion.
(org-table-get-remote-range): Bind `org-table-current-ncol' to protect
the caller's value.
(org-table-edit-formulas): Support highlighting of range targets.
(org-table-field-info): Handle renge formulas.

* doc/org.texi (Field and range formulas): Renamed from "Field formulas".
Document the use of range operators as targets.
(References): Document the new @L reference.
2011-03-02 18:32:19 +01:00
Bastien Guerry fe67a66e2f Docfix: explain how to escape the in *-html-(pre|post)amble-format.
* org-html.el (org-export-html-postamble-format)
(org-export-html-preamble-format): explain how to escape the
`%' character.
2011-03-02 18:30:06 +01:00
Eric Schulte 85729e693e Merge branch 'master' of orgmode.org:org-mode 2011-03-02 07:56:09 -07:00
Eric Schulte 60a8ba556d ob: read string variable values wrapped in double quotes, removing the quotes
* lisp/ob.el (org-babel-read): Read string variable values wrapped in
  double quotes, removing the quotes.
2011-03-02 07:55:39 -07:00
Eric Schulte 3755c79485 ob-exp: ensure params are properly processed on export
* lisp/ob-exp.el (org-babel-exp-results): Ensure that processed params
  are send to org-babel-execute-src-block.
2011-03-02 07:32:02 -07:00
Bastien Guerry 99675ffead Use `org-export-current-backend' whenever possible.
* org-special-blocks.el
(org-special-blocks-make-special-cookies): Use
`org-export-current-backend'.

* org-publish.el (org-publish-aux-preprocess): Use
`org-export-current-backend'.

* org-inlinetask.el (org-inlinetask-export-handler): Use
`org-export-current-backend'.

* org-exp.el (org-export-current-backend): New variable.
(org-export-preprocess-string)
(org-export-format-drawer-function)
(org-export-remove-or-extract-drawers)
(org-export-format-drawer)
(org-export-convert-protected-spaces)
(org-export-select-backend-specific-text)
(org-export-mark-list-end, org-export-mark-list-properties)
(org-export-attach-captions-and-attributes)
(org-export-replace-src-segments-and-examples)
(org-export-format-source-code-or-example)
(org-export-number-lines): Use the new global variable instead
of a local variable.

* org-exp-blocks.el (org-export-blocks-format-ditaa)
(org-export-blocks-format-dot)
(org-export-blocks-format-comment): Use
`org-export-current-backend'.
2011-03-01 20:01:42 +01:00
Eric Schulte 03a6844054 ob: fix compiler warnings
* lisp/ob-exp.el (org-babel-exp-in-export-file): Now takes the
  language as an argument.
  (org-babel-exp-src-block): Explicitly pass language to
  `org-babel-exp-in-export-file'.
  (org-babel-exp-inline-src-blocks): Removed unused code.
  (org-babel-exp-results): Explicitly pass language to
  `org-babel-exp-in-export-file'.

* lisp/ob.el (org-babel-library-of-babel): declare variable
  (org-babel-tangle-comment-links): declare function
2011-03-01 10:52:35 -07:00
Eric Schulte 9652e5f64e Merge branch 'master' of orgmode.org:org-mode 2011-03-01 10:42:59 -07:00
Eric Schulte cfb06bc70b removing babel declarations for no-longer-used `org-in-item-p' 2011-03-01 10:42:47 -07:00
Bastien Guerry 87b73ad271 Convert underscore in email addresses. 2011-03-01 18:35:47 +01:00
Eric Schulte 907bf0a4cb ob-calc: unquote quoted vectors returned from calc-eval
* lisp/ob-calc.el (org-babel-execute:calc): Unquote quoted vectors
  returned from calc-eval.
2011-03-01 10:31:33 -07:00
Eric Schulte b691233171 ob: allow passing elisp vectors through to code blocks
* lisp/ob.el (org-babel-read): Pass elisp vectors through to code
  blocks.
2011-03-01 10:31:00 -07:00
Bastien Guerry 511fb10eb1 Merge branch 'master' of orgmode.org:org-mode 2011-03-01 13:07:28 +01:00
Nicolas Goaziou b65280ae2b org-list: fix infinite loop introduced by last refactoring 2011-03-01 12:22:13 +01:00
Bastien Guerry 02ee22345d Merge branch 'master' of orgmode.org:org-mode 2011-03-01 09:20:20 +01:00
Carsten Dominik c895af44d4 Fix some compiler warnings
* lisp/ob.el (org-src-lang-modes): Defvar.
(org-at-item-p): Declare function.
* lisp/ob-calc.el (calc-store): Require.
(var-syms): Defvar.
* lisp/ob-python.el (py-default-interpreter): Defvar.
2011-03-01 08:08:36 +01:00
Carsten Dominik 3805b2c4e4 Defvar a dynamically scoped variable
* lisp/org-exp-blocks.el (backend): defvar.
2011-03-01 07:30:43 +01:00
Carsten Dominik 5726eb0676 Bind some local variables
* lisp/org-agenda.el (org-agenda-get-scheduled):
(org-agenda-get-timestamps): Bind local variable `show-all'.
2011-03-01 07:27:57 +01:00
Carsten Dominik aaf0e2d6bb Get rid of some compiler warnings
* Makefile (lisp/org-special-blocks.elc): Add dependency on org-compat.el
* lisp/ob-ref.el (org-at-item-p): Declare function.
* lisp/org-agenda.el (diary-time-regexp): defvar.
* lisp/org-archive.el (org-archive-subtree): Bind local variable `infile-p'.
* lisp/org-capture.el (org-capture-insert-template-here): Get template
text from property list, to avoid byte compiler message.
* lisp/org-latex.el (org-export-latex-tables): Bind local variable `width'.
* lisp/org-special-blocks.el (org-compat): Add require statement.
* lisp/org-table.el (orgtbl-ctrl-c-ctrl-c): Bind local variable `const-str'.
* lisp/org.el (org-eval): Moved function here from org-agenda.el.
2011-03-01 07:24:14 +01:00
Eric Schulte be0b3ca1ca ob: inhibit lisp evaluation of values read from tables and lists
* lisp/ob.el (org-babel-read-table): Inhibit lisp evaluation of values
  when reading from tables.
  (org-babel-read-list): Inhibit lisp evaluation of values when
  reading from lists.
  (org-babel-read): Add optional argument which can be used to inhibit
  lisp evaluation of value.
2011-02-28 20:06:29 -07:00
Eric Schulte 68ea1baf46 Merge branch 'master' of orgmode.org:org-mode 2011-02-28 16:03:22 -07:00
Eric Schulte c70e601b1e ob-table: fix bug returning an integer from sbe
* lisp/ob-table.el (sbe): Ensure that ob-trim is only called on
  strings.
2011-02-28 16:03:03 -07:00
Nicolas Goaziou fcf66e74c6 org-list: refactor code 2011-02-28 22:33:31 +01:00
Eric Schulte 075016cdfa ob-exp: resolve result hash in the original file
* lisp/ob-exp.el (org-babel-exp-results): On export, ensure that the
  result hash is resolved in the original org-mode file.
2011-02-28 12:31:56 -07:00
Jambunathan K 0135cb9c33 org-export-preprocess-string: Use backend var 2011-02-28 12:19:35 +01:00
Nicolas Goaziou 83b782c916 Change internal list end marker to avoid confusing special blocks
* lisp/org-exp.el (org-export-mark-list-end): change end marker
* lisp/org-docbook.el (org-export-docbook-list-line): use new marker.
* lisp/org-html.el (org-html-export-list-line): use new marker
* lisp/org-latex.el (org-export-latex-lists): use new marker
2011-02-28 11:20:06 +01:00
Nicolas Goaziou 1f78cebdf4 org-latex: fix export with various values for `org-list-ending-method'
* lisp/org-latex.el (org-export-latex-lists): make sure markers used
  for export are taken into account by temporarily setting an
  appropriate value for `org-list-ending-method'.
2011-02-28 11:04:46 +01:00
Eric Schulte 94d19488cb org-exp-blocks: match blocks with empty bodies
* lisp/org-exp-blocks.el (org-exp-blocks-block-regexp): Wrapping block
  regexp into its own variable, also allowing match of empty bodies.
  (org-export-blocks-preprocess): Using new regexp variable.
2011-02-27 14:54:36 -07:00
Eric Schulte d0a93cee37 ob: code block regexp now matches blocks with empty bodies
Thanks to Martyn Jago for this patch

* lisp/ob.el (org-babel-src-block-regexp): Code block regexp now
  matches blocks with empty bodies.
2011-02-27 14:38:58 -07:00
Eric Schulte cfcf493c29 ob: If escaped return value doesn't parse cleanly, then return it literally.
* lisp/ob.el (org-babel-script-escape): If script escaped value
  doesn't parse cleanly, then return it literally.
2011-02-27 14:29:01 -07:00
Eric Schulte 563994842d ob-exp: better caching on export
- calling org-babel-process-params on the parameters before the hash
    is calculated
  - calculating the hash before the noweb references are expanded

* lisp/ob-exp.el (org-babel-exp-src-block): When block will eventually
  be evaluated, pre-calculate the hash before noweb expansion, and
  expand the parameters before hash calculation.
  (org-babel-exp-do-export): Pass pre-calculated hash through to
  `org-babel-exp-results'.
  (org-babel-exp-results): Compare pre-calculated hash to results hash.
2011-02-27 11:01:56 -07:00
Eric Schulte dd31a84af6 ob: canonical presentation of header arguments when hashing
* lisp/ob.el (org-babel-sha1-hash): Sort list values to header
  arguments, and sort the words in strings.
2011-02-27 09:40:35 -07:00
Eric Schulte 76137b16fa ob-ref: don't treat 'hline rows as lists when indexing
* lisp/ob-ref.el (org-babel-ref-index-list): Special handling of hline
  rows.
2011-02-27 09:05:15 -07:00
Julien Danjou eced270fbf org-macs: store evaluated version of pom
* lisp/org-macs.el (org-with-point-at): Store evaluated version of pom. This
fixes a potential bug when using (org-with-point-at (func) …), where (func)
would be evaluated multiple times, therefore might return different results
if a marker was returned and different each time.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-27 13:44:57 +01:00
Nicolas Goaziou c2443d48e9 fix a bug in org-open-at-point
My bad, wrong manipulation. Here is the patch.

To reproduce the error, you can type the following in a fresh Org
#+begin_src org
target some text <<<target>>> another text target
#+end_src

Using C-c C-o on any of the two links will return an error.
Regards,

>From f7738f3e9239fc4fddccc7850dad7a0936087a58 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sat, 19 Feb 2011 09:37:48 +0100
Subject: [PATCH] Fix bug with link to radio target at beginning or end of buffer

* lisp/org.el (org-open-at-point): if a link to a radio target is the
  first, (resp. the last), element of a buffer, function cannot find
  the property change required to get its boundaries, and
  `buffer-substring' is called with an invalid nil argument.
2011-02-26 18:14:38 +01:00
Bastien Guerry 0c7d8e615a org-latex.el (org-export-latex-make-header): latexify \thanks string. 2011-02-26 17:31:07 +01:00
Bastien Guerry be7490ae9e Merge branch 'master' of orgmode.org:org-mode 2011-02-26 17:17:03 +01:00
Bastien Guerry 1d404f8f96 * org-table.el (org-table-copy-down): fix docstring. 2011-02-26 17:16:41 +01:00
Eric Schulte 3ea00f215a new babel latex feature :imagemagick -- By Andreas Leha
It enables the output of graphics in a lot of formats using
  imagemagick.

* lisp/ob-latex.el (org-babel-execute:latex): Add imagemagick options,
  and for file types other than png and pdf it uses imagemagick to
  convert a compiled pdf file to the desired file type.
  (convert-pdf): Convert a pdf file to a new file type using
  imagemagick.
2011-02-26 09:15:47 -07:00
Puneeth Chaganti aa946f224d Bugfix with interactive prompt in templates expansion.
* org-capture.el (org-capture-fill-template): fix bug with
the display of interactive prompt in templates expansion.
2011-02-26 16:53:51 +01:00
Reiner Steib 3c19ab2092 * org-clock.el (org-clock-display): docstring fiw.
* org-clock.el (org-clock-display): tell to use
`org-clock-remove-overlays' to remove the display.
2011-02-26 16:29:59 +01:00
Eric Schulte 4ce05a79a0 comment blocks: explicitly append a newline to the body
* lisp/org-exp-blocks.el (org-export-blocks-format-comment):
  Explicitly append a newline to the body.
2011-02-25 17:05:20 -07:00
Nicolas Goaziou 7b211c86e7 org-list: fix insertion of item with indent-tabs-mode is non-nil
* lisp/org-list.el (org-list-insert-item): when computing size of item
  being inserted, function has to take into account that indentation
  may not only be made of spaces.
2011-02-25 20:48:27 +01:00
Nicolas Goaziou 97de64cfc3 org-clock: take full adjacent list when wraping clocks into a drawer
* lisp/org-clock.el (org-clock-find-position): if a list was adjacent
  to some clocks and a drawer was going to be created, only the first
  element of the list would make it into the drawer.
2011-02-25 18:50:29 +01:00
Nicolas Goaziou 7745ad28c3 org-list: fix checkbox toggling
* lisp/org-list.el (org-toggle-checkbox): fix bug where top item in
  list was omitted when checking boxes.

Patch from Nick Dokos.
2011-02-25 18:16:24 +01:00
Dan Davison b23d35de06 ob: R: Be more silent.
* lisp/ob-R.el: Don't print result to echo area after evaluation
2011-02-23 09:43:01 -08:00
Bastien Guerry d45739f62f * org-capture.el (org-capture-refile): Fix typo in docstring. 2011-02-23 16:47:37 +01:00
Nicolas Goaziou f4db739a67 Keep byte-compiler happy 2011-02-23 15:03:27 +01:00
Eric Schulte 4bbe31118f ob-calc: recursively resolve variables in nested parenthesis
* lisp/ob-calc.el (org-babel-execute:calc): Call out to new function
  for variables resolution.
  (ob-calc-maybe-resolve-var): Resolve (possibly recursively)
  variables in calc expressions.
2011-02-22 21:34:43 -07:00
Eric Schulte 6b02a28822 ob-C: unified naming of "c++" functions/variables to "C++"
Thanks to Martyn Jago for this patch

* lisp/ob-C.el (org-babel-tangle-lang-exts): Replace "c++" with "C++".
  (org-babel-C++-compiler): Replace "c++" with "C++".
  (org-babel-execute:cpp): Replace "c" with "C++".
  (org-babel-execute:C++): Replace "c" with "C++".
  (org-babel-expand-body:C++): Replace "c" with "C++".
  (org-babel-C-execute): Replace "c" with "C++".
2011-02-22 21:20:26 -07:00
Eric Schulte 426d4182b3 ob: more adjustments for new list handling
* lisp/ob-ref.el (org-babel-ref-at-ref-p): Only try to read results as
  a list if at the *beginning* of a list item.
* lisp/ob.el (org-babel-read-result): Only try to read results as a
  list if at the *beginning* of a list item.
2011-02-22 21:12:13 -07:00
Nicolas Goaziou 6489346093 Make byte-compiler happy 2011-02-22 20:55:41 +01:00
Nicolas Goaziou 90ad814703 org-list: indentation has precedence over visibility cycling
* lisp/org-list (org-cycle-item-indentation): do not break an
  indentation cycle because visibility cycling is requested. This
  happens when an item becomes a parent, due to indentation change.
  Not considered empty anymore, the function cannot change its
  indentation again.
2011-02-22 18:57:57 +01:00
Nicolas Goaziou 9dc1ac5660 org-list: refactor code 2011-02-22 18:46:33 +01:00
Bastien Guerry 93a8fc9849 Fix bug in org-clock-report.
* org-clock.el (org-clocktable-write-default): Bugfix: falls
back on `org-export-default-language' when no :lang parameter
is set.

Also fix various typo in comments.
2011-02-22 16:24:15 +01:00
Carsten Dominik 4ab9990b54 Simplify the function `org-capture-expand-file' 2011-02-22 14:00:24 +01:00
Carsten Dominik a821f4e922 Fix typo in code 2011-02-22 13:38:28 +01:00
Carsten Dominik c654620d73 Allow file names in capture templates to be functions, forms, or variables
* lisp/org-capture.el (org-capture-expand-file): New function.
(org-capture-target-buffer):
(org-capture-set-target-location): Use `org-capture-expand-file'.

* doc/org.texi (Template elements): Document that files can be given
as function, form, or variable.
2011-02-22 10:10:22 +01:00
Eric Schulte 1e35a5ea37 ob: updates related to list changes
* lisp/ob.el (org-babel-read-list): Reading the value of a list has
  been updated to reflect the new structure of org-mode lists in
  elisp.
  (org-babel-insert-result): Writing code block results to lists has
  been updated to reflect the new list structure.
  (org-babel-result-end): Remove a previous change to end-of-list
  marker detection
2011-02-21 12:40:49 -07:00
Nicolas Goaziou 99aa57fb20 org-list: cycling indentation must not add white spaces at eol
* lisp/org-list.el (org-cycle-item-indentation): each time the
  function moves item back to child position, a white space is added
  to the line.
2011-02-20 17:38:26 +01:00
Eric Schulte 39192b78d2 ob: allow elisp code in results header arguments
* lisp/ob.el (org-babel-process-params): Allow elisp code in
  specification of results header arguments.
2011-02-20 02:16:43 -07:00
Bastien Guerry 77c278c932 Fix small typos in docstrings. 2011-02-19 12:52:26 +01:00
Bastien Guerry 164367fbbe Merge branch 'master' of orgmode.org:org-mode 2011-02-19 12:13:56 +01:00
Bastien Guerry 3655dcbd37 New command `org-agenda-append-agenda' to append agendas.
* org-agenda.el (org-agenda-append-agenda): New command.
(org-agenda-mode-map): New keybinding to this new command.
2011-02-19 12:13:42 +01:00
Nicolas Goaziou 729564ae74 Send list only with cursor at top item
* lisp/org.el (org-ctrl-c-ctrl-c): call `org-list-send-list' only when
  cursor it at very first item of the list, as specified in the
  manual. Also refactored the list part of the function a bit.
2011-02-19 11:27:53 +01:00
Nicolas Goaziou 2366083b82 Remove org-entry-get from ignore-errors macro 2011-02-19 10:51:38 +01:00
Bastien Guerry c6dbde1bab Fix bug when redoing a block agenda command.
* org-agenda.el (org-agenda): Set the 'last-args property to
nil when calling `org-agenda'.  Don't kill the local variable
`org-agenda-current-span'.
(org-run-agenda-series): Use the new property 'last-args.
(org-agenda-change-time-span): Use the dynamically set
`org-agenda-overriding-arguments' variable when non-nil.

Thanks to Matt Lundin and Michael Brand for reporting this.
2011-02-18 15:15:54 +01:00
Eric Schulte 10d76f720a ob: adjust to changes in list format
* lisp/ob.el (org-babel-result-end): Adjust marker of list end to
  changes in the list format.
2011-02-18 06:13:29 -07:00
Nicolas Goaziou fde7e150bb org-list: docstrings changes 2011-02-18 13:43:49 +01:00
Nicolas Goaziou 19ea827cd7 org-list: unwrap org-entry-get from ignore-errors
* lisp/org-list.el (org-toggle-checkbox, org-update-checkbox-count):
  no need to wrap org-entry-get in ignore-errors since commit
  7dd425cc5d
2011-02-18 13:43:49 +01:00
Nicolas Goaziou 713262edc1 Preserve hierarchy when converting items to headlines and the other way
* lisp/org.el (org-toggle-item, org-toggle-heading): make sure every
  sub-item in a list is changed into a sub-heading and sub-headings
  are translated into sub-items. Also ignore inline tasks in the
  process.

org-toggle-item on headlines preserves hierarchy
2011-02-18 13:43:49 +01:00
Nicolas Goaziou de3d3652bb org-html: use non breaking space for empty checkboxes 2011-02-18 13:43:48 +01:00
Nicolas Goaziou 1ac0ac16ac org-html: remove unused local variable 2011-02-18 13:43:48 +01:00
Nicolas Goaziou 3d34dd47dd org-html: remove unneeded newline characters in list export 2011-02-18 13:43:48 +01:00
Nicolas Goaziou 4fd61d8021 org-html: unchecked boxes should not appear checked without CSS 2011-02-18 13:43:48 +01:00
Nicolas Goaziou feb1a17083 org-exp: set correct text properties when replacing special blocks
* lisp/org-exp.el (org-export-select-backend-specific-text): add
  `original-indentation' property when replacing #+begin_backend and
  #+backend blocks with their content. This is needed for lists, as
  they must know if the block belonged to them.
2011-02-18 13:43:46 +01:00
Nicolas Goaziou f6bbdaf7cc org-list: minor fix in regexp 2011-02-18 12:45:13 +01:00
Nicolas Goaziou b43ad47ad1 Insert a newline character before <\li> when exporting lists
* lisp/org-html.el (org-html-export-list-line): insert a newline
  character before ending an item, as anchor could be on a line
  going to be deleted, like a drawer ending string.
* lisp/org-list.el (org-list-to-html): same.
2011-02-18 12:45:13 +01:00
Nicolas Goaziou 2de0a87f7d org-list: apply removal of org-invisible-p 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 5adafe0c8d Changes to filling in items
* lisp/org.el (org-set-autofill-regexps): use `org-item-re' in
  `paragraph-start' to recognize alphabetical lists.
(org-fill-paragraph): enforce a pre-computed fill-prefix before
  calling fill-paragraph when point in in an item. Also prevent
  paragraphs getting merged into an adjacent list upon filling.
(org-adaptive-fill-function): make sure to determine real fill-prefix
  for auto-fill.
(org-auto-fill-function): use a pre-computed fill-prefix before
  calling do-auto-fill.
* lisp/org-list.el (org-list-item-body-column): new function
2011-02-18 12:45:12 +01:00
Nicolas Goaziou b7f6a916b3 Fix toggling and cycling visibility for items and inline tasks
* lisp/org-inlinetask.el (org-inlinetask-at-task-p,
org-inlinetask-toggle-visibility): new functions.
* lisp/org-list.el (org-list-set-item-visibility): new function.
* lisp/org.el (org-cycle, org-cycle-internal-local): separate lists
  and inline tasks from headlines.
(org-outline-level): do not consider lists as headlines.
  Cycling visibility is using different tools.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 69cc51fa43 C-c C-c also repairs ill-formed lists
* lisp/org-list.el (org-list-struct): mark items less indented than
  top item of the list, so that they will be modified.
(org-list-struct-apply-struct): compare struct's indentation with
  line's indentation instead of old-struct's. This is needed because
  `org-list-struct' automatically fixes indentation so changes might not
  be seen otherwise.
* lisp/org.el (org-ctrl-c-ctrl-c): small refactoring.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou e5a61ab260 org-list: update cookies in special contexts
* lisp/org-list.el (org-update-checkbox-count): when a part of the
  buffer is processed to count checkboxes, lists are read from top to
  bottom, but inside lists (in drawers, blocks, or inline tasks) are
  skipped. Thus, cookies cannot be updated. This patch enforces
  reading of such lists if counter is itself in a special context.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou f7ebd6bcf0 org-list: ignore inline tasks when shifting an item, and fix indentation
* lisp/org-list.el (org-list-struct-apply-struct): inline tasks along
  with their content must stay at column 0 even if the item is gaining
  indentation. Moreover, fix indentation of text in an inline task,
  now it can be in such a task within a list.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 349196def4 org-list: forgot a default case in org-list-struct 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 7ce76a7acc org-list: refactor org-list-struct 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0148fac717 org-list: make org-at-item-p less permissive
* lisp/org-list.el (org-at-item-p): also verify context is valid.
  Otherwise it would recognize valid items where org-in-item-p
  wouldn't.
(org-in-item-p, org-list-struct-apply-struct): use shorter version of
org-at-item-p.
(org-cycle-list-bullet): fix typo.
(org-list-parse-list): avoid calling org-at-item-p two times by using
an appropriate regexp
* lisp/org.el (org-indent-line-function): use an appropriate regexp
  instead of calling org-at-item-p two times.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0bec47e9ab org-list: keep byte-compiler happy 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 3017425c48 org-list: fix org-in-item-p when point is just after an ending regexp
* lisp/org-list.el (org-in-item-p): When point was just after
  org-list-end-re, check wouldn't be done for starting line. So, if
  the first line was an item, it wouln't be noticed and function would
  return nil. Simplify and comment code.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou f7dbea5989 Fix small bug in org-toggle-item
* lisp/org.el (org-toggle-item): when used on normal text, ensure
  every line in region is included in the new item, regardless of its
  original indentation.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0850948dea org-list: small bug fix in org-list-struct-apply-struct
* lisp/org-list.el (org-list-struct-apply-struct): if end of list was
  at eol, for example, with list inside a block, the last list
  wouldn't be shifted. Thus, the patch ensures no blank lines is
  skipped.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 304e8f1cd2 Change behavior of org-toggle-item when used with normal text.
* lisp/org.el (org-toggle-item): Now accepts a prefix argument. When
  used without argument on normal text, it will make the whole region
  one item. With an argument, it defaults to old behavior: change each
  line in region into an item.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 89c066a10c Newline-and-indent respects list structure
* lisp/org.el (org-return): when called from inside an item with the
  indent flag, function should keep text moved inside the item. This
  allows to use C-j to separate lines in an item: cursor won't go back
  to column 0.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou dcf23c416f org-list: ignore lines with org-example property when creating structure
* lisp/org-list.el (org-list-struct): when a line has org-example
  property, skip the entire block. This is needed during export, for
  example when src blocks in org markup contain lists, and are
  returned verbatim because org isn't in the list of interpreted
  languages.
2011-02-18 12:45:11 +01:00