Commit Graph

873 Commits

Author SHA1 Message Date
Max Mikhanosha 013d9f03f2 When an agenda item with 'extra property (such as Scheduled 2x)
is redisplayed, it was losing the 'extra property on redisplay

* lisp/org-agenda.el (org-agenda-change-all-lines): move accessing of
'extra text property outside of with-current-buffer for original
buffer
2012-03-22 15:02:54 -04:00
Bastien Guerry b54ad29fa3 Merge branch 'hotfix-7.8.06' 2012-03-22 01:19:24 +01:00
Bastien Guerry 2fa0aa69ea org-agenda.el: Fix incorrect custom option definition.
* org-agenda.el (org-agenda-custom-commands-local-options):
Fix incorrect custom option definition.

Thanks to Joe Vornehm Jr. for this patch.
See http://patchwork.newartisans.com/patch/1231/
2012-03-22 01:19:03 +01:00
Bastien Guerry 44bf4de900 Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/org-agenda.el
2012-03-20 13:06:26 +01:00
Bastien Guerry fc717f3eb7 Fix compiler warnings. 2012-03-20 13:04:55 +01:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
David Maus cd2d138883 Don't reset `org-done-keywords-for-agenda' when org-agenda-multi
* org-agenda.el (org-prepare-agenda): Don't reset
`org-done-keywords-for-agenda' when org-agenda-multi.

Fixes a bug with DONE keywords in org-todo face reported by Hans-Peter
Deifel in <87r4xwypxh.fsf@hpdeifel.de>.
2012-03-18 17:58:12 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Bastien Guerry b66ff157e1 Merge branch 'maint' 2012-03-16 19:19:24 +01:00
Bastien Guerry 8e7f84ea3d org-agenda.el: Fix the order conditions are being checked.
* org-agenda.el (org-agenda-skip-if): Fix the order conditions
are being checked.  Also enhance the docstring a bit.

TINYCHANGE

Thanks to Toby Cubitt for a patch to this effect.
2012-03-16 19:18:41 +01:00
Bastien Guerry ced72ea5d8 org-agenda.el: Fix the display of indirect agenda window.
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Fix the
display of indirect agenda window.

TINYCHANGE

Thanks to Dave Abrahams for a patch to this effect.
2012-03-16 19:05:26 +01:00
Eric Schulte 07ac15ef72 Merge branch 'origin-maint'
Conflicts:
	lisp/org-src.el
2012-03-14 09:56:52 -04:00
Eric Schulte 4542824f2c fix compiler warnings
* lisp/ob.el (org-strip-protective-commas): Declared.
* lisp/org-agenda.el (org-agenda-filtered-by-category): Declared.
  (org-agenda-filter-apply): Capture free variable.
* lisp/org-footnote.el (org-skip-whitespace): Declared.
* lisp/org-mobile.el (org-agenda-filter): Declared.
* lisp/org-src.el (org-strip-protective-commas): Declared.
2012-03-14 09:55:04 -04:00
Carsten Dominik b771abdfd2 Fix :set property of `org-agenda-sticky'
* lisp/org-agenda.el (org-toggle-sticky-agenda):
(org-agenda-sticky): Improve :set property.
2012-03-10 17:44:23 +01:00
Max Mikhanosha 86dd7d27a3 org-agenda-sticky: Make customizing it call `org-toggle-sticky-agenda' 2012-03-10 08:33:21 -05:00
Carsten Dominik 7fd1c2ad71 Silence the compiler about a dynamically scoped variable 2012-03-10 08:03:53 +01:00
Carsten Dominik 39c763020a Clean up local variable stuff and document sticky agenda buffers
* lisp/org-agenda.el (org-agenda-local-vars): Clean up the variable list.
(org-agenda-get-restriction-and-command): Add a key for toggling
sticky agenda views.

* doc/org.texi (Agenda dispatcher): Document sticky agenda views
and the new key for them.
2012-03-10 08:02:46 +01:00
Carsten Dominik 565170e27f Final decisions about global/local for sticky agendas.
This is just an intermediate commit, to make sure that the comments
are all visible in the git history.

* lisp/org-agenda.el (org-agenda-local-vars): Final decisions about global/local
2012-03-10 07:21:30 +01:00
Max Mikhanosha 41ab6e292a Remove org-prefix-format-compiled from locals list 2012-03-09 10:12:59 -05:00
Carsten Dominik ed3186d427 Careful analysis of local variables for sticky agendas
* lisp/org-agenda.el (org-agenda-force-single-file): Variable removed.
(org-prepare-agenda-window): Store pre-agenda window config locally.
(org-timeline): Introduce a scoped version of `org-agenda-show-log'.
(org-agenda-list): Introduce a scoped version of
`org-agenda-show-log'.
(org-agenda-get-progress): Use the scoped version of
`org-agenda-show-log'.
(org-agenda-local-vars): Write the analysis result as a comment - to
be cleaned up in the next iteration.
2012-03-09 14:36:03 +01:00
Carsten Dominik 820a36f66c Implement proper handling of agenda markers when using sticky agendas
* lisp/org-agenda.el (org-toggle-sticky-agenda): Kill all agenda buffers
when toggling sticky-agendas.
(org-agenda-get-restriction-and-command): Add `C-c a C-k' as a key to
explicitly kill all agenda buffers.
(org-agenda-run-series): Remove any old agenda markers in the buffer
that is going to take the new block agenda.
(org-prepare-agenda): Reset markers before erasing the buffer anc
running `org-agenda-mode', because after that hte local variable
`org-agenda-markers' will have gone away.
(org-agenda-Quit):
(org-finalize-agenda): Install the marker resetter into
the `kill-buffer-hook'.
(org-agenda-save-markers-for-cut-and-paste): Look for markers in all
agenda buffers.
(org-agenda-kill-all-agenda-buffers): New function.
2012-03-09 09:33:46 +01:00
Carsten Dominik d4cd88bfe5 Merge branch 'master' into max-sticky-agenda 2012-03-09 05:37:35 +01:00
Bastien Guerry b879590f3b Merge branch 'maint' 2012-03-08 13:50:51 +01:00
Adam Spiers 11e441e85f Fix typos 2012-03-08 13:50:19 +01:00
Carsten Dominik 79472e466f Merge branch 'master' into max-sticky-agenda 2012-03-06 07:30:16 +01:00
Carsten Dominik bc608605ca Remove another commented line 2012-03-05 10:37:05 +01:00
Carsten Dominik 1f613bb011 Remove a commented line 2012-03-05 10:32:56 +01:00
Carsten Dominik b40226a597 Test commit on new branch 2012-03-05 10:19:16 +01:00
David Maus 21c7ad67cf Merge branch 'maint'
org-bbdb in master already contained declare-function for external
bbdb-functions.

