Commit Graph

1261 Commits

Author SHA1 Message Date
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Bastien Guerry d97c050720 Merge branch 'maint' 2014-01-03 16:04:06 +01:00
Bastien Guerry adb6e545c7 org-agenda.el (org-cmp-ts): Fix bug
* org-agenda.el (org-cmp-ts): Fix bug: interpret `late' as
`later than any date' instead of `later than today'.

Thank to Michael Crouch for reporting this and to Michael Hoffman for
providing the fix.
2014-01-03 16:01:30 +01:00
Bastien Guerry c8bb89faca Merge branch 'maint' 2013-12-30 10:32:24 +01:00
Bastien Guerry 8bb519d934 Fix defcustoms: don't quote const values.
* ob-latex.el (org-babel-latex-htlatex-packages): Use repeat
instead of list as the defcustom type.

* ox.el (org-export-with-creator):
* org.el (org-loop-over-headlines-in-active-region)
(org-mouse-1-follows-link, org-provide-todo-statistics):
* org-agenda.el (org-agenda-custom-commands-local-options)
(org-agenda-start-with-log-mode)
(org-agenda-show-inherited-tags): Don't quote const values.

Thanks to Glenn Morris for reporting this.
2013-12-30 10:30:44 +01:00
Bastien Guerry 9214000c21 Merge branch 'maint'
Conflicts:
	doc/org.texi
2013-11-17 09:17:39 +01:00
Bastien Guerry a6210cc9c2 Backport Paul's fixes from Emacs trunk (1/2)
See http://article.gmane.org/gmane.emacs.diffs/123123
2013-11-17 09:12:41 +01:00
Achim Gratz 54a64f50b5 ob-C, ob-clojure, ob-tangle, org-agenda, org, ox: fix byte-compiler warnings
* lisp/ob-C.el, lisp/ob-clojure.e: Require 'cl at compile-time.
* lisp/ob-tangle.el: Do not require 'cl at compile time.
* lisp/org-agenda.el: Declare function `org-columns-remove-overlays´.
* lisp/org.el: Declare functions `org-clocktable-shift´,
  `org-clock-update-time-maybe´, `org-clock-remove-overlays´,
  `org-babel-tangle-file´, `org-table-blank-field´,
  `org-table-insert-row´, `org-add-archive-files´, `org-table-begin´,
  `org-table-end´.  Move defsubst `org-uniquify´ before its many uses.
* lisp/ox.el: Move defsubst `org-export-get-parent´ before its many
  uses.
2013-11-15 20:18:58 +01:00
Bastien Guerry 668ba5de0e Merge branch 'maint' 2013-11-15 06:56:10 +01:00
Bastien Guerry bf012136bd Remove org-autoload.
* org-macs.el (org-autoload): Delete.

* org-docview.el ("docview"): Fix declarations and require
doc-view directly.

* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling, org-id-new):
* org-colview.el:
(org-colview-initial-truncate-line-value)
(org-columns-open-link, org-string-to-number):
* org-clock.el:
(org-clock-put-overlay, org-count-quarter, org-clock-loaded):
* org-archive.el (org-get-local-archive-location):
* org-agenda.el (org-agenda-todo-custom-ignore-p):
Autoload.

Those functions were autoloaded from within calls to `org-autoload'
in org.el, we now autoload them from where they live.
2013-11-15 06:55:28 +01:00
Bastien Guerry 786ebde303 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-11-14 14:09:25 +01:00
Bastien Guerry adcebf38f8 Fix errors reported by cus-test.el
* ox.el (org-export-async-init-file): Use :set to set the
default value.

* ox-texinfo.el (org-texinfo-filename): Fix default value.
(org-texinfo-format-headline-function): Use 'ignore as the
default value.
(org-texinfo-format-drawer-function): Use a function as the
default value.  Update docstring.
(org-texinfo-drawer): Always use
`org-texinfo-format-drawer-function' as it is now a function
by default.
(org-texinfo-headline): Compare
`org-texinfo-format-headline-function' against 'ignore.
(org-texinfo-inlinetask): Compare
`org-texinfo-format-inlinetask-function' against 'ignore.

* ox-odt.el (org-odt-format-drawer-function): Use a function
as the default value.  Update docstring.
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function): Fix default value.
(org-odt-with-latex): Use :set to set the default value.
(org-odt-drawer): Always use `org-odt-format-drawer-function'
as it is now a function by default.
(org-odt-format-headline--wrap): Compare
`org-odt-format-headline-function' against 'ignore.

* ox-latex.el (org-latex-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-latex-format-inlinetask-function): Fix default value.
(org-latex-drawer): Always use
`org-latex-format-drawer-function' as it is now a function by
default.
(org-latex-inlinetask): Compare
`org-latex-format-inlinetask-function' against 'ignore.

* ox-html.el (org-html-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-html-format-headline-function)
(org-html-format-inlinetask-function): Fix default value.
(org-html-with-latex): Use :set to set the default value.
(org-html--format-toc-headline)
(org-html-format-headline--wrap): Compare
`org-html-format-headline-function' against 'ignore.
(org-html-inlinetask): Compare
`org-html-format-inlinetask-function' against 'ignore.

