1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-23 07:18:53 +00:00
Commit Graph

282 Commits

Author SHA1 Message Date
Carsten Dominik
03efd877bc Clock: Add more hooks
This commit add four hooks to the clocking code.

Patch by Benjamin Andresen.
2009-06-21 17:26:52 +02:00
Carsten Dominik
7c3aba2d3a Magnus Henoch writes:
>  I just discovered that org-clock-in displays the clocked-in task
>  in the mode line, so that I can click it and go back to the Org
>  file, which I really like.  I changed it to switch to the window
>  in which I click, by prepending "@" to the interactive spec of
>  org-clock-goto.
2009-06-19 14:03:34 +02:00
Carsten Dominik
a5f080361a Clock: Manipulating effort strings, and a mode line menu
Clicking on the clock in the mode line now pops up a menu with
clocking options.

A new command `C-c C-x C-e' allows to set or change the effort
estimate of the task currently being clocked.  This is mainly useful
when using an alert notification when the task should be finished.

Based on a patch by Konstantin Antipin.
2009-06-17 07:40:22 +02:00
Carsten Dominik
951125da8d intermediate 2009-06-16 09:42:05 +02:00
Bernt Hansen
fab7da2d7c Fix typo in org-clock-get-clocked-time 2009-06-09 23:02:09 +02:00
Bernt Hansen
e0f9c00f10 Do not issue the 'task should be finished by now' message if the clock is stopped
This patch prevents the org-clock-sound notification and the

   "Task'BLAH' should be finished by now."

message when the termination time is reached and the clock is not
running.

Before this patch spurious notifications and messages were generated when
clocking in a task with estimated effort time remaining.  After clocking
out the task the remaining minutes would tick by and then the sound
and message that the task should be finished were generated - even though
you are not working on it anymore.
2009-06-09 23:02:01 +02:00
Bernt Hansen
7f9e53d6b1 Initialize org-clock-notification-was-shown on clock-in
This makes org-clock-sound a little more well-behaved.  The clock
sound was only being issued if you were already clocking a task that
was under its limit, and changed to clocking something else.  Now each
time you clock in a new task it checks the estimated effort limit and
issues the org-clock-sound if the limit is exceeded.

This patch issues the org-clock-sound whenever you clock in a task
that is already over its estimated effort amount.  This allows you to
use the estimated effort as a limit for the amount of time to spend on
a task.  Each time you clock in the task you'll be notified that you
are over the limit.  This is great for tasks where you want to limit
the amount of time spent (per day, since last repeat) and is a
reminder to go work on something else instead.
2009-06-09 23:01:34 +02:00
Carsten Dominik
379b24cc63 Fix whitespace issues 2009-06-08 08:00:46 +02:00
Carsten Dominik
855f85b46f New face for clock in mode line. 2009-06-06 08:13:40 +02:00
Carsten Dominik
90c38a0045 Clock: Improve messages 2009-06-02 17:10:23 +02:00
Carsten Dominik
a5dc9456dd New option `org-clock-out-switch-to-state'.
Can be used to change the TODO state when clocking out.
2009-06-02 17:01:11 +02:00
Carsten Dominik
8a2247454c Bug fix 2009-06-02 16:36:16 +02:00
Carsten Dominik
1db461321a Keep compiler happy 2009-06-02 14:49:38 +02:00
Carsten Dominik
ee4bcda0e9 Clock: More control about what time is shown in mode line while clocking
This commit changes which time is shown in the mode line while
clocking.  Normally this will now be the total time ever clocked on
this task and its children.

However, when the task is a repeating one, only the time since the
last reset of the task will be shown.  The time of the last reset is
now recorded in a LAST_REPEAT property.

You can also set the CLOCK_MODELINE_TOTAL property to the value
"current" to only show the current clocking instance.  Or it may be
the value "today", to only add up the time spent today on this task.
Other possible values are "repeat", "all", or "auto".