Conflicts:
	lisp/org-bbdb.el
2012-03-04 20:53:05 +01:00
Karl Fogel 1749db14fb org-agenda: Handle case of heading w/ date but no keyword
* lisp/org-agenda.el (org-agenda-highlight-todo): Handle the case of a
  heading that has a date but no todo keyword.

This is a fix for the args-out-of-range bug discussed in these threads:

  http://thread.gmane.org/gmane.emacs.orgmode/52621
  http://thread.gmane.org/gmane.emacs.orgmode/52793
  http://thread.gmane.org/gmane.emacs.orgmode/52786
  http://thread.gmane.org/gmane.emacs.orgmode/52810

The discussions involved Ilya Shlyakhter, James Atwood, Nick Dokos,
and myself, and the subject headers are:

  bug report: agenda timeline crashes
  Bug report: weekly agenda and blank, timestamped headers
  org-agenda-list (from git) giving "args-out-of-range error"

TINYCHANGE
2012-03-04 20:13:05 +01:00
Max Mikhanosha ed0859969b Fix exiting sticky agenda refresh with C-g, was forgetting what kind of agenda it was 2012-03-03 11:04:12 -05:00
Max Mikhanosha 1b3dc456e4 Automatically name sticky agenda buffers with keys used to invoke it, patch
by Carsten Dominik
2012-03-03 08:57:32 -05:00
Max Mikhanosha 1bbf87a968 Apply Carsten's patch to prune org-agenda-local-vars list 2012-03-02 11:40:54 -05:00
Max Mikhanosha 68f802ca72 Re-create mulitple-agenda-buffers support, to avoid git rebase hell 2012-03-01 10:49:23 -05:00
David Maus 2adf4b059b Merge branch 'maint' 2012-02-25 11:13:58 +01:00
David Maus 89949e69a3 org-agenda: Fix handling of indirect buffer and window
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Fix handling of
indirect buffer and window.

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

