Org Mode 计时功能
在 Org Mode 里有这样两种计时功能。一种是累计计时器(relative timer),它将自一个初始时间开始累计已用时间,它适用于类似我们在听网络直播课时记录下当前时间的重要内容标记,以便课后回顾那些重要时间节点的内容;另一种是倒计时计时器(countdown timer),它适用于类似我们在使用「番茄工作法」时所适用的倒计时功能。
这两种计时器功能的快捷键如下:
C-c C-x 0 (org-timer-start)
开始或重置累计计时器,累计计时器默认从 0 开始计时。可以通过快捷键前缀
C-u
来设置初始时间,Start or reset the relative timer. By default, the timer is set to 0. When called with a C-u prefix, prompt the user for a starting offset. The prompt will default to a timer string at point (if any), providing a convenient way to restart taking notes after a break in the process. When called with a double prefix argument C-u C-u, change all timer strings in the active region by a certain amount. This can be used to fix timer strings if the timer was not started at exactly the right moment.
C-c C-x ; (org-timer-set-timer)
启动倒计时计时器。倒计时启动前计时器将在 mini buffer 里提示输入倒计时时间。如果没有输入倒计时时间而直接按回车,这时计时器的倒计时时间的默认值是变量
org-timer-default-timer
的值。还可以通过快捷键前缀C-u
来改变org-timer-default-timer
的值,此时计时器会直接进入计时。This command is available as ; in agenda buffers.当使用倒计时计时器来应用「番茄工作法」时可以通过设置
org-clock-sound
给倒计时结束加入提示声音:(setf org-clock-sound (expand-emacs-dir "sounds/ding.wav"))
当计时器启动后,relative 和 countdown 两种计时器都是通过下面这些快捷键和命令来操作:
C-c C-x . (org-timer)
插入 relative 计时器的时间到当前 buffer 中,带快捷键前缀
C-u
时将重置当前计时器。C-c C-x - (org-timer-item)
Insert a description list item with the current relative time. With a prefix argument, first reset the timer to 0.
M-RET (org-insert-heading)
Once the timer list is started, you can also use M-RET to insert new timer items.
C-c C-x , (org-timer-pause-or-continue)
暂停或重新启动(已暂停状态的)计时器
C-c C-x _ (org-timer-stop)
停止计时,并清除 mode line 上显示的计时,在此之后将不能再对之前的计时器做任何操作,只能开始一个新的计时。