使用emacs org模式大约一个月来跟踪我所有的项目和任务。
我在一天中记录所有的活动,而不仅仅是与工作相关的活动。
我的问题是--我经常忘记打卡参加一项新的活动(比如吃午饭)。当我返回并打卡回到工作活动时,我需要首先打卡到午餐,然后调整开始时间戳。这对于午餐活动来说是很好的,但它不会调整我吃午饭之前的工作相关任务,所以网络是前一个任务与午餐重叠,是不准确的。
有没有一种方法可以改变行为,让它调整之前的任务?我不希望使用idle特性来做这件事;我更喜欢让调整自动发生。
发布于 2012-07-25 18:41:07
ETA:这也再次出现在邮件列表中,似乎最近提交了代码库,这提供了另一种可能更好的方法来实现这一点。有关Bastien(组织模式维护者)的输入,请参阅the mailing list discussion:
时钟时间戳上的
S-M-up/down也会尝试更新上一个/下一个时钟时间戳。
(实际上,下面的bzg's
建议就是这样的…它只是没有包含上面的快捷方式,所以我认为他的答案看起来比上面的更难/更不吸引人,这真的很容易。)
您也可以使用org-resolve-clocks
。参见Resolving idle time。
从本质上讲,你有一些标题,并被打卡:
* Work
:LOGBOOK:
CLOCK: [2012-07-25 Wed 8:26]
:END:
我吃完午饭回来,发现忘了打卡下班吃午饭了。
我运行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.
因为我想要K
eep X分钟的工作,打卡下班,然后打卡到午餐,我按K
,这会提示我(现在是1:30p):
Keep how many minutes? (default 303)
我可以按enter键来保留所有人,但假设我在中午12点左右吃了午饭。这大约是3.5小时的工作,所以我将进入210 RET
。
现在,我进入午餐时间,并得到以下提示:
You stopped another clock 101 minutes ago; start this one from them? (y or n)
我进入y RET
,午餐打卡在11点56分。如果你吃完午饭回来又开始工作(或者开始工作后忘记了),重复这个过程:
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
最终结果:
* 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:
希望这能有所帮助。via an org-mode mailing list thread,组织模式时钟向导Bernt Hansen向我解释了这一点。
发布于 2012-07-12 12:10:10
现在已经实现了(请查看http://orgmode.org/w/?p=org-mode.git;a=commit;h=3528fc)。
.emacs.el和新时钟中的(setq org-clock-continuously t)
将从上一个时钟关闭的时间开始。
即使当org-clock-continuously
设置为nil
时,C-u C-u C-u M-x org-clock-in RET
和C-u C-u M-x org-clock-in-last RET
也会执行此操作。
发布于 2012-07-02 01:22:08
如果我没理解错的话,你想在打卡后调整时间戳。有一个命令可以实现这一点;您可以查看函数:
org-timestamp-up
org-timestamp-down
我以为这些都是默认绑定的,但看起来没有,所以你会想要把它们绑定到一个键序列上,比如C-c T u
和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)))
https://stackoverflow.com/questions/11143645
复制相似问题