Commit Graph

12675 Commits

Author SHA1 Message Date
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 9ca48c15e1 org-export: Fix smart quote bug with footnote definitions in ascii back-end
* contrib/lisp/org-export.el (org-export-activate-smart-quotes): Fix
  error when exporting a footnote definition.
2013-02-03 19:44:51 +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 cb1386ba39 org-e-ascii: Fix justification for lines looking like a fill-prefix
* contrib/lisp/org-e-ascii.el (org-e-ascii--justify-string): Fill
  justification for lines looking-like a fill-prefix.
2013-02-01 23:47:00 +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 ad45f6cd7f org-e-html.el (org-e-html-link): Don't add attributes to the link when they are already part of the link description
* org-e-html.el (org-e-html-link): Don't add attributes to the
link when they are already part of the link description.
2013-01-31 10:44:15 +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
Nicolas Goaziou b9c506b41e org-e-latex: Allow to provide a format string for date keyword
* contrib/lisp/org-e-latex.el (org-e-latex-date-timestamp-format): New
  variable.
(org-e-latex-date-format): Removed variable.
(org-e-latex-template): Allow to provide a format string iff date
consists in a single timestamp.
2013-01-30 22:41:38 +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
Nicolas Goaziou ed516e65dc org-export: Fix failing test
* testing/lisp/test-org-export.el: Fix failing test.
2013-01-30 21:32:50 +01: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
Bastien Guerry e81ed15d7d Merge branch 'maint' 2013-01-30 17:46:54 +01:00
Bastien Guerry 4890bbed8c org.texi (References): Clarify an example
* org.texi (References): Clarify an example.

Thanks to Xue Fuqiao, Eric S Fraga and H. Dieter Wilhelm
for sorting this out.
2013-01-30 17:46:35 +01:00
Yasushi SHOJI 8e8f40ce2f testing/README: Fix instructions
TINYCHANGE
2013-01-30 17:35:09 +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
Nicolas Goaziou 423756dd11 org-export: Generalize fallback footnote definition to all exporters
* contrib/lisp/org-export.el (org-export-get-footnote-definition):
  Provide a fallback definition when none can be found.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference): Revert
  change made in 30ef385ee0 since it is
  now handled at the export framework level.
* testing/lisp/test-org-export.el: Add test.
2013-01-30 14:22:35 +01:00
Nicolas Goaziou cef4e582c2 org-e-odt: Fix code typo
* contrib/lisp/org-e-odt.el (org-e-odt--export-wrap): Fix parenthesis
  mismatch.
2013-01-30 14:16:00 +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 35f944aaf0 org-e-odt.el (org-e-odt--export-wrap): Use `condition-case'
* org-e-odt.el (org-e-odt--export-wrap): Use `condition-case'.
2013-01-30 10:46:43 +01:00
Nicolas Goaziou 30ef385ee0 org-e-latex: Fix error in documents with empty footnote definitions
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference):
  Provide a fallback definition when none is available.
2013-01-29 23:19:58 +01:00
Nicolas Goaziou 005917702a org-md: Also translate fixed-width areas 2013-01-28 18:47:43 +01:00
Nicolas Goaziou db6602ef24 org-export: Fix code typo
* contrib/lisp/org-export.el (org-export-unravel-code): Fix code typo.
2013-01-28 13:53:37 +01:00
Nicolas Goaziou 8d431b7313 org-export: Add a filter for export options
* contrib/lisp/org-export.el (org-export-filters-alist): Install a new
  filter to modify export options.
(org-export-filter-options-functions): New variable.
(org-export-as): Call new filter.
2013-01-27 21:46:48 +01:00
Bastien Guerry d6c3bd9c42 Fix commit eab0cd
Thanks to Florian for spotting this...
2013-01-27 15:21:29 +01:00