Changes suggested by Dave Abrahams in <m2boow1q9e.fsf@boostpro.com>.
2012-02-25 11:13:33 +01:00
Bastien Guerry d5ca0780f9 Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-02-19 08:23:42 -07:00
Bastien Guerry 04971de4b9 Add version tag "24.1" for options introduced since Emacs 23.4 (and <= 24.1)
* org-exp.el (org-export-kill-product-buffer-when-displayed)
(org-export-initial-scope, org-export-date-timestamp-format)
(org-export-with-tasks, org-export-email-info)
(org-export-table-remove-empty-lines): Add version tag.

* org-mobile.el (org-mobile-files-exclude-regexp)
(org-mobile-use-encryption, org-mobile-encryption-tempfile)
(org-mobile-encryption-password, org-mobile-agendas): Add
version tag.

* ob-plantuml.el (org-plantuml-jar-path): Add version tag.

* org.el (org-babel-load-languages, org-clone-delete-id)
(org-log-buffer-setup-hook)
(org-loop-over-headlines-in-active-region)
(org-use-sub-superscripts, org-startup-with-beamer-mode)
(org-startup-with-inline-images, org-ctrl-k-protect-subtree)
(org-catch-invisible-edits)
(org-link-search-must-match-exact-headline)
(org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp, org-log-refile)
(org-refile-use-cache)
(org-refile-active-region-within-subtree)
(org-todo-repeat-to-state, org-get-priority-function)
(org-agenda-jump-prefer-future)
(org-read-date-force-compatible-dates)
(org-use-effective-time)
(org-complete-tags-always-offer-all-agenda-tags)
(org-properties-postprocess-alist)
(org-format-latex-signal-error)
(org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command)
(org-export-latex-default-packages-alist)
(org-hidden-keywords, org-pretty-entities)
(org-pretty-entities-include-sub-superscripts)
(org-src-fontify-natively, org-effort-durations)
(org-speed-command-hook): Add version tag.

* org-html.el (org-export-html-footnote-separator)
(org-export-html-mathjax-options)
(org-export-html-mathjax-template)
(org-export-html-headline-anchor-format)
(org-export-html-preamble-format)
(org-export-html-postamble-format)
(org-export-html-table-align-individual-fields)
(org-export-html-protect-char-alist, org-export-html-divs):
Add version tag.

* org-ctags.el (org-ctags-path-to-ctags)
(org-ctags-open-link-functions)
(org-ctags-new-topic-template): Add version tag.

* ob-exp.el (org-export-babel-evaluate): Add version tag.

* org-beamer.el (org-beamer-use-parts)
(org-beamer-frame-level, org-beamer-frame-default-options)
(org-beamer-column-view-format, org-beamer-themes)
(org-beamer-environments-extra, org-beamer-fragile-re)
(org-beamer-outline-frame-title)
(org-beamer-outline-frame-options): Add version tag.

* org-wl.el (org-wl-link-remove-filter)
(org-wl-shimbun-prefer-web-links)
(org-wl-nntp-prefer-web-links, org-wl-disable-folder-check)
(org-wl-namazu-default-index): Add version tag.

* org-clock.el (org-task-overrun-text)
(org-clocktable-defaults, org-clock-clocktable-formatter)
(org-clock-clocktable-language-setup)
(org-clock-report-include-clocking-task)
(org-clock-resolve-expert): Add version tag.

* ob-lob.el (org-babel-lob-files): Add version tag.

* org-freemind.el (org-freemind-node-css-style): Add version
tag.

* org-archive.el (org-archive-reversed-order)
(org-archive-subtree-add-inherited-tags): Add version tag.

* org-bibtex.el (org-bibtex-autogen-keys, org-bibtex-prefix)
(org-bibtex-treat-headline-as-title)
(org-bibtex-export-arbitrary-fields)
(org-bibtex-key-property, org-bibtex-tags)
(org-bibtex-tags-are-keywords, org-bibtex-no-export-tags)
(org-bibtex-type-property-name): Add version tag.

* org-timer.el (org-timer-default-timer): Add version tag.

* org-taskjuggler.el (org-export-taskjuggler-extension)
(org-export-taskjuggler-project-tag)
(org-export-taskjuggler-resource-tag)
(org-export-taskjuggler-target-version)
(org-export-taskjuggler-default-project-version)
(org-export-taskjuggler-default-project-duration)
(org-export-taskjuggler-default-reports)
(org-export-taskjuggler-default-global-properties): Add
version tag.