Finally, you can set your default for this property with
`org-clock-modeline-total'.
2009-06-02 13:47:50 +02:00
Carsten Dominik
5ce1c5708f Clocking: Fix bug in the new cocking code
The cursor could move while collecting the total time for the current
subtree.
2009-05-28 19:49:11 +02:00
Carsten Dominik
19748886eb Tables: Allow #+TBLFM to be indented 2009-05-28 17:44:12 +02:00
Carsten Dominik
2b6a3ac71d Clock notification: Cleaning up some issues 2009-05-28 13:24:23 +02:00
krick
e17fdc3aa9 Merge branch 'origin' into clock-effort-notify 2009-05-28 11:17:13 +02:00
krick
59c6574c05 org-clock-sound could be
* nil. No sound played.
* any string, that is not a file. Make a beep
* file name. Emacs tries to play it with aplay, if available.
  If not, use standard emacs play-sound-file function.
2009-05-28 01:10:27 +02:00
krick
8c3ffc6259 Remove setq of the org-clock-sound here :) 2009-05-27 08:49:51 +02:00
krick
3c2099c29b Show total clocked time in mode line.
(Instead time since last start)
2009-05-26 23:30:38 +02:00
Carsten Dominik
ae7b8f6b12 Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
krick
7c2930e96b In case we set effort estimate on the currently clocked item,
show notification when time is up.
 * Linux only: If libnotify is used - the standard notification
   system in linux, then show notification with it.
   Note: Additional package libnotify-bin should be installed.
Additionally, use beep if variable org-clock-sound is set.
 * If aplay (alsa player) is available, interpret org-clock-sound as
   path to the file, which should be played.
2009-05-25 22:01:34 +02:00
krick
d4b85109dd Show estimated effort in the mode-line if it is set.
* Set org-clock-effort variable in org-clock-in function.
* If org-clock-effort is not nil, show estimated effort in the mode-line.
2009-05-25 16:54:03 +02:00
Carsten Dominik
0421dead4b Release 6.27a 2009-05-25 16:04:45 +02:00
Carsten Dominik
b681c7b26e Release 6.27 2009-05-23 08:22:04 +02:00
Carsten Dominik
88673a8724 Clock history: Second try to get fontification right. 2009-05-05 14:44:05 +02:00
Carsten Dominik
e1f6e949ed Clock history: Present all tasks fontified
Bernt Hansen requested this.
2009-05-05 10:23:47 +02:00
Carsten Dominik
69e6d249aa Push version number to 6.26trans 2009-04-22 09:08:13 +02:00
Carsten Dominik
73854f435d Release 6.26d 2009-04-22 06:42:17 +02:00
Carsten Dominik
38b5a9e704 Clock: New variable to allow finding a recent task with `org-clock-goto' 2009-04-22 06:41:15 +02:00
Carsten Dominik
595e9603ac Release 6.26c 2009-04-21 20:26:27 +02:00
Carsten Dominik
654e629ed9 Clock: Make `C-c C-x C-j' jump to most recently clocked task as well.
If there is no running clock, this command will go to the most
recently clocked task.
2009-04-21 20:25:30 +02:00
Carsten Dominik
e0cd12716a Release 6.26b 2009-04-21 10:21:36 +02:00
Bernt Hansen
a04237d4f4 Revert "Jump to selected clock task when starting the clock"
This reverts commit 61dfa0c67f.

This wasn't such a great idea after all.  There is one case where
this is really annoying - if you are in the middle of displaying
an agenda view with lots of filters active and you change what you
are clocking it jumps away and you lose the agenda view.

This one case makes hitting a dedicated function key that runs
org-clock-goto more desireable.
2009-04-21 06:10:30 +02:00
Carsten Dominik
b8a5f1a7fc Release 6.26a 2009-04-19 22:31:36 +02:00
Carsten Dominik
ba66d2c8ae Release 6.26 2009-04-19 08:38:49 +02:00
Bernt Hansen
61dfa0c67f Jump to selected clock task when starting the clock
Move the point to the selected task when clocking in using the clock
history.  I find I'm always going to the currently clocked task after
picking it off of the menu and this saves one small step.

This could be optionally controlled by a variable.
2009-04-16 06:02:13 +02:00
Carsten Dominik
08b81dbb1d Minor fix 2009-04-14 12:40:25 +02:00
Carsten Dominik
633e8cdd90 Clock: Fix bugs when resuming the clock.
Adam Elliot writes:

>  Automatically resuming the clock after an Emacs restart
>  fails under the following cases:
>
>  1. If org-log-states-order-reversed set to t (default), and
>     a state change line precedes the clock line to resume.
>     Error message is "Cannot restart clock because task does
>     not contain unfinished clock".
>
[...]
>  2. If org-log-states-order-reversed set to nil.  Error
>     message is the same.  Reason: point is placed *after*
>     last clock line and so fails looking-at test.
>

This commit fixes the problem, in a slightly different way
than Adam proposed.  Instead of trying to fix the old way to
find the position of the clock, we now simple search the
entry if there is an unfinished clock and go there.  Since
new clocks are added before older ones, this should be a
safe bet.
2009-04-14 09:50:05 +02:00
Carsten Dominik
ef2ee3df5d Version number pushed to 6.25trans 2009-04-07 18:43:42 +02:00
Carsten Dominik
eef47f820f Release 6.25d 2009-04-05 15:29:45 +02:00
Carsten Dominik
e2eebc83a1 Release 6.25c 2009-04-05 08:45:39 +02:00
Carsten Dominik
5624263d97 Release 6.25b 2009-04-03 19:18:41 +02:00
Carsten Dominik
1426f8bcfd Release 6.25a 2009-04-02 18:24:52 +02:00
Carsten Dominik
aeb5cb98d6 Release 6.25 2009-04-01 16:00:39 +02:00
Carsten Dominik
098cf35983 Clock: Clock out when done also in indirect buffers
Chris Randle writes:

>  I have one giant Org-mode file for everything. I frequently use
>  `C-c C-x b' to take the current node and show it in a new frame
>  with narrow subtree so that I can concentrate on just that region
>  of my file. Rather like hoist in GrandView, if anyone remembers
>  that.
>
>  My Org Manual (6.24b) says "The indirect buffer...will contain
>  the entire buffer, but will be narrowed to the current
>  tree. Editing the indirect buffer will also change the original
>  buffer, but without affecting visibility in that buffer.
>
>  I've noticed that, when working in the new frame, changing the
>  TODO state of any item within the frame to DONE (when it is the
>  currently clocked in item) does not stop the clock. Going back to
>  my main frame and doing the same thing there on the same item
>  does stop the clock.
>
>  I haven't altered `org-clock-out-when-done', and Emacs reports
>  its value as t.