* ox-ascii.el (org-ascii-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-ascii-drawer): Always use
`org-ascii-format-drawer-function' as it is now a function by
default.
(org-ascii-format-inlinetask-default): New function.
(org-ascii-format-inlinetask-function): Use
`org-ascii-format-inlinetask-default' as the default.

* org.el (org-mouse-1-follows-link): Use :set to set the
default value.  Update custom type.
(org-log-note-headings): Fix order or list items in the custom
type.
(orgstruct-heading-prefix-regexp): Use an empty string as the
default value.  Use 'regexp as the custom type.
(orgstruct-make-binding): Tiny docstring enhancement.  Assume
`orgstruct-heading-prefix-regexp' is a string.

* org-agenda.el (org-agenda-search-view-max-outline-level):
Set default value to 0.  Update docstring.
(org-agenda-deadline-leaders): Fix custom type.
(org-search-view): Assume
`org-agenda-search-view-max-outline-level' is a number.

* ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.

* ob-python.el (org-babel-python-mode): Use :set to set the
default value.
(org-babel-python-None-to): Fix custom type.

* ob-plantuml.el (org-plantuml-jar-path): Fix default value.
(org-babel-execute:plantuml): Assume `org-plantuml-jar-path'
is a string.

* ob-latex.el (org-babel-latex-htlatex): Fix default value.
(org-babel-latex-htlatex-packages): Fix custom type.
(org-babel-execute:latex): Assume `org-babel-latex-htlatex' is
a string.

Thanks to Glenn Morris for reporting this.
2013-11-14 14:05:18 +01:00
Bastien Guerry f505fa20b4 Merge branch 'maint' 2013-11-12 21:12:42 +01:00
Bastien Guerry f49654aeff org-agenda.el (org-agenda-set-restriction-lock): Autoload
* org-agenda.el (org-agenda-set-restriction-lock): Autoload.
2013-11-12 21:12:28 +01:00
Bastien Guerry 71884cc039 Merge branch 'maint'
Conflicts:
	lisp/ob-C.el
	lisp/ob-clojure.el
	lisp/ob-core.el
	lisp/ob-lisp.el
	lisp/org-clock.el
2013-11-12 21:00:49 +01:00
Bastien Guerry f95641c443 Backport changes from Emacs revs 115081 and 115082
2013-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	Address some byte-compiler warnings.
	* ob-abc.el (org-babel-expand-body:abc): Use dolist.
	(org-babel-execute:abc): Fix regexp quoting.
	* ob-calc.el (org--var-syms): Rename from `var-syms'.
	* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
	* ob-table.el (sbe): Move debug declaration.
	* org-clock.el (org--msg-extra): Rename from `msg-extra'.
	* org.el (org-version): Avoid var name starting with _.
	(org-inhibit-startup, org-called-with-limited-levels)
	(org-link-search-inhibit-query, org-time-was-given)
	(org-end-time-was-given, org-def, org-defdecode, org-with-time):
	* org-colview.el (org-agenda-overriding-columns-format):
	* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
	(org-agenda-show-log-scoped):
	* ob-python.el (py-which-bufname, python-shell-buffer-name):
	* ob-haskell.el (org-export-copy-to-kill-ring):
	* ob-exp.el (org-link-search-inhibit-query):
	* ob-R.el (ess-eval-visibly-p):
	* ob-core.el (org-src-window-setup): Declare before use.
	(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
	* ox-odt.el (org-odt-hfy-face-to-css):
	* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
	* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
	(org-bibtex-check):
	* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
	(org-babel-tangle-single-block, org-babel-tangle-comment-links):
	* ob-table.el (sbe):
	* ob-sqlite.el (org-babel-sqlite-expand-vars):
	* ob-sql.el (org-babel-sql-expand-vars):
	* ob-shen.el (org-babel-execute:shen):
	* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
	* ob-scala.el (org-babel-scala-evaluate):
	* ob-ruby.el (org-babel-ruby-table-or-string)
	(org-babel-ruby-evaluate):
	* ob-python.el (org-babel-python-table-or-string)
	(org-babel-python-evaluate-external-process)
	(org-babel-python-evaluate-session):
	* ob-picolisp.el (org-babel-execute:picolisp):
	* ob-perl.el (org-babel-perl-evaluate):
	* ob-maxima.el (org-babel-execute:maxima):
	* ob-lisp.el (org-babel-execute:lisp):
	* ob-java.el (org-babel-execute:java):
	* ob-io.el (org-babel-io-evaluate):
	* ob-haskell.el (org-babel-execute:haskell):
	* ob-fortran.el (org-babel-execute:fortran):
	* ob-exp.el (org-babel-exp-code):
	* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
	* ob-ditaa.el (org-babel-execute:ditaa):
	* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
	(org-babel-parse-header-arguments, org-babel-reassemble-table)
	(org-babel-goto-src-block-head, org-babel-mark-block)
	(org-babel-expand-noweb-references, org-babel-script-escape)
	(org-babel-process-file-name):
	* ob-clojure.el (org-babel-execute:clojure):
	* ob-calc.el (org-babel-execute:calc):
	* ob-awk.el (org-babel-execute:awk):
	* ob-abc.el (org-babel-execute:abc):
	* ob-R.el (org-babel-expand-body:R):
	* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).