* org-habit.el (org-habit-today-glyph)
(org-habit-completed-glyph): Add version tag.

* org-list.el (org-alphabetical-lists)
(org-list-ending-method, org-list-end-regexp)
(org-list-automatic-rules, org-list-use-circular-motion)
(org-list-indent-offset): Add version tag.

* ob-picolisp.el (org-babel-picolisp-cmd): Add version tag.

* org-icalendar.el (org-icalendar-alarm-time)
(org-icalendar-combined-description)
(org-icalendar-honor-noexport-tag)
(org-icalendar-date-time-format): Add version tag.

* org-src.el (org-src-tab-acts-natively): Add version tag.

* org-exp-blocks.el (org-export-blocks-postblock-hook): Add
version tag.

* org-table.el (org-table-exit-follow-field-mode-when-leaving-table)
(org-table-fix-formulas-confirm)
(org-table-duration-custom-format)
(org-table-formula-field-format): Add version tag.

* org-publish.el (org-publish-sitemap-sort-files)
(org-publish-sitemap-sort-folders)
(org-publish-sitemap-sort-ignore-case)
(org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): Add version tag.

* ob-js.el (org-babel-js-cmd): Add version tag.

* org-docbook.el (org-export-docbook-footnote-separator)
(org-export-docbook-xslt-stylesheet): Add version tag.

* org-entities.el (org-entities-ascii-explanatory)
(org-entities-user): Add version tag.

* ob.el (org-confirm-babel-evaluate)
(org-babel-no-eval-on-ctrl-c-ctrl-c): Add version tag.

* ob-tangle.el (org-babel-tangle-lang-exts)
(org-babel-post-tangle-hook, org-babel-pre-tangle-hook)
(org-babel-tangle-body-hook)
(org-babel-tangle-comment-format-beg)
(org-babel-tangle-comment-format-end)
(org-babel-process-comment-text): Add version tag.

* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
Add version tag.

* org-crypt.el (org-crypt-disable-auto-save): Add version tag.

* org-inlinetask.el (org-inlinetask-default-state): Add
version tag.

* ob-scheme.el (org-babel-scheme-cmd): Add version tag.

* ob-lisp.el (org-babel-lisp-dir-fmt): Add version tag.

* org-attach.el (org-attach-store-link-p): Add version tag.

* org-capture.el (org-capture-templates)
(org-capture-before-finalize-hook)
(org-capture-after-finalize-hook): Add version tag.

* org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled)
(org-agenda-time-leading-zero, org-agenda-follow-indirect)
(org-agenda-menu-two-column, org-agenda-menu-show-matcher)
(org-agenda-timegrid-use-ampm)
(org-agenda-remove-timeranges-from-blocks)
(org-agenda-inactive-leader, org-agenda-current-time-string)
(org-agenda-show-current-time-in-grid)
(org-agenda-search-view-force-full-words)
(org-agenda-search-view-always-boolean)
(org-agenda-clock-consistency-checks)
(org-agenda-include-deadlines)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-day-face-function)
(org-agenda-category-icon-alist)
(org-agenda-bulk-custom-functions)
(org-agenda-insert-diary-extract-time): Add version tag.

* org-latex.el (org-export-latex-inputenc-alist)
(org-export-latex-tag-markup)
(org-export-latex-timestamp-inactive-markup)
(org-export-latex-href-format)
(org-export-latex-hyperref-format)
(org-export-latex-footnote-separator)
(org-export-latex-quotes)
(org-export-latex-table-caption-above)
(org-export-latex-listings-w-names)
(org-export-latex-minted-langs)
(org-export-latex-listings-options)
(org-export-latex-minted-options)
(org-latex-default-figure-position, org-export-pdf-logfiles):
Add version tag.

* org-faces.el (org-faces-easy-properties)
(org-fontify-quote-and-verse-blocks, org-cycle-level-faces):
Add version tag.

* ob-ditaa.el (org-ditaa-jar-option): Add version tag.

