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
* 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/
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.
* 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>.
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.
* 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.
* 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.
* 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.
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
* 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.
* 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.
* 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>.
* 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.
* 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.
* 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.
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.
* 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.
* 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'.
* 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.
* 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.
* 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.
* 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.
* 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'.
* 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'.
* 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
* 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.
* 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.
* 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.
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
* 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.
* 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
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
* lisp/org.el (org-time-string-to-time):
(org-time-string-to-absolute): Add optional arguments BUFFER and POS
for error reporting.
* lisp/org-agenda.el (org-get-all-dates):
(org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks): Call time stamp parsing functions with
information on where the timestamp was taken from.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-deadlines, org-agenda-get-scheduled): Add
`category-pos' in let construct.
Thanks to Achim Gratz for spotting this.
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-progress): Correctly set
the `org-category-pos' property.
Thanks to Michael Brand for signaling this problem, and to Nick
Dokos and Erik Iverson for confirming it.
* org.el (org-refresh-category-properties): New text property
'org-category-position to point at the beginning of the
headline from which the category is set.
* org-agenda.el (org-search-view, 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-filter-by-tag-refine): Add the
'org-category-position text property.
This commit prepares for a future `org-agenda-set-category'
function allowing to set the category of the headline at point.
* lisp/org-agenda.el (org-agenda-include-all-todo): Declare this
option as no longer working.
(org-timeline): Rename the include-all argument to dotodo.
(org-arg-loc): Renamed from` org-include-all-loc'.
(org-agenda-list): Rename the INCLUDE-ALL argument to ARG, because its
function has changed.
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
* lisp/org-agenda.el (org-agenda-get-deadlines): Fix dfrac for the
case of wdays being 0. Don't pass wdays to org-agenda-deadline-face,
like before the old fix.
(org-agenda-deadline-face): Revert to old state that was without
wdays.
This allows a deadline warning period of "-0d" to work also with a
custom configuration like:
(setq org-agenda-deadline-faces
'((1.0001 . org-warning) ; due yesterday or before
(0.0 . org-upcoming-deadline))) ; due today or later
For org-agenda-deadline-faces left at default and all other settings
not exceeding 1.0, the face for a deadline warning of any length
remains untouched by this patch.
references to history:
* commit of the old fix
- http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=d0d6325
- git show d0d6325
* mailing list old thread
- http://thread.gmane.org/gmane.emacs.orgmode/5753
- http://lists.gnu.org/archive/html/emacs-orgmode/2008-02/msg00395.html
,----
| The functions `org-batch-agenda', `org-batch-agenda-csv', and
| `org-batch-store-agenda-views' are implemented as macros to provide
| a conveniant way for extracting agenda information from the command
| line. The Lisp does not evaluate parameters of a macro call; thus
| it is not necessary to quote the parameters passed to one of those
| functions. E.g. you can write:
|
| emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a" org-agenda-span 7)'
|
| To export an agenda spanning 7 days. If `org-batch-agenda' would
| have been implemented as a regular function you'd have to quote the
| symbol org-agenda-span. Moreover: To use a symbol as parameter
| value you would have to double quote the symbol.
|
| This is a hack, but it works even when running Org byte-compiled.
`----
Use `org-outline-regexp' instead or `outline-regexp'. Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.
* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.
* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.
* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.
* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.
* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.
* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.
* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.
* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-agenda.el (org-agenda-bulk-custom-functions): New
variable for custom bulk action functions.
(org-agenda-bulk-action): Use it.
Thanks to Julien Cubizolles for triggering this idea.
This reverts commit 5a2eec3207.
The replacement of `buffer-substring-filters' by
`filter-buffer-substring-functions' requires some rewriting
of functions like `org-indent-remove-properties-from-string'.
* org-agenda.el (org-agenda-compact-blocks): Improve docstring.
(org-agenda-block-separator): Add nil to docstring and customization.
(org-prepare-agenda): Skip agenda block separator additionally if
org-agenda-block-separator is nil.
(org-agenda-overriding-header): Improve docstring.
This change allows to disable the agenda block separator only and also
per block only. (The variable org-agenda-compact-blocks non-nil
disables agenda block separators together with the line containing the
agenda span name and week number and does this globally for all blocks
and all custom agenda commands.)
* lisp/ob.el (org-babel-sha1-hash): Adding optional argument KIND to
all org-called-interactively-p function invocations.
* lisp/org-agenda.el (org-agenda-redo): Adding optional argument KIND to
all org-called-interactively-p function invocations.
(org-agenda-show-1): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-agenda-set-tags): Adding optional argument KIND to all
org-called-interactively-p function invocations.
* lisp/org-ascii.el (org-export-as-latin1): Adding optional argument
KIND to all org-called-interactively-p function invocations.
(org-export-as-latin1-to-buffer): Adding optional argument KIND to
all org-called-interactively-p function invocations.
(org-export-as-utf8-to-buffer): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-export-region-as-ascii): Adding optional argument KIND to all
org-called-interactively-p function invocations.
* lisp/org-docbook.el (org-export-region-as-docbook): Adding optional
argument KIND to all org-called-interactively-p function
invocations.
* lisp/org-html.el (org-export-region-as-html): Adding optional
argument KIND to all org-called-interactively-p function
invocations.
* lisp/org-latex.el (org-export-region-as-latex): Adding optional
argument KIND to all org-called-interactively-p function
invocations.
* lisp/org-table.el (org-table-blank-field): Adding optional argument
KIND to all org-called-interactively-p function invocations.
(org-table-current-column): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-table-current-dline): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-table-sort-lines): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-table-sum): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-table-rotate-recalc-marks): Adding optional argument KIND to
all org-called-interactively-p function invocations.
(org-table-eval-formula): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(orgtbl-send-table): Adding optional argument KIND to all
org-called-interactively-p function invocations.
* lisp/org.el (org-mode): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-copy-subtree): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-paste-subtree): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-store-link): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-todo): Adding optional argument KIND to all
org-called-interactively-p function invocations.
(org-occur): Adding optional argument KIND to all
org-called-interactively-p function invocations.
Interactive-p is an obsolete function as of Emacs 23.2.
`org-called-interactively-p' takes care of the current (x)Emacs
version and use either `interactive-p' (for XEmacs and Emacs<23.2)
or `called-interactively-p'.