现在使用emacs组织模式大约一个月来跟踪我的所有项目和任务.
我计算了一整天的所有活动,而不仅仅是与工作相关的活动.
我的问题是 - 我经常忘记参加一项新的活动(比如吃午饭).当我返回并重新参加工作活动时,我需要先进入午餐时间,然后调整它的开始时间戳.这对于午餐活动来说很好,但是在我吃午饭之前它没有调整以前的工作相关任务,所以网络是前一个任务与午餐重叠并且不准确.
有没有办法改变行为,以便它确实调整以前的任务?我不希望使用空闲功能来执行此操作; 我更愿意自动进行调整.
Hen*_*ndy 15
ETA:这也在邮件列表上再次出现,似乎最近提交了代码库,提供了另一种[也许更好]的方法来实现这一点.请参阅Bastien(org-mode maintainer)输入的邮件列表讨论:
时钟时间戳上的SM- [up/down]也会尝试更新上一个/下一个时钟时间戳.
(实际上,bzg's下面的建议是这个确切的事情......它只是没有上面的快捷方式,所以我认为他的答案看起来比上面的更难/更少,这真的很容易.)
你也可以使用org-resolve-clocks.请参阅解决空闲时间.
从本质上讲,你有一些标题,并有时钟:
* Work
:LOGBOOK:
CLOCK: [2012-07-25 Wed 8:26]
:END:
Run Code Online (Sandbox Code Playgroud)
我从午餐回来,意识到我忘了退休,吃午饭.
我跑了M-x org-resolve-clocks并得到这个提示:
Select a Clock Resolution Command:
i/q/C-g Ignore this question; the same as keeping all the idle time.
k/K Keep X minutes of the idle time (default is all). If this
amount is less than the default, you will be clocked out
that many minutes after the time that idling began, and then
clocked back in at the present time.
g/G Indicate that you "got back" X minutes ago. This is quite
different from 'k': it clocks you out from the beginning of
the idle period and clock you back in X minutes ago.
s/S Subtract the idle time from the current clock. This is the
same as keeping 0 minutes.
C Cancel the open timer altogether. It will be as though you
never clocked in.
j/J Jump to the current clock, to make manual adjustments.
For all these options, using uppercase makes your final state
to be CLOCKED OUT.
Run Code Online (Sandbox Code Playgroud)
因为我想要K工作X分钟,然后退出,然后进入午餐,我按下K,这提示我(现在是~1:30p):
Keep how many minutes? (default 303)
Run Code Online (Sandbox Code Playgroud)
我可以点击进入以保留所有这些,但是假设我在12p左右吃了午餐.那是大约3.5小时的工作,所以我会进入210 RET.
现在,我进入午餐时间并获得此提示:
You stopped another clock 101 minutes ago; start this one from them? (y or n)
Run Code Online (Sandbox Code Playgroud)
我进入y RET,午餐时间为11:56a.如果您从午餐回来并再次工作(或开始工作并忘记),请重复以下过程:
M-x org-resolve-clocks
K
____ RET ;; for how many minutes you at lunch
C-c C-x C-i ;; to clock in on Work again
y RET ;; clock in at when you stopped lunch
Run Code Online (Sandbox Code Playgroud)
最终结果:
* Work
:LOGBOOK:
CLOCK: [2012-07-25 Wed 12:41]
CLOCK: [2012-07-25 Wed 8:26]--[2012-07-25 Wed 11:56] => 3:30
:END:
* Lunch
:LOGBOOK:
CLOCK: [2012-07-25 Wed 11:56]--[2012-07-25 Wed 12:41] => 0:45
:END:
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助.组织模式时钟向导Bernt Hansen 通过组织模式邮件列表线程向我解释了这一点.
现在已实现(请查看http://orgmode.org/w/?p=org-mode.git;a=commit;h=3528fc).
(setq org-clock-continuously t) 在.emacs.el中,新时钟将从最后一个时钟关闭时开始.
C-u C-u C-u M-x org-clock-in RET并且C-u C-u M-x org-clock-in-last RET也将做到这一点,即使org-clock-continuously被设置为nil.
如果我正确理解你的问题,你想在下班后调整时间戳。有一个命令可以做到这一点;你可以检查一下功能:
org-timestamp-up
org-timestamp-down
我认为这些是默认绑定的,但看起来它们不是,所以你需要将它们绑定到一个键序列,也许像C-c T uand之类的东西C-c T d,或者任何能让你的船漂浮的东西。使用方法很简单,只需将光标移动到要调整的字段上,然后向上或向下运行即可。它仅适用于时间戳本身,不适用于右侧显示的计算持续时间。
您也可以查看
org-timestamp-change
前两个函数是其包装器。您可能还需要自定义变量
org-time-stamp-rounding-minutes
默认情况下,它会将时间戳四舍五入为从原始打卡开始算起的 +/- 5 分钟,您在修改时间戳时可能会感到困惑。
就我个人而言,我更喜欢(setq org-time-stamp-rounding-minutes '(0 1))在我打卡的那一分钟(零)启动计时器,并使用 1 分钟的粒度来更改时间戳。另外,您可以使用前缀,例如C-u 4 7 C-c T u时间戳的分钟部分,并且 org-mode 会做正确的事情 - 甚至将小时四舍五入。
概括:
(setq org-time-stamp-rounding-minutes '(0 1))
(add-hook 'org-mode-hook
'(lambda ()
(local-set-key (kbd "C-c T u") 'org-timestamp-up)
(local-set-key (kbd "C-c T d") 'org-timestamp-down)))
Run Code Online (Sandbox Code Playgroud)