Commit graph

657 commits

Author SHA1 Message Date
Carsten Dominik fbe3eb4d2a Fix display of current time to show up only today
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Show time only
when grid is being made for today.

Patch by Matt Lundin
2010-12-13 10:43:37 +01:00
John Wiegley 3542f0eed9 Scattering tasks first resets them to "today" 2010-12-13 01:20:04 -05:00
Matt Lundin bca4ac9998 Optimize calls to org-is-habit-p
* lisp/org-agenda.el: (org-agenda-get-scheduled) Don't call
  org-is-habit-p until after checking for for
  org-agenda-skip-scheduled-if-done.

Org-agenda-get-scheduled was calling org-is-habit-p on every scheduled
item (including DONE items when org-agenda-skip-scheduled-if-done was
set to t). Tweaking the timing of the test shaves some time off of
agenda construction when org-habit is loaded and
org-agenda-skip-scheduled-if-done is t.

Before:  org-is-habit-p  478         0.2434439999  0.0005092970
After:   org-is-habit-p	 81          0.057944      0.0007153580
2010-12-12 22:26:23 +01:00
Carsten Dominik 1495bc6b08 Add current time to time grid in agenda
* lisp/org-faces.el (org-agenda-current-time): New face.
* lisp/org-agenda.el (org-agenda-show-current-time-in-grid):
(org-agenda-current-time-string): New options.
(org-agenda-add-time-grid-maybe): Add current time to time grid.
2010-12-12 09:26:01 +01:00
Łukasz Stelmach ad006dea13 sexp can set its face (was: Including current time in agenda)
suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> I actually tried to set the text properties for the string instead,
> but looks like org-agenda is ignoring that.
>
> (defun jd:org-current-time ()
>   "Return current-time if date is today."
>   (when (equal date (calendar-current-date))
>     (propertize (format-time-string "%H:%M Current time") 'font-lock-face
> 		'(:weight bold :foreground "DodgerBlue4" :background "snow"))))

To accomplish this you'd have to apply the following patch and use 'face
property rather than font-lock-face.

Why can't a sexp choose its 'face after all?

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---
2010-12-12 08:38:38 +01:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
John Wiegley 4d575c8a03 C-u B S now scatters tasks across weekdays only 2010-12-06 00:22:55 -05:00
John Wiegley 384e4f08e4 Added a bulk "scattering" command
B S will cause tasks to be rescheduled a random number of days into the
future, with 7 as the default.  This is useful if you've got a ton of
tasks scheduled for today, you realize you'll never deal with them all,
and you just want them to be distributed across the next N days.
2010-12-03 17:52:46 -05:00
John Wiegley beedff9a49 `org-agenda-bulk-mark' now accepts a numerical prefix arg 2010-12-03 17:52:46 -05:00
Carsten Dominik e10e6197e7 Fix forgotten function renaming
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-goto-today): Use `org-today'.
2010-12-03 23:37:55 +01:00
Carsten Dominik 316e7e5fbc Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org-agenda.el
2010-12-03 22:03:06 +01:00
Julien Danjou 0d0edd6d21 org-agenda: rework ndays and span handling
* org-agenda.el (org-agenda-custom-commands-local-options):
Allow org-agenda-span to be a symbol.
(org-agenda-ndays): Make obsolete.
(org-agenda-span): New variable superseding org-agenda-ndays.
(org-agenda-menu): Use org-agenda-current-span.
(org-agenda-current-span): New local variable storing current
span.
(org-agenda-list): Take a span instead of ndays as argument.
This function is now responsible for computing the ndays based
on span.
(org-agenda-ndays-to-span): Return span only if number of days
really matches.
(org-agenda-span-to-ndays): New function.
(org-agenda-manipulate-query): Use org-agenda-compute-starting-span.
(org-agenda-goto-today): Use org-agenda-compute-starting-span.
(org-agenda-later): Do not give compute a new span, use the
current one.
(org-agenda-day-view, org-agenda-week-view)
(org-agenda-month-view, org-agenda-year-view): Stop touching
org-agenda-ndays.
(org-agenda-change-time-span): Only compute starting-span.
(org-agenda-compute-starting-span): New function derived from
the old org-agenda-compute-time-span.
(org-agenda-set-mode-name): Compute mode based on
org-agenda-current-span.
(org-agenda-span-name): New function.

* org-mouse.el: Replace Replace org-agenda-ndays by
org-agenda-current-span.

* org.texi, orgguide.texi: Replace org-agenda-ndays by
org-agenda-span. Add a paragraph about org-agenda-span and say that
org-agenda-ndays is now deprecated.

This patch is pretty huge, so I'll give a bit of context about it.

I'm weird, but I used org-agenda-ndays set to 14. Unfortunately, this
settings was interpreted as a month view. Pressing 'f' key to see later,
would show me the next month, which was not at all what I wanted.

On the same idea, day view or week view would change my org-agenda-ndays
settings, which I think is not a good idea. Changing user setting is *bad*.
:-)

So I rewrote the things this way:
- Rename org-agenda-span to org-agenda-current-span
 Which has the same meaning has before, except it can be numeric.
- Rename org-agenda-ndays to org-agenda-span
 I think the name is better choosen. You can set it to a symbol instead of
 only a numeric value. That means you can set it to 'month and it will show
 you the number of days of the current month in your agenda. Better than
 30. But you can still set it to 30, or 31, or whatever you want.
- Do not change org-agenda-span. Never.
- Use org-agenda-current-span for navigation.
 That means if you press 'f', it will shows you really the next
 org-agenda-current-span ndays, and not something based on "I think you
 want a weekly view".
2010-12-03 13:07:31 +01:00
Robert Pluim c3b2977de6 Fix a docstring
* lisp/org-agenda.el (org-agenda-toggle-deadlines): Fix docstring.

TINYCHANGE
2010-12-03 11:45:03 +01:00
Matt Lundin 2ac751a6cb org-agenda: Fix category string for agenda
* lisp/org-agenda.el: (org-format-agenda-item) The value of
org-category is not converted to a string unless it is defined.

This fixes commit 3061c7083d, which
resulted in org-format-agenda-item always returning the symbol-name for
org-category even if it was not defined. I.e., in some instances,
org-format-agenda-item returned the string "nil", thus bypassing the
buffer-file-name method of deriving the category.
2010-12-03 09:13:11 +01:00
Julien Danjou 2e08843369 Rename org-agenda-today to org-today.
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-01 00:48:28 +01:00
Julien Danjou 9de7ad3593 Add org-agenda-todo-ignore-timestamp
* lisp/org-agenda.el: Add org-agenda-todo-ignore-timestamp.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
Honor org-agenda-todo-ignore-timestamp.
* doc/org.texi: Mention org-agenda-todo-ignore-timestamp.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-29 10:25:22 +01:00
Julien Danjou 3061c7083d org-agenda: convert category to string
* org-agenda.el (org-format-agenda-item): Convert category to a string
if it is a symbol. This fixes the following call to
org-agenda-get-category-icon which fails if category is not a string.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-29 10:23:31 +01:00
Carsten Dominik b6f43d7c20 Minor fix 2010-11-26 19:08:13 +01:00
David Maus 803f6b0ceb Remove duplicate defcustom, introduced by 95bb1666 2010-11-22 21:32:22 +01:00
Achim Gratz 95bb16661b Fix byte compiler warnings
* org-macs.el (org-called-interactively-p): Wrap function call in
	with-no-warnings.
	(with-silent-modifications) Declare macro for Emacs < 23.2.

TINYCHANGE
2010-11-22 21:22:27 +01:00
Carsten Dominik 04f71ffc55 Keep byte compiler happy 2010-11-19 20:14:37 +01:00
Carsten Dominik 5226c561b3 Use lower case for AM/PM 2010-11-12 16:59:39 -06:00
Christopher Allan Webber 21bf04dfa5 Allow ap/pm times in agenda time grid
* lisp/org-agenda.el (org-agenda-timegrid-use-ampm): New option.
(org-agenda-time-of-day-to-ampm): New function.
(org-agenda-time-of-day-to-ampm-maybe): New function.
(org-format-agenda-item): Call org-agenda-time-of-day-to-ampm-maybe.

Patch by Christoph Allen Webber
2010-11-12 16:57:26 -06:00
Julien Danjou 550859ed5a Introduce special face for TODAY in agenda
* lisp/org-agenda.el (org-agenda-today): New function.
(org-agenda-get-day-face): New function.
(org-timeline): Use org-agenda-today and org-agenda-get-day-face.
(org-agenda-list): Use org-agenda-today and org-agenda-get-day-face.
(org-todo-list): Use org-agenda-today.
(org-get-all-dates): Use org-agenda-today.
(org-agenda-day-face-function): New variable.
(org-agenda-get-day-face): Use org-agenda-day-face-function.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-12 09:42:04 -06:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Julien Danjou 498bcc0031 org-agenda: fix org-agenda-category-icon-alist defcustom type
* list/org-agenda.el (org-agenda-category-icon-alist): Fix defcustom
  type.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-05 16:50:06 +01:00
Julien Danjou aaffdb4732 org-agenda: add support for category icons
Signed-off-by: Julien Danjou <julien@danjou.info>

* doc/org.texi (Categories): Document category icons.
* lisp/org-agenda.el (org-agenda-prefix-format): Insert place holder for icon.
(org-agenda-category-icon-alist): New option.
(org-agenda-get-category-icon): New function.
(org-format-agenda-item): Support for icons.
(org-compile-prefix-format): Support for icons.
2010-11-04 13:01:37 +01:00
Carsten Dominik 350b75be63 Rewrite of the clock table code
* lisp/org.el (org-shorten-string): New function.
* lisp/org-exp.el (org-export-convert-protected-spaces): New function.
(org-export-preprocess-string): Call
`org-export-convert-protected-spaces' to handle new hard spaces.

* lisp/org-clock.el (org-clocktable): New customization group.
(org-clocktable-defaults): New option.
(org-clock-clocktable-formatter): New option.
(org-clock-clocktable-default-properties): New option.
(org-dblock-write:clocktable): Rewrite to split out functionality
into separate functions.
(org-clocktable-write-default):
(org-clocktable-indent-string):
(org-clock-get-table-data): New functions.
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-redo):
(org-agenda-clockreport-mode):
(org-agenda-set-mode-name): Rewrite to implement filtered clock tables.
* doc/org.texi (Clocking commands):
(The clock table): New sections.
(Agenda commands): Document filtered clock reports.
2010-11-02 08:47:23 +01:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Łukasz Stelmach 47107b6612 Sexp diary entries may retrurn a list
* lisp/org-agenda.el (org-agenda-get-sexps): Handle lists as return values
from diary entries
* lisp/org-bbdb.el (org-bbdb-anniversaries): Handle lists of anniversaries
* lisp/org.el (org-diary-sexp-entry): Handle lists as return values
from diary entries.

 ukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:

> I've disovered, that %%(org-bbdb-anniversaries) returns (as every other
> sexp) a string. Which is OK if there is only one.
>
>   Anniversaries:  John Doe's 10th wedding anniversary
>
> Unfortunately the agenda view becomes awful if we have noted Jane's
> weeding date too
>
>   Anniversaries:  John Doe's 10th wedding anniversary; Jane Doe's 10th wedding anniversary
>
> And what if we know 3 Eves and 5 Adams and it's Christmas Eve? (Hint:
> their name day)
[...]

As Thomas Bauman pointed out, there are functions that can be used in
sexps which return cons cells like this

    (nil . "Full Moon 3:35am (CEST)")

(this one is diary-lunar-phases), these aren't properly supported by the
previous version of my patch. This one can distinguish between such a
cons cell and a "real" list.

    ("John Doe's 10th wedding anniversary"
     "Jane Doe's 10th wedding anniversary")

This is because

    (consp (cdr '(a . b))) ; => nil

so org-diary-sexp-entry can be made return (cdr result) only in case of
the former cons cell. The third condition in the `cond' block is IMHO
enough as it is now, but if you think adding

    (listp (cdr result))

may help then be it.
2010-10-26 07:27:19 +02:00
Carsten Dominik c9bb51e883 Make it configurable wether agenda jumping prefers the future
* lisp/org.el (org-agenda-jump-prefer-future): New option.
* lisp/org-agenda.el (org-agenda-goto-date): Use
`org-agenda-jump-prefer-future'.
2010-10-17 08:32:23 +02:00
Sébastien Vauban 464bf73b74 Pad clock times with zeros, apply face with better starting position
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Pad clock times
with zeros.  Start applying face earlier.

Hello,

Here a tiny patch to:

- have padding with 0 for the clock time

- begin applying face org-time-grid from position 2, in order to be properly
  aligned with the rest of the agenda (you don't see that if you don't have a
  face with background color)
2010-10-04 09:46:08 +02:00
Carsten Dominik 9ec705cb57 Allow escaped spaces in agenda search view
* lisp/org-agenda.el (org-search-view): Recover spaces in search words
if they were escaped with \ or inside a regexp.
2010-09-23 08:51:19 +02:00
Carsten Dominik 03b178d120 Do not prefer future when jumping to a date in the agenda
* lisp/org-agenda.el (org-agenda-goto-date): Turn off prefer future
for this command.
2010-09-21 12:56:02 +02:00
Carsten Dominik 44977a9efe Fix cursor position after applying filter
* lisp/org-agenda.el (org-agenda-filter-apply): Move cursor to a visible line.
2010-09-20 20:23:03 +02:00
Carsten Dominik a1dc916be6 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-16 17:20:02 +02:00
Matt Lundin 8631f55d71 Fix bug that erases org buffer when calling agenda via org-agenda-open-link.
[My apologies, but I'm afraid my first attempt at this patch mistook a
necessary second check for redundancy. Here is an improved version.]

* lisp/org-agenda.el (org-prepare-agenda): If the agenda is called
  from within the agenda via an elisp link, such as
  [[elisp:(org-agenda-list)]], org-prepare-agenda erases the buffer of
  the file containing the link, since that buffer is current during
  org-prepare agenda (due to a with-current-buffer in
  org-agenda-open-link). An additional test now ensures that the
  agenda buffer is in fact current when the buffer is erased and local
  variables for the agenda are set.
2010-09-16 17:07:43 +02:00
Achim Gratz c4644b9e00 silence byte compiler warnings about european-calendar-style
I've investigated further and defvaralias doesn't silence the warnings,
but "with-no-warnings" does.
2010-09-14 09:29:59 +02:00
Bastien Guerry 3ec4750271 Third fix for the time-grid problem.
Hopefully the last one.  See commit 7b188f7d.
Reported by Memnon Anon <gegendosenfleisch@googlemail.com>.
2010-09-05 21:09:50 +02:00
Bastien Guerry 538cf4e07c Fix docstring. 2010-09-03 02:43:22 +02:00
Bastien Guerry 7b188f7da5 Second fix for the time-grid problem. 2010-09-02 17:48:24 +02:00
Bastien Guerry fbf89f0ecc org-agenda.el: Fixed a problem when computing time-grid.
Memnon Anon reported that this setting yields a bug:

,----
| (setq org-agenda-time-grid (quote
|       ((daily weekly today require-timed) "----------------"
|       ( 000 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2359))))
`----
2010-09-02 15:21:30 +02:00
Manish Sharma 2cf6136523 Allow "#" and "%" in tags
Patch largely from Manish, missing points added by Carsten
2010-08-31 08:25:20 +02:00
Carsten Dominik a7660225af Fix code typo 2010-08-21 08:37:11 +02:00
Carsten Dominik 96bacc020b Fix adding context lines in agenda
* lisp/org-agenda.el (org-agenda-add-entry-text): Make sure we move
forward even if there is no text to be added.

Adding entry text with org-agenda-add-entry-text-maxlines greater than
0 could result in an infinite loop.
2010-08-21 07:09:20 +02:00
Carsten Dominik 6f61135c84 New macro
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry): New macro.
2010-08-20 08:32:31 +02:00
David Maus 6d9fcf8ff4 Delete postscript file after creating conversion to pdf
* org-agenda.el (org-write-agenda): Delete postscript file after
creating conversion to pdf.
2010-08-19 21:54:12 +02:00
David Maus 768d88acc3 Move require statements to proper place in evaluated lisp expression
* org-agenda.el (org-write-agenda): Move require statements to proper
place in evaluated lisp expression.
2010-08-19 21:52:18 +02:00
David Maus cc5b21e2cb Rename temporary buffer to remove dependency of `flet' macro
* org-agenda.el (org-write-agenda): Rename temporary buffer to remove
dependency of `flet' macro.
2010-08-19 21:37:19 +02:00
Bastien Guerry 7cc0612e62 org-agenda-clock-out: remove unnecessary "P" in (interactive). 2010-08-17 18:47:57 +02:00
David Maus 1ab9b17ee8 Delete excluded lines directly after call to sorting filter function.
* org-agenda.el (org-finalize-agenda-entries): Delete excluded lines
directly after call to sorting filter function.
2010-08-16 21:06:12 +02:00
Bastien Guerry 244681c44f org-agenda-clock-out: remove unused optional argument "arg". 2010-08-16 20:46:38 +02:00
Carsten Dominik ac8e3fb8d1 New hook to add more properties to new agenda items, or to filter
* lisp/org-agenda.el (org-agenda-before-sorting-filter-function): New hook
function.
(org-finalize-agenda-entries): Apply
`org-agenda-before-sorting-filter-function'.
2010-08-16 15:39:29 +02:00
Carsten Dominik 2b28ba8800 Fix typo 2010-08-15 07:50:29 +02:00
Bastien Guerry d17cc96fc7 Remove a compiler warning.
Added (defvar org-clock-current-task) to org-agenda.el.
2010-08-13 10:48:40 +02:00
Bastien Guerry 0f33e18983 org-agenda-clock-goto: complete the docstring. 2010-08-12 10:27:05 +02:00
Bastien Guerry a7a842457d Rebind org-agenda-clock-goto to `J' in the agenda.
* org-agenda.el (org-agenda-clock-goto): Use `\C-c\C-x\C-j' for
`org-clock-goto' and `J' for `org-agenda-clock-goto'.  If the heading
currently clocked in is not listed in the agenda, display this entry
in another buffer.  If there is no running clock, display a help
message.

* org-clock.el (org-clock-set-current): append the filename after the
heading.
2010-08-11 16:10:14 +02:00
Carsten Dominik 6a5d28bce7 Fix typo. 2010-08-11 09:45:36 +02:00
Carsten Dominik d34a5a2613 Agenda: Allow compact two-column display in agenda dispatcher
* lisp/org-agenda.el (org-agenda-menu-show-match): New option.
(org-agenda-menu-two-column): New option.
(org-agenda-get-restriction-and-command): Implement dispatch menu
without showing the matcher, and with two-column display.
2010-08-11 09:42:39 +02:00
Carsten Dominik dff92f433e Fix indentation 2010-08-08 08:43:07 +02:00
Carsten Dominik 26714634a9 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-07 08:23:56 +02:00
Carsten Dominik 5188f71ee8 Timeline: Allow the buffer to be an indirect one
* lisp/org-agenda.el (org-timeline): Allow indirect buffer.
2010-08-07 08:23:33 +02:00
Bastien Guerry 5b85810f4d New command: `org-agenda-clock-goto' (C-c C-x C-j)
This command jumps to the headline of the clocking task within the
agenda buffer.  `org-agenda-clock-goto' is bound to `C-c C-x C-j'.

It is different from `org-clock-goto', which jumps to the currently
clocking entry itself (bound to `J').
2010-08-06 19:28:08 +02:00
John Wiegley d91ce1490d Merge branch 't/patch157' 2010-07-28 02:26:57 -04:00
Jambunathan K 86ca53fe6f Agenda view invokes custom sort routine even if not configured to do so 2010-07-28 02:25:09 -04:00
Carsten Dominik 22567f5ea0 Agenda: Document the limitation of the filter preset
* lisp/org-agenda.el (org-agenda-filter-preset): Document the limitation
for the filter preset - it can only be used for an entire agenda view,
not in an individual block in a block agenda.
* doc/org.texi (Agenda commands):  Document the limitation
for the filter preset - it can only be used for an entire agenda view,
not in an individual block in a block agenda.
2010-07-22 09:11:12 +02:00
Carsten Dominik 6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Carsten Dominik 9c4f5725b4 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-16 14:15:47 +02:00
John Wiegley 332113111c Changed two uses of setq to let, to fix compiler warnings 2010-07-16 02:50:24 -04:00
Julien Barnier 728092e083 Add the ability to remove time ranges specifications 2010-07-16 02:46:02 -04:00
Philip Rooke 254740cb9c Correct some docstrings
This patch makes some straightforward corrections to a number of
docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

Cheers,

Phil
2010-07-15 19:04:38 +02:00
Matt Lundin c45d0680af Fix inclusion of agenda-archives in search view
* org-agenda.el (org-search-view): Fixed inclusion of agenda-archives
in org-agenda-text-search-extra-files.

org-search-view lacked a local binding for
org-agenda-text-search-extra-files. Thus when pop was called on the
variable, the agenda-archives symbol was removed and subsequent
searches failed to include the archives.
2010-07-15 07:23:28 +02:00
Dirk-Jan C. Binnema 18161d0310 Add capture to agenda actions
* lisp/org-agenda.el (org-agenda-action): Document capture key and add it
to the prompt.

TINYCHANGE

A trivial patch to add some documentation for 'capture' to org-agenda (against
HEAD).
2010-07-12 07:56:26 +02:00
David Maus 4273e50ab7 Don't create marker if target is entire file.
* org-agenda.el (org-agenda-bulk-action): Don't create marker for
position if target is entire file.

If the target of a bulk refile operation is the entire file,
`org-refile-get-location' returns nil for the refile position.
Creating a marker for the target file's buffer at position nil returns
a marker that points nowhere (Cf. GNU Emacs Lisp Reference Manual,
31.6).  `org-refile' adds headings to level 1 if the target position
for the target file is nil -- and hence a marker that points nowhere
is not nil, tries to jump to nowhere.
2010-07-06 08:55:02 +02:00
Carsten Dominik c74ecf4387 Fix display problem of clocked time in agenda
* lisp/org-agenda.el (org-agenda-get-progress): Avoid reusing previous
value of EXTRA.

Sebastien Vauban writes:

> Finally reporting the following bug. Has been there for as long as I can
> remember, but never did report it when seeing it. And kept forgetting.
>
> So, now...
>
> --8<---------------cut here---------------start------------->8---
> * 2010
>
> ** 2010-06 June
>
> *** Admin
>
> **** Organization
>     :LOGBOOK:
>     CLOCK: [2010-06-30 Wed 13:30]--[2010-06-30 Wed 17:50] =>  4:20
>     - DUPLICATED TeXt.
>     :END:
>
> **** Emails and News
>     :LOGBOOK:
>     CLOCK: [2010-06-28 Mon 09:10]--[2010-06-28 Mon 10:40] =>  1:30
>     CLOCK: [2010-06-30 Wed 10:30]--[2010-06-30 Wed 12:30] =>  2:00
>     :END:
>
> *** ABC
>    :LOGBOOK:
>    CLOCK: [2010-06-30 Wed 09:30]--[2010-06-30 Wed 10:30] =>  1:00
>    - Transfer of files to ABC.
>    :END:
> --8<---------------cut here---------------end--------------->8---
>
> generates the following timeline:
>
> --8<---------------cut here---------------start------------->8---
> Timeline of file /home/sva/Projects/ecm.org
>
> 2010-06-28 Mon _________________________________
>  Clocked:   (1:30) Emails and News
>
> 2010-06-29 Tue _________________________________
>
> 2010-06-30 Wed _________________________________
>  Clocked:   (1:00) ABC - Transfer of files to ABC.
>  Clocked:   (2:00) Emails and News - DUPLICATED TeXt.
>  Clocked:   (4:20) Organization - DUPLICATED TeXt.
> --8<---------------cut here---------------end--------------->8---
>
> As you can see, the fact that I never put a descriptive text for "reading
> emails" is wrongly reported: previous text is used in the timeline, instead.
2010-07-01 14:02:58 +02:00
David Maus 5a3766e0a1 Use backquotes to make byte compiler expand `flet' macro.
* org-agenda.el (org-write-agenda): Use backquotes to expand
`flet' at compile time.
2010-06-28 06:28:02 +02:00
Carsten Dominik 08f8875ecd Catch agenda error when there is a tie stamp before the first headline
* lisp/org-agenda.el (org-agenda-get-timestamps): No errors
while getting TODO state.
(org-agenda-highlight-todo): No error when no keyword has
been matched.

Eric Arneson writes:

> I've discovered a bug in `org-agenda-get-timestamps' wherein an active
> timestamp before the first headline causes it to fail.  I realize that
> this is probably an error in my use of active timestamps, but there was
> no really handy error message and this bugged me for weeks.
>
> I'm not familiar enough with org-mode to know what the correct behavior
> should be here (it'd be nice to get an error message saying "Don't use
> active timestamps that way!"), but here's an example .org file that will
> trigger the bug:
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN: clocktable :maxlevel 3 :scope today
> Clock summary at [2010-06-20 Sun 13:09]
>
> | L | Headline                              | Time   |
> |---+---------------------------------------+--------|
> |   | *Total time*                          | *0:13* |
> |---+---------------------------------------+--------|
> | 1 | Track down funky bug <2010-06-20 Sun> | 0:13   |
> #+END:
>
> * Track down funky bug <2010-06-20 Sun>
>  :LOGBOOK:
>  CLOCK: [2010-06-20 Sun 12:43]
>  CLOCK: [2010-06-20 Sun 12:30]--[2010-06-20 Sun 12:43] =>  0:13
>  :END:
> --8<---------------cut here---------------end--------------->8---
>
> I hope this can help somebody else track down the right place to fix
> this bug.
2010-06-24 08:53:34 +02:00
Carsten Dominik 36b6471858 Merge branch 'improve-todo-match-documentation' 2010-06-22 14:47:45 +02:00
Carsten Dominik 2e73ce2177 Clarify that TODO matches only match not-DONE states by default
Bernt Hansen writes:

> I was talking to Jeff Stern about tags todo matching offlist and we
> think the documentation for tags-todo matching can probably be improved.
>
> The description of C-c a M at
> http://orgmode.org/manual/Matching-tags-and-properties.html
> states
>
> C-c a M
>
>    Like C-c a m, but only select headlines that are also TODO items and
>    force checking subitems (see variable
>    org-tags-match-list-sublevels). To exclude scheduled/deadline items,
>    see the variable org-agenda-tags-todo-honor-ignore-options. Matching
>    specific TODO keywords together with a tags match is also possible,
>    see Tag searches.
>
> When I read this I think TODO items is any todo keyword but this isn't
> the case.  It is only non-done TODO state keywords.  This makes
> tags-todo matching not work for finding tasks to archive (normally
> DONE | CANCELLED keywords in my setup)
>
> Should we explicitly state that 'headlines that are also TODO items'
> does not match DONE state keywords?  Or alternatively should TODO items
> and DONE items be separate (and explicitly defined) in the documentation
> -- like org-todo-keywords and org-done-keywords?
>
> I still think 'TODO keyword' matches any todo keyword defined in
> org-todo-keywords and maybe I need to be re-educated :)

Bernt is right, and this patch tries to clarify the issue.
2010-06-22 14:47:37 +02:00
Carsten Dominik 1d52e54efd New capture system org-capture
* lisp/org-agenda.el (org-agenda-action): Make `c' key call org-capture.
* lisp/org-capture.el: New file.
* lisp/org-compat.el (org-get-x-clipboard): Function moved here from
remember.el.
* lisp/org-mks.el: New file
* lisp/org.el (org-set-regexps-and-options): Allow statistic cookies as
part of complex headlines.
(org-find-olp): New argument THIS-BUFFER.  When set, assume that the
OLP does not contain a file name.
2010-06-22 14:19:18 +02:00
Carsten Dominik eade8e6fa3 Revert "* lisp/org-agenda.el (org-agenda-get-deadlines):"
This reverts commit 14b689946d.

See discussion in

   http://thread.gmane.org/gmane.emacs.orgmode/26154/focus=26400
2010-06-21 15:18:36 +02:00
Bastien Guerry 14b689946d * lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled):
* lisp/org.el (org-time-string-to-seconds):
For deadline and scheduled agenda display ignore the cyclic repeater
when calculating how many days late the task is.  If you have a weekly
task and miss the date the agenda view will show more than a week late
now instead of resetting on the cyclic repeating date.  This makes it
much more obvious when you missed a repeating task after the repeater.

Thanks to Bernt Hansen for this patch.
2010-06-16 16:12:31 +02:00
Thomas Morgan cc47da0acb Persistent filters in Org mode
Hello, Org mode hackers,

This patch defines a variable `org-agenda-persistent-filters'.
When it is set, filters persist from one agenda view to the next.

I've found this convenient when using tags for contexts like @home,
@net, etc., some of which commonly remain applicable for a while.

Thanks,
Thomas

From 052ef9205845c78cb24d6fea8f89484bbe12a528 Mon Sep 17 00:00:00 2001
From: Thomas Morgan <tlm@ziiuu.com>
Date: Fri, 23 Apr 2010 11:48:03 +0200
Subject: [PATCH] New option `org-agenda-persistent-filters'.
 When set, keep filters from one agenda view to the next.
2010-05-20 08:54:17 +02:00
Carsten Dominik e3c43d80cd Apply Stefan's simplification 2010-05-16 16:12:57 +02:00
Carsten Dominik c86a3fc4aa Push version number to 6.36trans 2010-05-09 06:24:20 +02:00
Carsten Dominik 88100d1580 Release 6.36a 2010-05-09 06:13:54 +02:00
Carsten Dominik 7f085d0e5c Agenda: Speed-up comparing entries when sorting
The comparison function now only computes the comparisons actually needed.
2010-04-30 07:54:18 +02:00
Carsten Dominik 4c2e8c359b New agenda sorting strategy alphabetically
Requested by John Wiegley
2010-04-30 07:31:43 +02:00
Carsten Dominik 9822a6799a Push a mark before the agenda can move point in a buffer
Patch by Andreas Seltenreich.
2010-04-27 12:00:03 +02:00
Carsten Dominik 3a62d52570 Redo the agenda after refiling 2010-04-25 23:52:51 +02:00
Carsten Dominik e0ca9a5bdf More work on simplifying compatibility code 2010-04-21 09:18:12 +02:00
Carsten Dominik 56ba0892e5 Simplify XEmacs key bindings 2010-04-21 08:38:09 +02:00
Carsten Dominik c6ea2a1457 Use overlay-in and overlay-at instead of compatibility functions 2010-04-20 12:17:06 +02:00
Carsten Dominik bb0ef787b7 Require calendar already on top level in org.el 2010-04-18 16:50:13 +02:00
Carsten Dominik 8bd9308662 No linger bind obsolete calendar variables 2010-04-18 16:49:58 +02:00
Carsten Dominik f45e6a28b1 Use the normal overlay API, not Org's one 2010-04-18 16:49:58 +02:00
Carsten Dominik 43bf1bbbd7 Push version number to 6.35trans 2010-04-15 12:24:55 +02:00
Carsten Dominik 39f4c6041b Fix typo 2010-04-13 07:59:56 +02:00
Carsten Dominik 6f3026edf1 Release 6.35g 2010-04-08 20:15:15 +02:00