This was caused by the fact that markers seem to point to the
base buffer always, so we need to check if the current buffer's
base buffer is equal to the marker buffer.
2009-03-23 21:02:23 +01:00
Carsten Dominik
76ac6dce68 Bugfix: Fix indentation problems
David Maus writes:

>  When I start to clock a headline (C-c C-x C-i) that does not have a
>  LOGBOOK drawer orgmode inserts one but removes the indentation of the
>  first line below the headline:
>
>  Example:
>
>  * TODO Do something
>   Do this, do that etc.
>
>  after C-c C-x C-i becomes
>
>  * TODO Do something
>   :LOGBOOK:
>   CLOCK: [2009-03-20 Fr 19:03]--[2009-03-20 Fr 19:03] =>  0:00
>   :END:
>  Do this, do that etc.

Fixed with this commit, a patch written by Peter Jones.
2009-03-21 18:24:51 +01:00
Carsten Dominik
722fc9a490 Version number to 6.24trans 2009-03-14 08:03:10 +01:00
Carsten Dominik
c8b6a9cc60 Release 6.24c 2009-03-12 12:51:17 +01:00
Carsten Dominik
680d8cb440 Release 6.24b 2009-03-10 17:50:17 +01:00
Carsten Dominik
7e8a387184 Release 6.24a 2009-03-09 05:37:09 +01:00
Carsten Dominik
20828f3176 Release 6.24 2009-03-05 21:11:18 +01:00
Carsten Dominik
0850b14c8f Clocktable: Use inactive time stamps for stepwise table
Adam Elliott writes:

>  When run in day-step mode, the clocktable header line for each day's
>  table contains an active timestamp.  I figure it should be an inactive
>  timestamp, since otherwise I get a junk entry in the agenda each day
>  (whatever heading was previous to the clocktable).
>
>  I'm talking about the output from a spec such as the following:
>
>  #+BEGIN: clocktable :block thisweek :step day