Thanks to Glenn Morris for reporting this.
2012-02-13 15:49:28 +01:00
Bastien Guerry c74fe88c01 org-agenda.el: Allow `C-u' to display the item without unfolding drawers and logbooks.
* org-agenda.el (org-agenda-show-and-scroll-up): Allow `C-u'
to display the item without unfolding drawers and logbooks.
2012-01-24 17:03:03 +01:00
Bastien Guerry 95e71f5705 Revert "Honour existing restrictions when visiting tasks from the agenda"
This reverts commit 8f93a75cac.
2012-01-19 16:21:50 +01:00
Bastien Guerry 9b9f2d0d8d Revert "Honour existing restrictions when clocking in from the agenda"
This reverts commit c41a6f5a33.
2012-01-19 16:20:07 +01:00
Bernt Hansen 8f93a75cac Honour existing restrictions when visiting tasks from the agenda
* lisp/org-agenda.el (org-agenda-switch-to): Widen org buffer only if point is
  outside the current restriction

Widen org buffer when visiting from agenda only if point is outside
current restriction.

Visiting a task with RET or TAB in the agenda should not affect the
org-mode buffer restriction unless the target task is not currently
visible due to the restriction.
2012-01-11 16:42:35 +01:00
Bernt Hansen c41a6f5a33 Honour existing restrictions when clocking in from the agenda
* lisp/org-agenda.el (org-agenda-clock-in): Save restriction when clocking in from the agenda

Narrowed org buffers are now retained when clocking in from the agenda.
We only widen the buffer when the task to clock in is outside the existing
restriction.
2012-01-11 16:42:34 +01:00
Bastien Guerry a9c15fe9ab Don't create an alias for `list-diary-entries-hook'.
This is already taken care of by emacs/lisp/calendar/diary-lib.el
See comments in commit d6e40f.
2012-01-11 08:52:37 +01:00
Bastien Guerry d6e40fb347 Create an alias for `list-diary-entries-hook'.
* org-agenda.el: New alias for `list-diary-entries-hook'.

* org.el (org-babel-load-languages): Use "LaTeX".
2012-01-10 21:19:44 +01:00
Bastien Guerry fadca5e8eb Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-01-10 11:56:15 +01:00
Bastien Guerry 40ea26e7a6 Silent compiler warning. 2012-01-05 17:42:08 +01:00
Bastien Guerry 5eb414281d Fix compiler warning and define an alias for `org-agenda-filter'.
* org-agenda.el: Add an alias for `org-agenda-filter'.
(diary-list-entries-hook): Use the non-obsolete hook.
(org-agenda-filter-apply): Silent compiler warning.
2012-01-04 16:36:46 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Bastien Guerry b73075a8d2 Code cleanup up: rename org-on-*-p to org-at-*-p.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.

Also define two aliases.
2012-01-02 19:52:35 +01:00
Bastien Guerry 8c36e92f88 Implement category filtering.
* org-agenda.el (org-agenda-filter-preset): New alias.
(org-agenda-filter-by-category): New command.
(org-agenda-mode-map): Add the new command.
(org-agenda-custom-commands-local-options): Add category
filter preset.
(org-agenda-mark-filtered-text): Mark both tag and filter
overlays.
(org-agenda-category-filter-preset): New variable.
(org-finalize-agenda, org-agenda-redo)
(org-agenda-filter-make-matcher, org-agenda-filter-apply):
Handle both category and tag filters.
(org-agenda-filter-show-all-tag): Rename from
`org-agenda-filter-by-tag-show-all'.
(org-agenda-filter-show-all-cat): New function.
(org-agenda-set-mode-name): Show the category filter in the
modeline.

* org-faces.el (org-agenda-filter-category): New face.

* org.texi (Agenda commands): Update documentation about the
new category filtering feature.

This feature has been requested by several people -- thanks
to all of them for mentioning this possibility.
2011-12-31 17:10:44 +01:00
Carsten Dominik 4e0fe88f7e Merge branch 'master' of orgmode.org:org-mode 2011-12-31 15:24:14 +01:00
Carsten Dominik 21e99fedc4 Revert "Honour existing restrictions when clocking in from the agenda"
This reverts commit fc1f01c54e.
2011-12-31 15:23:43 +01:00
Carsten Dominik a954f0e01a Revert "Honour existing restrictions when visiting tasks from the agenda"
This reverts commit 31d003ad28.
2011-12-31 15:23:23 +01:00
Bastien Guerry 112d128180 org-agenda.el: Small code cleanup.
* org-agenda.el (org-batch-agenda, org-batch-agenda-csv):
Remove deleted function `org-encode-for-stdout'.
2011-12-31 13:31:02 +01:00
Bastien Guerry 855213f481 Rename `org-write-agenda' to `org-agenda-write'.
* org-agenda.el (org-agenda-write): Rename from
`org-write-agenda'.
(org-agenda-mode-map, org-agenda-menu)
(org-batch-store-agenda-views): Use new name
`org-agenda-write'.
2011-12-31 12:45:05 +01:00
Bastien Guerry e9633aeb45 org-agenda.el: Use `read-char-exclusive' instead of `read-char'.
* org-agenda.el (org-agenda-filter-by-tag): Use
`read-char-exclusive' instead of `read-char'.
2011-12-31 11:45:54 +01:00
Bastien Guerry 6b5c0bd0b6 Merge branch '2-org-agenda-write-buffer-name' 2011-12-31 09:29:09 +01:00
Bernt Hansen 31d003ad28 Honour existing restrictions when visiting tasks from the agenda
* lisp/org-agenda.el (org-agenda-switch-to): Widen org buffer only if point is
  outside the current restriction