2013-11-12  Glenn Morris  <rgm@gnu.org>

	* ox-html.el (org-html-scripts): Add 2013 to copyright years.
	(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 20:57:31 +01:00
Bastien Guerry 990339ea23 Merge branch 'maint' 2013-11-06 10:02:18 +01:00
Bastien Guerry 2911965bfe org-agenda: Fix bug when showing the new time
* org-agenda.el (org-agenda-show-new-time): Ignore invisible
text when inserting the new time as a text property.

* org-compat.el (org-move-to-column): New argument
`ignore-invisible' to turn on `buffer-invisibility-spec'.

Thanks to Marcin Borkowski and Karl Voit for reporting this.
2013-11-06 09:59:46 +01:00
Bastien Guerry c6381df127 Merge branch 'maint' 2013-11-05 19:42:24 +01:00
Bastien Guerry 8ae106907a org-agenda.el (org-agenda-filter-make-matcher): Fix regression
* org-agenda.el (org-agenda-filter-make-matcher): When
filtering tags and hitting space, filter out entries with
tags, only keep those without tags.

Thanks to Serguei Son for reporting this regression.
2013-11-05 19:41:41 +01:00
Bastien Guerry 6af8e429f8 Merge branch 'maint' 2013-11-04 23:36:32 +01:00
Bastien Guerry 1fad782491 org-agenda.el (org-agenda-drag-line-forward): Fix bugs
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): Fix bugs: don't drag lines
without text and don't drag lines before/after hidden lines.

Thanks to Thomas Morgan for reporting bugs in this area.
2013-11-04 23:36:18 +01:00
Nicolas Goaziou 6202ec7b3b Remove need to declare drawers before using them
* lisp/org-agenda.el (org-agenda-prepare): Remove reference to
  `org-drawers-for-agenda'.
(org-agenda-show-1): Remove reference to `org-drawers'.
* lisp/org-clock.el (org-clock-remove-empty-clock-drawer,
  org-clock-cancel): Apply signature change to
  `org-remove-empty-drawer-at'.
* lisp/org-element.el (org-element--list-struct): Use
  `org-drawer-regexp' instead of `org-drawers'.
* lisp/org-feed.el (org-feed-drawer): Update docstring according to
  change.
* lisp/org-list.el (org-in-item-p, org-list-context): Use
  `org-drawer-regexp' instead of `org-drawers'.
* lisp/org-mobile.el (org-mobile-create-index-file): Remove reference
  to `org-drawers-for-agenda'.
* lisp/org-pcomplete.el (pcomplete/org-mode/drawer): Remove function.
* lisp/org.el (org-drawer-regexp): Make variable global.
(org-drawers): Remove variable.
(org-set-regexps-and-options): Ignore DRAWER keyword.
(org-cycle): Use `org-drawer-regexp' instead of `org-drawers'.
(org-cycle-hide-drawers): Add an optional argument to ignore some
drawers.
(org-remove-empty-drawer-at): Remove second argument.  Rewrite
function.
(org-clone-subtree-with-time-shift): Apply signature change to
`org-remove-empty-drawer-at'.
(org-toggle-ordered-property): Apply `org-delete-property' signature
change.
(org-map-entries): Remove reference to `org-drawers-for-agenda'.
(org-entry-delete): Remove optional argument.  Small refactoring.
(org-insert-drawer): Remove reference to `org-drawers'.
(org-delete-property): Apply `org-entry-delete' signature change.
(org-in-drawer-p): Rewrite function.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org.el: Update tests.
* testing/lisp/test-ox.el: Update tests.
2013-10-31 21:19:40 +01:00
Carsten Dominik dd57a31283 Honor user request for full-frame agenda window
* lisp/org-agenda.el (org-agenda-fit-window-to-buffer): Enforce
value 1.0 for minimum window height.
2013-09-25 13:22:56 +02:00
Carsten Dominik a7448b0c12 Add fortnight view to agenda
* doc/org.texi (Agenda commands): Document fortnight view.
* lisp/org-agenda.el (org-agenda-custom-commands-local-options):
(org-agenda-span): Add support for fortnight view.
(org-agenda-menu): Add fortnight view command.
(org-agenda-list):
(org-agenda-ndays-to-span): Add support for fortnight view.
(org-agenda-span-to-ndays): Add support for fortnight view.
(org-agenda-later): Add support for fortnight view.
(org-agenda-fortnight-view): New command.
(org-agenda-change-time-span): Add support for fortnight view.
(org-agenda-compute-starting-span): Add support for fortnight view.

This is a patch by Michael Gauland.
2013-09-13 07:54:42 +02:00
Bastien Guerry 2629b767b1 Merge branch 'maint' 2013-07-05 14:30:59 +02:00
Bastien Guerry ce08e04629 org-agenda.el (org-agenda-archive-with): Save window excursion
* org-agenda.el (org-agenda-archive-with): Save window
excursion.
2013-07-05 14:29:51 +02:00
Bastien Guerry 163350117b Merge branch 'maint' 2013-07-01 09:41:40 +02:00
Vladimir Lomov 5e5d89ac10 Fix commit 6abc11.
TINYCHANGE
2013-07-01 09:40:54 +02:00
Bastien Guerry 2ccd6d9887 Merge branch 'maint' 2013-07-01 00:36:17 +02:00
Bastien Guerry 6abc114f18 org-agenda.el (org-batch-agenda): Let-bind `org-agenda-sticky' to nil during batch export
* org-agenda.el (org-batch-agenda): Let-bind
`org-agenda-sticky' to nil during batch export.

Thanks to Rainer for spotting this.
2013-07-01 00:31:33 +02:00
Bastien Guerry 85edec1886 Merge branch 'maint' 2013-06-27 17:45:35 +02:00
Gustav Wikström edcf9c95eb org-agenda.el (org-agenda-filter-by-category): Display all filtered out categories
* org-agenda.el (org-agenda-filter-by-category): Display all
filtered out categories.

TINYCHANGE
2013-06-27 17:44:50 +02:00
Bastien Guerry 370a2bfb4f Merge branch 'maint' 2013-06-27 17:02:50 +02:00
Bastien Guerry be4e4ba989 org-agenda.el (org-agenda-skip-eval): Fix typo in docstring
* org-agenda.el (org-agenda-skip-eval): Fix typo in docstring.
2013-06-27 16:36:29 +02:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Bastien Guerry a9f590e7b1 org-agenda.el: Fix a bug about narrowing to wrong region boundaries
* org-agenda.el (org-agenda, org-search-view, org-tags-view)
(org-agenda-get-day-entries, org-agenda-set-restriction-lock):
Use (current-buffer) as the value of `org-agenda-restrict'.
Fix a bug about narrowing to wrong region boundaries when
`org-agenda-restrict' is non-nil.

Thanks to Thomas Holst for reporting this bug.
2013-04-29 19:02:13 +02:00
Bastien Guerry dcb0ac48a8 Use `org-called-interactively-p' instead of `called-interactively-p'
* org-agenda.el (org-agenda-write):
* ob-core.el (org-babel-expand-src-block): Use
`org-called-interactively-p'.

Thanks to Jason L Wright for reporting this.
2013-04-25 07:30:04 +02:00
Richard Lawrence 1b0c4cf0f8 org-agenda.el (org-cmp-ts): Avoid error when trying to string-match against nil
* org-agenda.el (org-cmp-ts): Avoid error when trying to
string-match against nil.

TINYCHANGE
2013-04-20 08:58:29 +02:00
Bastien Guerry 4231cb4b12 Use `org-add-hook' in some places and merge Emacs revno r112320
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.

* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
2013-04-18 10:29:00 +02:00
Bastien Guerry 937b4484c6 org-agenda.el: New commands for dragging a line forward/backward
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): New commands.
(org-agenda-mode-map): Bind the new commands to M-<down> and
M-<up> respectively.

* org.texi (Agenda commands): Add a table heading for dragging
agenda lines forward/backward.
2013-04-17 20:25:02 +02:00
Bastien Guerry 4e62936ae5 org-agenda.el: (org-agenda-bulk-toggle-all): New command
* org-agenda.el (org-agenda-bulk-toggle): Fix docstring.
(org-agenda-bulk-toggle-all): New command.
(org-agenda-mode-map): Bind `org-agenda-bulk-toggle' to `M-m'
and `org-agenda-bulk-toggle-all' to `M-*'.
(org-agenda-menu): Add `org-agenda-bulk-toggle' and
`org-agenda-bulk-toggle-all'.
(org-agenda-bulk-mark, org-agenda-bulk-unmark): Jump to the
next headline, not the next line.
2013-04-16 22:02:07 +02:00
Bastien Guerry 0f0d0ecf01 org-agenda.el (org-agenda-entry-text-mode): Also check against regexp filters
* org-agenda.el (org-agenda-entry-text-mode): Also check
against regexp filters.
2013-04-13 12:28:24 +02:00
Bastien Guerry 4a603bcd28 org-agenda.el (org-timeline): Handle `org-agenda-show-log'
* org-agenda.el (org-timeline): Handle `org-agenda-show-log'.

Thanks to Derek Upham for reporting this bug.
2013-04-13 11:46:16 +02:00
Bastien Guerry 6ca318353f org-agenda.el: Use `user-error' instead of `error' in some places
* org-agenda.el (org-agenda-undo, org-agenda)
(org-agenda-append-agenda)
(org-agenda-get-restriction-and-command, org-agenda-write)
(org-agenda-clock-cancel)
(org-agenda-diary-entry-in-org-file, org-agenda-diary-entry)
(org-agenda-execute-calendar-command)
(org-agenda-goto-calendar, org-agenda-convert-date)
(org-agenda-bulk-mark, org-agenda-bulk-action)
(org-agenda-show-the-flagging-note): Use `user-error' instead
of `error'.
2013-04-10 14:38:27 +02:00
Bastien Guerry c7f99d1e87 org-agenda.el (org-agenda-append-agenda): Set buffer read only
* org-agenda.el (org-agenda-append-agenda): Set buffer read
only.
2013-04-10 11:40:30 +02:00
Bastien Guerry cd481dfba8 org-agenda.el (org-agenda-goto-date): Fix bug when going to a date in month view
* org-agenda.el (org-agenda-span-to-ndays): Enhance docstring.
(org-agenda-goto-date): Fix bug when going to a date in month
view.