This commit is the patch Adam sent in.
2009-03-05 16:11:57 +01:00
Carsten Dominik
721dae7dd5 Bugfix: Better indentation for new clock/logbook drawers 2009-03-02 06:41:29 +01:00
Carsten Dominik
c91bca9d1c Push version number to 6.23trans 2009-02-26 21:32:04 +01:00
Carsten Dominik
6c8beec225 Release 6.23b 2009-02-22 18:37:24 +01:00
Carsten Dominik
482216f300 Release 6.23a 2009-02-21 15:18:39 +01:00
Carsten Dominik
82f2fca21e Release 6.23 2009-02-20 11:16:03 +01:00
Carsten Dominik
cac8788f35 Clocking: Capture clock in LOGBOOK drawer, abandon CLOCK drawer
Clock lines are now by default captured into the drawer LOGBOOK.  This
means that, if state notes are also captured into a drawer, they will
be mixed with notes.
2009-02-15 09:22:14 +01:00
Carsten Dominik
492a5b5ea9 Version number: Push to 6.22trans 2009-02-13 07:45:42 +01:00
Carsten Dominik
c32de18ae0 Allow previous state to be shown in state change log notes.
Wanrong Lin writes:

     My TODO sequence is set up as following:

     (setq org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)"
     "WAITING(w@/!)"      "MAYBE(m/!)" "DELEGATED(g@/!)"
     "DEFERRED(d!/!)" "HOLD(h!/!)" "|" "DONE(x)"      "CANCELED(c)")))

     The state change logging is great, but I wonder whether we can
     further improve it:

     1. Can we also include the original state in the log message?
     i.e.: instead of having      - State "DEFERRED"   [2009-02-11 Wed 11:38]
     we can have
     - State "DEFERRED"  from "HOLD" [2009-02-11 Wed 11:38]

     The message will be clearer, and useful even when somebody edited
     the TODO keyword in place without using the "org-todo" command
     (in that case, simply looking at all the "destination states" in
     the log message does not give us the right information).

This strikes me like a good idea, so I have implemented it with this
commit.
2009-02-12 09:48:07 +01:00
Carsten Dominik
651d2e7a14 Bugfix: Allow org-clock-into-drawer to be 1. 2009-02-11 16:17:38 +01:00
Carsten Dominik
f993ecd67d Daniel Clemente writes:
Consider a file with 2 lines:

     ------------------
     **** heading

     ------------------

      Place the cursor at line 2 (where you can type). Then use C-c C-x C-i
      to start a clock.

      You have now 3 lines:

     ------------------
     **** heading
         CLOCK: [2009-02-07 sb 01:06]

     ------------------

      However, the cursor is still placed at line 2, like before. I think
      it would be more useful if it were moved to line 3 so that you can
      start writing right away, just as before.  This saves you the C-n
      needed to move again to a blank line.

This commit implements exactly this request.
2009-02-11 15:01:13 +01:00
Carsten Dominik
621bafc1b5 Clocking: Make insertion of the CLOCK drawer safer
Daniel Clemente noticed that the clock drawer, when it is created for
the second clock entry, will swallow a plain list item after it,
because it thinks it might be a clock note.