Widen org buffer when visiting from agenda only if point is outside
current restriction.

Visiting a task with RET or TAB in the agenda should not affect the
org-mode buffer restriction unless the target task is not currently
visible due to the restriction.
2011-12-31 09:10:36 +01:00
Bernt Hansen fc1f01c54e Honour existing restrictions when clocking in from the agenda
* lisp/org-agenda.el (org-agenda-clock-in): Save restriction when clocking in from the agenda

Narrowed org buffers are now retained when clocking in from the agenda.
We only widen the buffer when the task to clock in is outside the existing
restriction.
2011-12-31 09:10:25 +01:00
Bastien Guerry 81f907c9f9 New variable `org-agenda-write-buffer-name'.
* org-agenda.el (org-agenda-write-buffer-name): New variable.
(org-write-agenda): Use it.

Setting this variable through `org-agenda-exporter-settings' can
be useful -- thanks to Konstantin Ziegler for mentioning this need.
2011-12-28 18:07:35 +01:00
Bastien Guerry dc1c9567b1 `org-agenda-do-tree-to-indirect-buffer': rewrite of the docstring. 2011-12-12 17:40:34 +01:00
Dave Abrahams 35d6d9f505 Maintain stable window config when `org-agenda-follow-indirect' is set.
* org-agenda.el (org-agenda-do-tree-to-indirect-buffer): New
function.
(org-agenda-tree-to-indirect-buffer): Use the new function.

TINYCHANGE

Without this change, `org-agenda-follow-indirect' tends to cause the
window configration to bounce around chaotically as you move from item
to item.
2011-12-12 17:37:16 +01:00
Bastien Guerry 5935f04289 org-agenda.el: small indentation fix. 2011-12-12 17:23:44 +01:00
Sebastien Vauban bfe779fe67 Add faces for "calendar events" (active timestamps, or S-expressions).
* org-agenda.el (org-agenda-get-timestamps)
	(org-agenda-get-sexps): Use face for highlighting "calendar"
	events.

	* org-faces.el: Add faces `org-agenda-calendar-event' and
	`org-agenda-calendar-sexp'.
2011-12-11 18:46:28 +01:00
Rob Giardina a42be4b0c0 Fix quoting in org-agenda-with-point-at-orig-entry.
* org-agenda.el (org-agenda-with-point-at-orig-entry): Small
bugfix.

TINYCHANGE
2011-12-11 14:47:25 +01:00
Bastien Guerry 4916e1d401 org-agenda.el (org-agenda-dim-blocked-tasks): Fix typo.
* org-agenda.el (org-agenda-dim-blocked-tasks): Fix typo.

Thanks to Paul Eggert for spotting this and fixing it in Emacs trunk.
2011-11-28 15:24:50 +01:00
Carsten Dominik b43c1c621f Fix function call order in previous patch
* lisp/org-agenda.el (org-agenda-get-todos): Swap calls to `org-trim' and
`buffer-substring'.
2011-11-14 08:35:12 +01:00
Nicolas Goaziou 57caa09106 org-agenda: Do not break TODO list view with empty tasks
* lisp/org-agenda.el (org-agenda-get-todos): Prevent an error when
  encountering tasks with only the TODO keyword.
2011-11-14 00:43:02 +01:00
Bastien Guerry 3267c69ccd Small improvements over the previous commit.
Use org-propertize instead of propertize and
use a better default for tags in the mode-line
when filtering.
2011-10-29 13:23:20 +02:00
Sebastien Vauban 639699518a Add custom face for highlighting tags used in agenda filtering.
* org-agenda.el (org-agenda-set-mode-name): Highlight tags
used for filtering (shown in the mode-line).

* org-faces.el: Add face `org-agenda-filter-tags'.
2011-10-29 13:19:41 +02:00
Bastien Guerry 728611fa77 Fix compiler warnings. 2011-10-28 17:26:22 +02:00
Bastien Guerry ef08850783 * org-agenda.el (calendar-check-holidays): Declare function.
Thanks to Achim Gratz for spotting this.
2011-10-28 16:53:36 +02:00
Matt Lundin 87fc97d131 Fix holidays symbol in org-class
* lisp/org-agenda.el: (org-class): Fix holidays symbol in org-class.
  This was resulting in an "Bad sexp..." warning.