Thanks to Eric S Fraga for reporting this bug.
2013-04-08 21:25:10 +02:00
Bastien Guerry 15d6dd651b org-agenda.el (org-agenda-goto-date): Redo an agenda* if needed
* org-agenda.el (org-agenda-goto-date): If the agenda was
built as agenda* (scheduled/deadline items with hour spec)
then redo an agenda*.
2013-04-08 21:25:10 +02:00
Bastien Guerry c25566fec3 org-agenda.el (org-agenda-goto-date): Put the cursor on the agenda line with the selected date
* org-agenda.el (org-agenda-goto-date): Put the cursor on the
agenda line with the selected date.
2013-04-08 21:25:10 +02:00
Bastien Guerry b37e27edb5 org-agenda.el (org-agenda-restriction-lock-highlight-subtree): New option
* org-faces.el (org-agenda-restriction-lock): Use less flashy
colors.

* org-agenda.el
(org-agenda-restriction-lock-highlight-subtree): New option.
2013-04-06 01:51:29 +02:00
Bastien Guerry c61303ed3d org-agenda.el: Rename the "top-category" filter as "top-headline"
* org-agenda.el (org-agenda-top-headline-filter): Rename from
`org-agenda-top-headline-filter'.
(org-find-top-headline): Rename from `org-find-top-category'.
Add a docstring.
(org-agenda-filtered-by-top-headline): Rename from
`org-agenda-filtered-by-top-category'.
(org-agenda-filter-by-top-headline): Rename from
`org-agenda-filter-by-top-category'.  Fix docstring.
(org-agenda-filter-top-headline-apply): Rename from
`org-agenda-filter-top-category-apply'.  Fix docstring.
(org-agenda-mode-map): Update binding.

Using category here was confusing, because there is no Org
category involved, the filtering is really against a headline.
Since category filtering also exists, the confusion was bad.
2013-04-05 19:46:02 +02:00
Bastien Guerry 889b7e507c org-agenda.el (org-agenda-get-todos): Set `todo-state' earlier so that we can skip false-positives in time
* org-agenda.el (org-agenda-get-todos): Set `todo-state'
earlier so that we can skip false-positives in time.

For example, when searching for a TODO headline with "* NEXT bla"
in a buffer where (1) there is such a headline but (2) "NEXT" is
not in the list of known TODO keywords, then we skip this match.

The earlier behavior threw an error.
2013-04-05 19:46:02 +02:00
Carsten Dominik a5d6548a57 Highlight only headline with agenda subtree restriction
* lisp/org-agenda.el (org-agenda-set-restriction-lock): Highlight only
  the headline when agenda is restricted to a subtree.  Do not
  highlight the entire subtree.
2013-04-05 16:44:57 +02:00
Bastien Guerry 618277cf93 org-agenda.el (org-agenda-limit-interactively): New command
* org-agenda.el (org-agenda-dim-blocked-tasks): Enhance
docstring.
(org-agenda-finalize-entries): Conditionally apply limits so
that we don't manipulate big lists uselessly.
(org-agenda-limit-entries): Limit exclusively.  E.g., when
limiting to a maximum of "2 tags", don't limit among tagged
entries only, but limit among all entries.
(org-agenda-limit-interactively): New command.
(org-agenda-mode-map): Bind the new command to "~".
(org-agenda-redo): Small fix: don't use `eval'.
2013-04-05 08:37:51 +02:00
Bastien Guerry 0066737092 org-agenda.el: Minor typo fix and docstring enhancement
* org-agenda.el (org-agenda-start-on-weekday): Fix typo.
(org-agenda-start-day): Enhance docstring.

* org.texi (Weekly/daily agenda): Add `org-agenda-start-day'
and `org-agenda-start-on-weekday' to the variable index and
document them.
2013-04-03 18:28:30 +02:00
Max Mikhanosha 9594249b4d Fix agenda generation error if agenda had time grid and agenda format
contain effort

* lisp/org-agenda.el (org-agenda-format-item): Ensure effort is "" when unset
2013-03-26 06:55:53 -04:00
Bastien Guerry ce8706f268 Fix commit 3abd5e 2013-03-25 15:54:36 +01:00
Bastien Guerry 3abd5ef707 org-agenda.el: Re-align leaders to the left
* org-agenda.el (org-agenda-scheduled-leaders)
(org-agenda-deadline-leaders): Re-align leaders to the left,
back to a 11 characters width.