This commit makes this function check for indentation.  If the plain
list item is indented less than the last clock line, it will be
assumed that it does not belong to the clocking line, and the drawer
will not swallow the item.
2009-02-11 14:41:22 +01:00
Carsten Dominik
bc5b0056e7 Release 6.22b 2009-02-10 20:21:33 +01:00
Carsten Dominik
e592c77846 Release 6.22a 2009-02-10 10:11:23 +01:00
Carsten Dominik
8d213584ff Release 6.22 2009-02-10 08:23:35 +01:00
Carsten Dominik
93ec228f36 Push version number to 6.21trans 2009-02-03 00:06:22 +01:00
Carsten Dominik
0b424cb238 Release 6.21b 2009-02-02 21:42:20 +01:00
Carsten Dominik
2fa17ebf74 Release 6.21a 2009-02-02 14:23:54 +01:00
Carsten Dominik
193fab0788 Release 6.21 2009-02-02 12:18:44 +01:00
Carsten Dominik
c1296074f2 Release 6.20i 2009-02-01 00:16:43 +01:00
Carsten Dominik
924110aecc Release 6.20h 2009-01-30 18:31:37 +01:00
Carsten Dominik
f99b00f61c Release 6.20g 2009-01-30 09:20:41 +01:00
Carsten Dominik
bb3570eae9 Release 6.20f 2009-01-29 15:29:07 +01:00
Carsten Dominik
11fa49dd21 Release 6.20e 2009-01-29 14:13:30 +01:00
Carsten Dominik
317f08c69b Release 6.20d 2009-01-29 10:38:35 +01:00
Carsten Dominik
435ac059bf Release 6.20c 2009-01-28 14:35:50 +01:00
Carsten Dominik
bc19e4df69 Release 6.20b 2009-01-28 14:04:56 +01:00
Carsten Dominik
16f7c4f384 Release 6.20a 2009-01-28 12:28:54 +01:00
Carsten Dominik
b81f597de0 Release 6.20 2009-01-28 09:30:12 +01:00
Carsten Dominik
a89bbe5cab Clocktables: Fix display of ISO week.
David Bremner writes:

    I have a clocktable that begins like this.

    #+BEGIN: clocktable :maxlevel 2 :block 2009-W05 :scope agenda-with-archives
    Clock summary at [2009-01-27 Tue 17:15], for week 2009-W04.

    [contents snipped]

    #+END:

    Whatever week I put in :block, it puts one less in the title.  It
    seems actually gather the clock data from the right week, but the
    title is wrong?  Or I misunderstand something as usual :-).

There was a problem wit the week starting date.
2009-01-28 09:24:51 +01:00
Carsten Dominik
78b4ca8cfc Release 6.19e 2009-01-27 11:44:49 +01:00
Carsten Dominik
2860252c9e Minor fixes, and release 6.19d 2009-01-27 09:11:34 +01:00
Carsten Dominik
c848dae4be Release 6.19c 2009-01-27 09:02:13 +01:00
Carsten Dominik
f31255c8f3 Maintenance: Remove unused variables. 2009-01-26 11:04:45 +01:00
Carsten Dominik
ea446a6ff7 Release 6.19b 2009-01-26 08:22:14 +01:00
Carsten Dominik
5e965557b3 Release 6.19a 2009-01-25 16:08:16 +01:00
Carsten Dominik
41e51dfef4 Release 6.19 2009-01-25 13:41:09 +01:00
Carsten Dominik
7d05ba72c8 Clock: Independent face for clock overlay display.
William Henney writes:

     If a heading has tags, then that heading's time summary
     overlay (shown by C-c C-x C-d) is displayed using the
     org-tag face. This looks a bit strange. Is it intended? It
     is especially noticeable in my case, since I have my tags
     shown in a smaller font.

This is cause by the fact that we use the `secondary-selection' face
here which only highlights but inherits the rest from what is below.
The idea was that these clock times should have the same color as the
headline they belong to, but this idea is defeated when a line has tags
with a very different face.

This commit introduces a separate face for this purpose, so that users
can customize it.
2009-01-22 07:27:36 +01:00
Carsten Dominik
19351e35c2 Version number: pushed to 6.18trans 2009-01-21 17:59:42 +01:00
Carsten Dominik
5f814319eb Release 6.18c 2009-01-21 10:34:03 +01:00
Carsten Dominik
d164a22da6 Release 6.18a 2009-01-21 10:24:46 +01:00
Carsten Dominik
b76b28f2a7 Release 6.18 2009-01-20 10:23:26 +01:00
Carsten Dominik
1371205fc2 Maintenance: Rename some ill-named functions. 2009-01-08 11:19:37 +01:00
Carsten Dominik
34867369df Push version number to 6.17trans 2009-01-07 13:27:02 +01:00
Carsten Dominik
6b686333fb Release 6.17c 2009-01-06 23:35:50 +01:00
Carsten Dominik
621d11687d Update copyright notice to 2009 2009-01-06 10:47:36 +01:00
Carsten Dominik
da36bd29ab Release 6.17b 2009-01-06 09:56:42 +01:00