2011-10-28 15:14:12 +02:00
Carsten Dominik 8444207d3e Make `diary-class' skip hlidays if the user asks for it.
* lisp/org-agenda.el (org-class): Allow holidays to be skipped.
2011-10-25 16:07:01 +02:00
Carsten Dominik 4e33bfb83a Mark `org-diary-class obsolete' 2011-10-25 16:00:06 +02:00
Peter Münster 68ffb7a7cc Agenda: Allow filter list without category in org-agenda-to-appt
* lisp/org-agenda.el (org-agenda-to-appt): Make sure filter-items are
strings before calling `string-match'.

Now it's possible to use (org-agenda-to-appt t '((headline "string"))).

TINYCHANGE
2011-10-24 23:43:58 +02:00
Bastien Guerry db04ef7498 org-agenda.el (org-agenda-to-appt): Better filtering.
* org-agenda.el (org-agenda-to-appt): Allow to refine the
scope of entries to pass to `org-agenda-get-day-entries' and
allow to filter out entries using a function.

Thanks to Peter Münster for raising a related issue and to
Tassilo Horn for this idea.
2011-10-23 23:21:34 +02:00
Bastien Guerry ba2d84b5f9 Merge branch 'master' of orgmode.org:org-mode 2011-10-23 23:03:03 +02:00
Bastien Guerry bc29a5c7ab Silence byte-compiler. 2011-10-23 22:45:53 +02:00
Nicolas Goaziou dc62cdcdf1 org-agenda: Fix small display bug.
* lisp/org-agenda.el: Fix small display bug.
2011-10-23 22:42:48 +02:00
Nicolas Goaziou dfcb6faef1 Provide more consistent regexps for headlines
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
2011-10-23 09:30:13 +02:00
David Maus 440ec7e2da Avoid conflict between bulk command and loop-over-headlines
* org-agenda.el (org-agenda-bulk-action): Bind
`org-loop-over-headlines-in-active-region' to nil to avoid conflict
with bulk command.
2011-10-22 16:20:44 +02:00
Bastien Guerry da5a68a0bc Rename `org-format-agenda-item' to `org-agenda-format-item'.
* org.el (org-format-agenda-item, org-scan-tags): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

* org-agenda.el (org-search-view)
(org-get-entries-from-diary, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-format-item, org-agenda-add-time-grid-maybe)
(org-agenda-change-all-lines)
(org-agenda-add-entry-to-org-agenda-diary-file): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

