Commit Graph

7940 Commits

Author SHA1 Message Date
Nicolas Goaziou 0a01e52aa1 Install new exporter into Org innards
* contrib/lisp/org-mime.el (org-mime-htmlize, org-mime-compose): Use
  new exporter.
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new
  exporter.
* lisp/ob-latex.el (org-babel-execute:latex): Use new exporter.
* lisp/ob-org.el (org-babel-execute:org): Use new exporter.
* lisp/org-agenda.el (org-agenda-menu, org-agenda-write): Use new
  iCalendar export back-end.
* lisp/org-table.el (org-table-export, orgtbl-export): Remove
  dependency on `org-exp' library.
(org-table-clean-before-export): New function.
(org-table-colgroup-info): New variable.
(orgtbl-to-html): Use to new HTML export back-end.
* lisp/org.el (org-modules): Remove modules relative to obsolete
  export framework and add those relative to the new one.
(org-create-formula-image-with-dvipng, org-format-latex
org-create-formula-image-with-imagemagick): Use new exporter.
(org-indent-line): INCLUDE keywords are indented like regular
keywords.
(org-mode-map): Bind C-c C-e to new export dispatcher.
(org-menu): Install new exporter in menu.
2013-02-06 23:06:30 +01:00
Nicolas Goaziou 03a9191dd3 Move previous export framework into contrib
* contrib/lisp/org-ascii.el: New file.
* contrib/lisp/org-beamer.el: New file.
* contrib/lisp/org-docbook.el: New file.
* contrib/lisp/org-exp-blocks.el: New file.
* contrib/lisp/org-exp.el: New file.
* contrib/lisp/org-freemind.el: New file.
* contrib/lisp/org-html.el: New file.
* contrib/lisp/org-icalendar.el: New file.
* contrib/lisp/org-jsinfo.el: New file.
* contrib/lisp/org-latex.el: New file.
* contrib/lisp/org-lparse.el: New file.
* contrib/lisp/org-odt.el: New file.
* contrib/lisp/org-publish.el: New file.
* contrib/lisp/org-special-blocks.el: New file.
* contrib/lisp/org-taskjuggler.el: New file.
* contrib/lisp/org-xoxo.el: New file.
* lisp/org-ascii.el: Removed file.
* lisp/org-beamer.el: Removed file.
* lisp/org-docbook.el: Removed file.
* lisp/org-exp-blocks.el: Removed file.
* lisp/org-exp.el: Removed file.
* lisp/org-freemind.el: Removed file.
* lisp/org-html.el: Removed file.
* lisp/org-icalendar.el: Removed file.
* lisp/org-jsinfo.el: Removed file.
* lisp/org-latex.el: Removed file.
* lisp/org-lparse.el: Removed file.
* lisp/org-odt.el: Removed file.
* lisp/org-publish.el: Removed file.
* lisp/org-special-blocks.el: Removed file.
* lisp/org-taskjuggler.el: Removed file.
* lisp/org-xoxo.el: Removed file.
* testing/lisp/test-org-exp.el: Removed file.
* testing/lisp/test-org-html.el: Removed file.
2013-02-06 23:06:30 +01:00
Nicolas Goaziou 8dd2bfc291 Move new export framework files into core
* contrib/README: Remove references to new export framework.
* contrib/lisp/org-e-ascii.el: Removed file.
* contrib/lisp/org-e-beamer.el: Removed file.
* contrib/lisp/org-e-confluence.el: Removed file.
* contrib/lisp/org-e-groff.el: Removed file.
* contrib/lisp/org-e-html.el: Removed file.
* contrib/lisp/org-e-icalendar.el: Removed file.
* contrib/lisp/org-e-latex.el: Removed file.
* contrib/lisp/org-e-man.el: Removed file.
* contrib/lisp/org-e-odt.el: Removed file.
* contrib/lisp/org-e-publish.el: Removed file.
* contrib/lisp/org-e-texinfo.el: Removed file.
* contrib/lisp/org-export.el: Removed file.
* contrib/lisp/org-koma-letter.el: Removed file.
* contrib/lisp/org-md.el: Removed file.
* contrib/lisp/ox-confluence.el: New file.
* contrib/lisp/ox-groff.el: New file.
* contrib/lisp/ox-koma-letter.el: New file.
* lisp/ox-ascii.el: New file.
* lisp/ox-beamer.el: New file.
* lisp/ox-html.el: New file.
* lisp/ox-icalendar.el: New file.
* lisp/ox-jsinfo.el: New file.
* lisp/ox-latex.el: New file.
* lisp/ox-man.el: New file.
* lisp/ox-md.el: New file.
* lisp/ox-odt.el: New file.
* lisp/ox-publish.el: New file.
* lisp/ox-texinfo.el: New file.
* lisp/ox.el: New file.
* mk/org-fixup.el (org-make-org-loaddefs): Install new export
  framework and back-end files.
* testing/lisp/test-org-export.el: Removed file.
* testing/lisp/test-ox.el: New file.
2013-02-06 23:06:30 +01:00
Bastien Guerry 33c4f6233d org-agenda.el: New options to limit the number of displayed entries
* org-agenda.el (org-agenda-max-entries)
(org-agenda-max-todos, org-agenda-max-tags)
(org-agenda-max-effort): New options.
(org-timeline, org-agenda-list, org-search-view)
(org-todo-list, org-tags-view): Tell
`org-agenda-finalize-entries' what agenda type we are
currently finalizing for.
(org-agenda-finalize-entries): Limit the number of entries
depending on the new options.
(org-agenda-limit-entries): New function.