Thanks to Matt Lundin for reporting display problems here.
2013-03-25 06:03:17 +01:00
Bastien Guerry a9880a7710 Implement group tags
* org-agenda.el (org-tags-view): Set the matcher after
preparing the agenda, as `org-tag-groups-alist-for-agenda'
might be needed.
(org-agenda-filter-make-matcher): New parameter `filter' and
`type'.  Handle group tags.
(org-agenda-filter-expand-tags): New function.
(org-agenda-filter-apply): Handle group tags.

* org.el (org-blank-before-new-entry): Tiny docstring fix.
(org-tag-alist-for-agenda): Add docstring.
(org-tag-groups-alist-for-agenda): New global variable.
(org-tag-groups-alist): New buffer-local variable.
(org-tag-alist, org-tag-persistent-alist): Handle :grouptags.
(org-group-tags): New option.
(org-toggle-group-tags): New command.
(org-mode-map): Bind `org-toggle-group-tags' to `C-c C-x q'.
(org-set-regexps-and-options-for-tags): New function, factored
out from `org-set-regexps-and-options'.
(org-set-regexps-and-options): Don't handle tags, they are now
handled separately by `org-set-regexps-and-options-for-tags'.
(org-assign-fast-keys): Handle :grouptags.
(org-mode): Use `org-set-regexps-and-options-for-tags' on top
of `org-set-regexps-and-options'.
(org-fontify-meta-lines-and-blocks-1): Fontify group tags.
(org-make-tags-matcher): Expand group tags in the matcher.
(org-tags-expand): New function.
(org-tags-completion-function): Tiny code clean up.
(org-set-current-tags-overlay): Add a docstring.
(org-fast-tag-selection): Highlight group tags.
(org-agenda-prepare-buffers): Set `org-tag-alist-for-agenda'
and `org-tag-groups-alist-for-agenda'.  Don't uniquify
`org-tag-alist-for-agenda' as we may need the grouping
information for filtering in the agenda buffer.
(org-uniquify-alist): New function.

* org-pcomplete.el (pcomplete/org-mode/file-option/tags):
Handle :grouptags.

* org-faces.el (mode-line): New face for group tags.
2013-03-25 05:42:35 +01:00
Bastien Guerry c8a3425559 org-agenda.el (org-agenda-redo): Set filters after agenda has been redone
* org-agenda.el (org-agenda-redo): Set filters after agenda
has been redone.
2013-03-19 19:39:34 +01:00
Bastien Guerry ecb9e5811d org.el (org-store-link): Store each line of the active as a separate link
* org.el (org-store-link): When there is an active region,
store each line as a separate link.
(org-insert-all-links): Use a default description when links
do not have one already.

* org-agenda.el (org-agenda-redo): Fix typo in code.
2013-03-19 19:39:12 +01:00
Bastien Guerry 5127f56790 org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a message when called interactively
* org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a
message when called interactively.  Fix docstring position in
the defun.
2013-03-19 09:57:11 +01:00
Bastien Guerry acbf00ea24 org-agenda.el (org-agenda-mode-map): Use ?= for filtering by regexp and ?| for removing all filters
* org-agenda.el (org-agenda-mode-map): Use ?= for filtering by
regexp and ?| for removing all filters.
(org-agenda-filter-remove-all): New command.
(org-agenda-filter-show-all-re): Rename from
`org-agenda-filter-show-all-regexp'.
(org-agenda-filter-by-regexp): Call
`org-agenda-filter-show-all-re'.
2013-03-16 19:40:02 +01:00
Bastien Guerry 7e806c155c org-agenda.el (org-agenda-Quit): Set `org-agenda-buffer' to nil
* org-agenda.el (org-agenda-Quit): Set `org-agenda-buffer' to
nil.  This prevents bugs when calling e.g., `org-diary' after
quitting an agenda window.
2013-03-16 18:59:52 +01:00
Bastien Guerry 00948a6834 org-agenda.el: Don't hardcode the default agenda entry types
* org-agenda.el (org-agenda-entry-types): Move earlier in the file.
(org-agenda-custom-commands-local-options, org-diary)
(org-agenda-get-day-entries): Don't hardcode the default
agenda entry types, use `org-agenda-entry-types'.
2013-03-16 18:56:56 +01:00
Bastien Guerry 7c71b7c686 org-agenda.el (org-agenda-custom-commands): Fix default setting
* org-agenda.el (org-agenda-custom-commands): Fix default
setting so that the customize interface does not complain
about a mismatch.
2013-03-16 18:54:26 +01:00
Bastien Guerry e0e699ab3d org-compat.el: New compatibility function `org-defvaralias'
* org-compat.el (org-defvaralias): Newcompatibility function.
* org.el:
* org-agenda.el:
* org-list.el:
* org-gnus.el:
* org-clock.el: Use it.
2013-03-14 13:53:52 +01:00
Bastien Guerry d3361ce350 Fix a compiler warning. 2013-03-13 23:05:45 +01:00
Bastien Guerry a3ed698dbb Merge branch 'master-agenda' 2013-03-13 19:54:55 +01:00
Bastien Guerry 81daada648 Fix compiler warning 2013-03-13 19:54:30 +01:00
Bastien Guerry df31fe6bdd org-agenda.el: New agenda entry types :scheduled* and :deadline*
* org.el (org-deadline-time-hour-regexp)
(org-scheduled-time-hour-regexp): New buffer local variables.
(org-set-regexps-and-options): Set the new variables.