Using the `org-agenda-' prefix makes more sense here.
2011-10-22 15:08:33 +02:00
Bastien Guerry e0c1855dba Silent byte-compiler about `category-pos'.
* org-agenda.el: Replace `category-pos' by `org-category-pos'
to silent byte-compiler.
2011-10-22 15:04:33 +02:00
Tassilo Horn 4bbdfd229d Replace org-mode-p with usual (eq major-mode 'org-mode) check
Additionally, replace one

  (or (org-mode-p) (derived-mode-p 'org-mode))

with

  (derived-mode-p 'org-mode)

cause that is reflexive anyway (returns true, if the current mode is
org-mode).

Delete one check testing for org-mode or org derived mode
2011-10-22 11:29:24 +02:00
Bastien Guerry 989b079dd7 org-agenda.el (org-agenda-list-stuck-projects): Fix tiny bug.
* org-agenda.el (org-agenda-list-stuck-projects): Fix tiny bug.

This bug was introduced by a typo in Michael's patch for XEmacs
compatibility.
2011-10-22 10:13:11 +02:00
Carsten Dominik 0c8b9711a3 Agenda: Add missing option, document time stamp movement to future
* lisp/org-agenda.el (org-agenda-move-date-from-past-immediately-to-today):
New option.
(org-agenda-date-later): Improve the logical structure.

* doc/org.texi (Agenda commands): Document that S-right on a line
representing a past date will immediately shift that date to today.
2011-10-22 08:39:54 +02:00
Carsten Dominik 54a9cb0d99 Maintain XEmacs compatibility
* lisp/ob-calc.el (featurep): Require calc-store.
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Fix regexp
special handling.
* lisp/org-compat.el (fboundp): Support for XEmacs.
* lisp/org-exp.el (org-export): Protect XEmacs from `(redisplay)' call.
* lisp/org-footnote.el (org-footnote-re): Optimize macro processing.
* lisp/org.el (org-set-autofill-regexps): Xemacs compatibility.

Patch by Michael Sperber, checked and slightly modified by Carsten.
2011-10-21 22:36:53 +02:00
Leo 5e67e9d824 Check if marker is valid before use
* lisp/org-agenda.el (org-agenda-do-context-action): Check if marker
is valid before use.
2011-10-21 10:09:40 +02:00
Carsten Dominik 7caa7e1ff7 Fix shifting of data ranges.
* lisp/org-agenda.el (org-agenda-date-later): Fix shifting of date ranges.

Patch based on code by Niels Giesen.
TINYCHANGE
2011-10-21 10:07:02 +02:00
Carsten Dominik f20eef318e Agenda: New behaviour when shifting scheduled date forward.
* lisp/org-agenda.el (org-agenda-date-later): Make pushing forward
a past date to jump immedialtely to today.
2011-10-16 11:09:45 +02:00
Carsten Dominik 468aa115ef Merge branch 'master' of orgmode.org:org-mode 2011-10-08 09:02:36 +02:00
Dave Abrahams e53f62eba9 Add indirect agenda follow mode
* lisp/org-agenda.el (org-agenda-follow-indirect): New option.
(org-agenda-follow-mode): Call `org-agenda-do-context-action' fro
follow mode.
(org-agenda-do-context-action): Also do indirect follow mode action.

By setting `org-agenda-follow-indirect' to a non-nil value,
`org-agenda-follow-mode' will use an indirect buffer to display only
the current item, rather than the whole agenda file in which it lives
2011-10-08 09:01:50 +02:00
niels giesen 3d83564b7d Time range end in agenda view not displayed
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

> michael holzer <michi_holzer_news@gmx.at> writes:
>
>> When I have an entry that contains a time range, for example:
>>
>> * timerange
>>   <2011-09-30 Fri 14:00>--<2011-09-30 Fri 18:00>
>>
>> this shows up in the agenda view as:
>>
>>   uni:        14:00...... timerange
>>
>> while I would expect something like:
>>
>>   uni:        14:00-18:00 timerange
>>
>
> |the manual says:
> |Time ranges can be specified with two timestamps,
> |like ‘<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>’.
> |
> | 20:30-22:15 Marvin escorts the Hitchhikers to the bridge
>
> I confirm this bug.
>
> Org-mode version 7.7 0e9d401519
> GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO
>
> Giovanni
>
>

Funny enough, I noticed this too last week, so I whipped up this patch.
It inserts the range when start date is the same as the end date. Please
test (it's still young) && include in Org if you so please.

#+begin_src diff
>From dcf81753aa5cab311f2a3a0272e4691e4bc6ea38 Mon Sep 17 00:00:00 2001
From: Niels Giesen <niels.giesen@gmail.com>
Date: Mon, 26 Sep 2011 11:43:55 +0200
Subject: [PATCH] Show timestamp ranges in agenda

* lisp/org-agenda.el (org-agenda-get-blocks): Show timestamp ranges in
  agenda if start day is same as end day
2011-10-05 16:46:18 +02:00
Carsten Dominik aefd49b909 Change default value of `org-agenda-skip-additional-timestamps-same-entry'
* lisp/org-agenda.el (org-agenda-skip-additional-timestamps-same-entry):
Change default value.
2011-10-04 14:30:32 +02:00