Thanks to the various people who asked for this feature
or for a variation of it.

You can set the new options to an integer or to an alist.

(setq org-agenda-max-effort 120)
  => Don't display entries beyond 120 minutes of effort

(setq org-agenda-max-effort '((todo . 60) (agenda . 240)))
  => Limit to 60 minutes in TODO agenda and to 240 in
     "agenda" agenda views.
2013-02-06 17:23:25 +01:00
Bastien Guerry c5ac9d415e org.el: Allow C-u C-u to insert a warning/delay cookie for org-deadline/org-schedule
* org.el (org-deadline): Allow a double universal prefix
argument to insert/update a warning cookie.
(org-deadline): Allow a double universal prefix argument to
insert/update a delay cookie.
2013-02-06 17:23:25 +01:00
Bastien Guerry 8ecc966292 Implement "delay" cookies for scheduled items.
* org-agenda.el (org-agenda-skip-scheduled-delay-if-deadline):
New option.  The structure of the possible values is copied
from `org-agenda-skip-deadline-prewarning-if-scheduled'.
(org-agenda-get-scheduled): Honor the two new option,
`org-scheduled-delay-days' and
`org-agenda-skip-deadline-prewarning-if-scheduled'.  I.e. if a
scheduled entry has a delay cookie like "-2d" (similar to the
prewarning cookie for deadline), don't show the entry until
needed.

* org.el (org-deadline-warning-days): Small docstring fix.
(org-scheduled-delay-days): New option (see
`org-deadline-warning-days'.)
(org-get-wdays): Use the new option.

Thanks to Andrew M. Nuxoll and Michael Brand for this idea.

You can now use a "delay cookie" in scheduled items.  For example,

* TODO Sleep
  SCHEDULED: <2013-02-06 mer. -3d>

will not be shown on 06/02 but on 09/02, three days later.

The value of the cookie overrides any value of `org-scheduled-delay-days',
unless `org-scheduled-delay-days' is negative (same logic than for
`org-deadline-warning-days'.)

Also check org-agenda-skip-scheduled-delay-if-deadline, which does for
delay cookies what `org-agenda-skip-deadline-prewarning-if-scheduled' does
for prewarning deadline cookies.
2013-02-06 17:23:24 +01:00
Bastien Guerry 8517be79b5 org-agenda.el: Implement new sorting strategies
* org-agenda.el (org-agenda-sorting-strategy): Document the
new sorting strategies.
(org-agenda-get-todos, org-agenda-get-timestamps)
(org-agenda-get-deadlines, org-agenda-get-scheduled): Add a
`ts-date' text property with scheduled, deadline or timetamp
date.
(org-cmp-ts): New function to compare timestamps.
(org-em): Add a docstring.
(org-entries-lessp): Use `org-cmp-ts' to compare timestamps.
Implement the following sorting strategies: timestamp-up/down,
scheduled-up/down, deadline-up/down, ts-up/down (for active
timestamps) and tsia-up/down (for inactive timestamps.)
2013-02-06 17:23:24 +01:00
Bastien Guerry b91fe131ae Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2013-02-06 17:21:31 +01:00
Bastien Guerry b07a9bb29a org-agenda.el: Bugfix.
* org-agenda.el (org-agenda-get-deadlines)
(org-agenda-get-scheduled): Fix bug: use text properties for
the headline text since we rely on properties to get e.g. the
effort.
2013-02-06 17:18:03 +01:00
Bastien Guerry 3380460c69 Merge branch 'maint' 2013-02-05 00:11:08 +01:00
John K. Luebs f27e1e8e4d org.el (org-get-wdays): Handle matching a lead time specified in hours
* org.el (org-get-wdays): Handle matching a lead time specified in
hours.

TINYCHANGE

A lead time in hours is matched but will erroneously return nil.
2013-02-05 00:10:05 +01:00
Bastien Guerry 60b13f3dfe Merge branch 'maint' 2013-02-04 23:03:48 +01:00
Bastien Guerry 80cb1b0a09 org-exp.el (org-export-normalize-links): Don't match links within tags
* org-exp.el (org-export-normalize-links): Don't match links
within tags.

A headline with tags like :info:test: would not be exported correctly
because info:test is first matched and normalized as a link.
2013-02-04 22:14:52 +01:00
Nicolas Goaziou 413a35f7f8 ob-exp: Fix code indentation after src block evaluation
* lisp/ob-exp.el (org-export-blocks-preprocess): Do not use
  `indent-code-rigidly' as it doesn't indent contents of strings.
2013-02-03 17:07:55 +01:00
Nicolas Goaziou 787a07421c Merge branch 'maint' 2013-01-31 22:16:23 +01:00
Nicolas Goaziou 592dc2ee7e org-element: Fix macro parsing with protected commas
* lisp/org-element.el (org-element-macro-parser): Fix error when last
  argument ends with a protected comma.
* testing/lisp/test-org-element.el (test-org-element/macro-parser):
  Add tests.
2013-01-31 22:15:39 +01:00
Bastien Guerry a2febd2101 Merge branch 'maint' 2013-01-31 14:18:24 +01:00
Bastien Guerry 4259ea9fe5 org-clock.el (org-clock-sum): Fix indentation 2013-01-31 14:18:14 +01:00
Bastien Guerry 394398afab Merge branch 'maint' 2013-01-31 14:17:13 +01:00
Francesco Pizzolante 9cb3d3e7f8 org-clock.el (org-clock-sum): Protect with `org-unmodified'
* org-clock.el (org-clock-sum): Protect with `org-unmodified'.

TINYCHANGE
2013-01-31 14:17:01 +01:00
Bastien Guerry ad9ca25d86 Merge branch 'maint' 2013-01-31 12:06:49 +01:00
Bastien Guerry be1169fac7 Merge branch 'master-new-features' 2013-01-31 12:06:39 +01:00
Bastien Guerry 94d1b1169d org-html.el: Enhance docstrings
* org-html.el (org-export-html-preamble-format)
(org-export-html-postamble-format): Mention that
org-export-html-preamble/postamble need to be `t' in order for
these variables to have any effect.
2013-01-31 11:30:43 +01:00
Bastien Guerry 7dbe05551d ob-lilypond.el (ly-process-basic): Bugfix, don't use `pcase'
* ob-lilypond.el (ly-process-basic): Bugfix, don't use
`pcase'.

Thanks to Achim Gratz for suggesting this.
2013-01-31 11:17:18 +01:00
Bastien Guerry bbea8d348b Allow to contextualize capture and agenda commands by checking the name of the buffer
* org.el (org-contextualize-validate-key): Check against two
new context predicates [not-]in-buffer.

* org-capture.el (org-capture-templates-contexts):
* org-agenda.el (org-agenda-custom-commands-contexts):
Document the new [not-]in-buffer context predicates.

Thanks to Paul Sexton for triggering this and for proposing a patch.
2013-01-31 11:06:04 +01:00
Bastien Guerry c17e07e94f ob-core.el (org-ts-regexp): Remove duplicate defconst'ing
* ob-core.el (org-ts-regexp): Remove duplicate defconst'ing.
(org-babel-result-regexp): Don't use `org-ts-regexp', use a
regexp string directly.

This is not the best solution, we should be able to use
`org-ts-regexp' here, but the dependencies makes it hard.
So let's not define org-ts-regexp twice, just use a raw
regexp instead, and add a FIXME warning about this.
2013-01-31 10:57:49 +01:00
Bastien Guerry 55f4f92183 org-html.el (org-html-handle-links): Fix bug in setting the attribute for link with images
* org-html.el (org-html-handle-links): When the link
description is an image and the attribute is "width",
pass the attribute to the <img ...> tag.

Thanks to John Hendy for reporting this.
2013-01-31 10:25:03 +01:00
Eric Schulte ab49324917 fix bug introduced in c1226e8
* lisp/ob-core.el (org-ts-regexp): Declare this here as well.
2013-01-30 13:53:55 -07:00
Eric Schulte c1226e80d4 option to show time stamps over result hashes
suggested by Thomas Alexander Gerds

* lisp/ob-core.el (org-babel-result-regexp): Now matching time stamp as
  well.
  (org-babel-hash-show-time): Variable controlling the display of time
  stamps.
  (org-babel-current-result-hash): With hash time stamps.
  (org-babel-hide-all-hashes): With hash time stamps.
  (org-babel-where-is-src-block-result): With hash time stamps.
2013-01-30 10:08:38 -07:00
Bastien Guerry ff2d373dc3 Merge branch 'maint' 2013-01-30 17:53:30 +01:00
Francesco Pizzolante ebad7d9226 org-macs.el (org-unmodified): Inhibit modification hooks
* org-macs.el (org-unmodified): Inhibit modification hooks.

TINYCHANGE
2013-01-30 17:53:22 +01:00
Nicolas Goaziou 8798f15b72 org-element: Cosmetic change to `org-element-map' indentation
* lisp/org-element.el (org-element-map): Change to function
  indentation.  Also complete docstring.
2013-01-30 14:42:24 +01:00
Bastien Guerry f518bc8f81 ob-lilypond.el (ly-process-basic): Don't use `ly-gen-png'
* ob-lilypond.el (ly-process-basic): Don't use `ly-gen-png'
and friends, rely on the extension of the output file.

Thanks to Florian Beck for suggesting this.
2013-01-30 12:20:32 +01:00
Bastien Guerry 2d18609f4a Merge branch 'maint'
Conflicts:
	contrib/lisp/org-e-odt.el
2013-01-30 12:11:10 +01:00
Bastien Guerry e54dce3b8c org-archive.el (org-archive-file-header-format): New option
* org-archive.el (org-archive-file-header-format): New option.
(org-archive-subtree): Use it.

Thanks to Christopher Schmidt for suggesting something close.
2013-01-30 11:50:14 +01:00
racin e91a5dd33f org-bibtex.el (org-bibtex-search): Don't throw an error when `org-bibtex-prefix' is nil
* org-bibtex.el (org-bibtex-search): Don't throw an error when
`org-bibtex-prefix' is nil.

TINYCHANGE
2013-01-30 11:42:17 +01:00
Bastien Guerry 6d06bcfcbc org.el: Always honor `org-startup-indented', even when `org-inhibit-startup' is non-nil
* org.el (org-mode): Always honor `org-startup-indented', even
when `org-inhibit-startup' is non-nil.

* org-indent.el (org-indent-mode): Don't check
`org-inhibit-startup'.

Thanks to Carsten for suggesting this.
2013-01-30 11:18:24 +01:00
Bastien Guerry d6c3bd9c42 Fix commit eab0cd
Thanks to Florian for spotting this...
2013-01-27 15:21:29 +01:00
Bastien Guerry fe805ed97c Fix commit de3380
Thanks to Leo Liu for providing a patch.
2013-01-27 10:05:54 +01:00
Bastien Guerry 9b4b890da2 Merge branch 'maint' 2013-01-27 09:21:47 +01:00
Bastien Guerry 08c2938e7d org.el (org-fontify-meta-lines-and-blocks-1): Don't try to add text properties outside of the buffer
* org.el (org-fontify-meta-lines-and-blocks-1): Don't try to
add text properties outside of the buffer.

Thanks to Leo Liu for reporting this.
2013-01-27 09:21:35 +01:00
Eric Schulte f52600a439 fix bug: tangling #+headers: lines w/prefix arg 2013-01-26 13:58:30 -07:00
Bastien Guerry 5e11659e66 Merge branch 'maint'
Conflicts:
	lisp/org.el
2013-01-26 15:11:21 +01:00
Bastien Guerry a119649923 org.el (org-agenda-inhibit-startup): Rename from `org-agenda-inhibit-startup-visibility-cycling'
* org.el (org-agenda-inhibit-startup): Rename from
`org-agenda-inhibit-startup-visibility-cycling'.
(org-agenda-prepare-buffers): Bind `org-inhibit-startup' to
`org-agenda-inhibit-startup'.
2013-01-26 15:10:43 +01:00
Bastien Guerry d0cad612ec org.el (org-mode): Don't initialize `org-beamer-mode' when `org-inhibit-startup' is non-nil
* org.el (org-mode): Don't initialize `org-beamer-mode' when
`org-inhibit-startup' is non-nil.
2013-01-26 15:03:21 +01:00
Bastien Guerry 714b372278 Merge branch 'maint' 2013-01-26 13:40:26 +01:00
Bastien Guerry b425e2a2d6 org-footnote.el: Fix bug when using `electric-indent-mode'
* org-footnote.el (org-footnote-create-definition): Prevent
`electric-indent-mode' from inserting the definition at the
wrong place.

Thanks to Xue Fuqiao for reporting this bug.
2013-01-26 13:40:18 +01:00
Bastien Guerry 733a6fe063 Merge branch 'maint' 2013-01-26 13:29:49 +01:00
Bastien Guerry a5ed80fb32 org-agenda.el: Delete `org-agenda-no-heading-message'
* org-agenda.el (org-agenda-no-heading-message): Delete.
(org-agenda-get-timestamps, org-agenda-get-progress)
(org-agenda-get-deadlines, org-agenda-get-scheduled)
(org-agenda-get-blocks): Don't use
`org-agenda-no-heading-message', skip the entry.
2013-01-26 13:29:44 +01:00
Bastien Guerry eab0cd025c ob-lilypond.el (ly-process-basic): Rely on ly-gen-png/pdf/eps to set the output type
* ob-lilypond.el (ly-process-basic): Rely on
ly-gen-png/pdf/eps to set the output type.

Thanks to Florian Beck for reporting this.
2013-01-26 12:00:37 +01:00