* org-agenda.el (org-agenda-custom-commands-local-options):
Add :deadline* and :scheduled* to the list of possible agenda
entry types.
(org-agenda): Implement a new agenda type agenda* with :scheduled*
and :deadline* replacing :scheduled and :deadline respectively in
agenda entry types.  In such agenda, only scheduled and deadline
items with a time specification [h]h:mm will be considered.
(org-agenda-entry-types): Document the new agenda entry types
:scheduled* and :deadline*.
(org-agenda-list): New parameter `with-hour'.  Use :scheduled* and
:deadline*.
(org-agenda-get-day-entries): Handle :scheduled* and :deadline*.
(org-agenda-get-deadlines, org-agenda-get-scheduled): New
parameter `with-hour'.  Use `org-deadline-time-hour-regexp' or
`org-scheduled-time-hour-regexp' as the search string if needed.
(org-agenda-to-appt): Use :scheduled* and :deadline* by default,
as other scheduled and deadline items don't have a time spec and
cannot be turned into appointments.  Trim bracket links and use
only the description as the appointment text.
(org-agenda-get-restriction-and-command): Add
default description for the agenda* view.
(org-agenda-run-series): Handle agenda* views.
2013-03-13 19:52:25 +01:00
Bastien Guerry c1e437bbe9 org-agenda.el: Implement agenda filtering by regexp with "|"
* org-faces.el (org-agenda-filter-tags)
(org-agenda-diary, org-agenda-calendar-event)
(org-agenda-calendar-sexp): Minor code clean up.
(org-agenda-filter-category): Docstring fix.
(org-agenda-filter-category): New face.

* org-agenda.el (org-agenda-local-vars): Add
`org-agenda-re-filter-overlays' and `org-agenda-regexp-filter'.
(org-agenda-mode-map): Use "|" for
`org-agenda-filtered-by-regexp'.
(org-agenda-re-filter-overlays): New variable.
(org-agenda-mark-filtered-text): Use
`org-agenda-re-filter-overlays'.
(org-agenda-finalize, org-agenda-redo): Allow regexp filtering.
(org-agenda-filter-by-category): Set `org-agenda-category-filter'
here instead of within `org-agenda-apply-filter'.
(org-agenda-regexp-filter): New variable.
(org-agenda-filter-by-regexp): New function to filter agenda
buffers by regexp.
(org-agenda-filter-make-matcher): Make matcher for regexp filters.
(org-agenda-filter-apply): Don't set `org-agenda-tag-filter' and
`org-agenda-category-filter'.  Maybe apply regexp filter.
(org-agenda-filter-hide-line): Add docstring.  Hide
regexp-filtered lines.
(org-agenda-filter-show-all-tag, org-agenda-filter-show-all-cat):
Add docstring.
(org-agenda-filter-show-all-regexp): New function.
(org-agenda-set-mode-name): Add regexp-filter information.
(org-agenda-custom-commands-local-options): Add regexp filter.
(org-agenda-regexp-filter-preset): New variable.
(org-agenda-prepare): Use the new variable.

* org.texi (Agenda commands): Document `org-agenda-filter-by-regexp'.
2013-03-13 19:26:41 +01:00
Bastien Guerry 742f473820 org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown): New allowed value `repeated-after-deadline'
* org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
New allowed value `repeated-after-deadline' which will prevent the
display of scheduled items when repeated after the current
deadline.
(org-agenda-get-scheduled): Handle the new value.

This allows this task

* Do me every day before March, 16th (included)
  SCHEDULED: <2013-03-12 mar. +1d> DEADLINE: <2013-03-16 sam.>

to step being displayed after March, 16th.

Thanks a lot to Rick Hanson for coming with this idea and a clear example.
2013-03-12 18:58:18 +01:00
Bastien Guerry 9e00635699 org-agenda.el (org-sorting-choice): Fix default value
* org-agenda.el (org-sorting-choice): Fix default value.
2013-03-11 18:18:11 +01:00
Bastien Guerry 32385e9536 org-agenda.el (org-agenda-day-view): Fix parameter's name
* org-agenda.el (org-agenda-day-view): Fix parameter's name.
2013-03-08 12:23:10 +01:00
Bastien Guerry a2e39d98b8 org-agenda.el (org-agenda-refile): Enhance docstring. Allow to clear the refile cache with C-0 or C-u C-u C-u
* org-agenda.el (org-agenda-refile): Enhance docstring.  Allow to
clear the refile cache with C-0 or C-u C-u C-u.
2013-03-08 10:33:19 +01:00
Bastien Guerry c00a43e857 Revert `org-agenda-dim-blocked-tasks' and `org-agenda-inhibit-startup' to their previous default (t and nil)
* org.el (org-agenda-inhibit-startup): Revert to nil as the default.
* org-agenda.el (org-agenda-dim-blocked-tasks): Revert to t as the
default.

The reason for this reversion is that that users expect the agenda to
DTRT by default, and that it's better not to change the previous default
in general.  Also, users who need to speed up their agenda are probably
long time users with big and numerous agenda files, and it's easier for
them to find these variables than it is for newbies to find out why the
agenda does not DTRT.

If users want to speed up their agenda, they can now read advice here:
http://orgmode.org/worg/agenda-optimization.html
2013-03-06 10:35:19 +01:00
Bastien Guerry 8a2e3e2a79 Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.

* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 16:38:33 +01:00
Bastien Guerry 54ffb0beff org-agenda.el: Fix or add docstrings.
* org-agenda.el (org-agenda-format-date-aligned)
(org-agenda-time-of-day-to-ampm-maybe)
(org-scheduled-past-days)
(org-agenda-normalize-custom-commands)
(org-agenda-run-series, org-store-agenda-views): Fix or add
docstring.
2013-03-05 16:38:33 +01:00
Bastien Guerry 06ec886572 org-agenda.el (org-agenda-write): Overwrite file when called non-interactively
* org-agenda.el (org-agenda-write): Overwrite file when called
non-interactively.

Thanks to Simon Thum for reporting this.
2013-03-03 17:42:32 +01:00
Bastien Guerry e57ce7bd78 Merge branch 'maint' 2013-03-02 12:10:35 +01:00
Bastien Guerry c8d5674562 org-agenda.el (org-agenda-filter-apply): Deactive `org-agenda-entry-text-mode' when filtering
* org-agenda.el (org-agenda-filter-apply): Deactive
`org-agenda-entry-text-mode' when filtering.
(org-agenda-entry-text-mode): Don't allow in filtered views.
Don't show the maximum number of lines when turning off.

Thanks to Sébastien Vauban for pointing a related issue.
2013-03-02 11:00:30 +01:00
Bastien Guerry 3b4a0b21c8 org-agenda.el (org-agenda-entry-text-leaders): New option
* org-agenda.el (org-agenda-entry-text-leaders): New option.
(org-agenda-entry-text-show-here): Use it.

Thanks to Sébastien Vauban for a preliminary patch for this.
2013-03-01 17:27:50 +01:00
Bastien Guerry ccc7383890 Don't create UID for the entire file when write an agenda to .ics
* org-agenda.el (org-agenda-collect-markers)
(org-create-marker-find-array): Move to ox-icalendar.el.
(org-agenda-marker-table, org-check-agenda-marker-table):
Delete.

* ox-icalendar.el (org-icalendar-create-uid): New parameter
H-MARKERS to only update some headlines, not the whole file.
(org-icalendar--combine-files): When exporting to an .ics file
only add UID to the headlines shown in the agenda buffer.
(org-agenda-collect-markers, org-create-marker-find-array):
Move here.
2013-03-01 15:47:55 +01:00
Bastien Guerry 0c40f479cd org-agenda.el (org-agenda-write): Ask before overwriting an existing file
* org-agenda.el (org-agenda-write): Ask before overwriting an
existing file.

Thanks to Rainer Stengele for suggesting this.
2013-03-01 15:06:28 +01:00
Bastien Guerry c8c991e049 org-agenda.el (org-agenda-deadline-leaders): New formatting string for past deadlines
* org-agenda.el (org-agenda-deadline-leaders): New formatting
string for past deadlines.
(org-agenda-scheduled-leaders): Small change.
(org-agenda-get-deadlines): Use the new formatting string.

Thanks to Sébastien Vauban who suggested this idea and proposed
a preliminary patch for it.
2013-02-27 14:29:46 +01:00
Bastien Guerry 295b0ba5d1 Bump :version to "24.4" and add :package-version.
The options updated are those who won't be in Emacs 24.3.
2013-02-26 18:21:28 +01:00
Bastien Guerry de73b35909 Merge branch 'maint'
Conflicts:
	contrib/oldexp/org-exp.el
	lisp/org.el
2013-02-26 14:36:36 +01:00
Bastien Guerry 8f49547aaf Remove top-level autoloads sexps.
These autoloads were erroneously introduced by commit e4c31cf98.
2013-02-26 14:35:01 +01:00
Bastien Guerry d7fe32a0aa org-agenda.el (org-agenda-start-day): Refer to `org-read-date' in the docstring
* org-agenda.el (org-agenda-start-day): Refer to
`org-read-date' in the docstring.

Thanks to Xiao-Yong Jin for suggesting this.
2013-02-22 14:15:17 +01:00
Stephen Eglen c0f8844b05 org-agenda.el (org-agenda-prefix-format): Small docstring enhancement
* org-agenda.el (org-agenda-prefix-format): Small docstring
enhancement.

TINYCHANGE
2013-02-20 16:38:34 +01:00
Bastien Guerry f35e82641c Merge branch 'maint' 2013-02-20 16:31:17 +01:00
Bastien Guerry 9a21403bd7 org-agenda.el (org-agenda-to-appt): Fix typos
* org-agenda.el (org-agenda-to-appt): Fix typos.

Thanks to Sean Allred for reporting this.
2013-02-20 16:30:48 +01:00
Bastien Guerry 4354eb7223 Merge branch 'maint' 2013-02-19 19:38:59 +01:00
Bastien Guerry bf5a33a3c0 org-agenda.el (org-agenda-local-vars): Don't include `org-agenda-show-window'
* org-agenda.el (org-agenda-local-vars): Don't include
`org-agenda-show-window' as it needs to be checked outside of
the agenda window.

Thanks to Bernt Hansen for reporting this.
2013-02-19 19:38:47 +01:00
Bastien Guerry 9bec2ec5d0 org-agenda.el: Small bug fixes
* org-agenda.el (org-agenda-unmark-clocking-task): New
function.
(org-agenda-mark-clocking-task): Use it.
(org-agenda-clock-in): Let the cursor where it is.
(org-agenda-clock-out): Ditto.  Also remove the
`org-agenda-clocking' overlay.
2013-02-19 11:04:26 +01:00
Bastien Guerry 66cba1c51f org-agenda.el (org-agenda-set-restriction-lock): Fix restriction
* org-agenda.el (org-agenda-set-restriction-lock): Fix
restriction so that it ends at the beginning of the next
headline at the same level.
2013-02-19 10:33:07 +01:00
Bastien Guerry c64c599221 org-agenda.el (org-agenda-format-item): Only set the breadcrumbs when `org-prefix-has-breadcrumbs' is non-nil
* org-agenda.el (org-agenda-format-item): Only set the
breadcrumbs when `org-prefix-has-breadcrumbs' is non-nil.
2013-02-19 09:48:11 +01:00