Emacs org-mode 一天多次安排一个项目?

发布于 2024-12-25 17:35:36 字数 83 浏览 0 评论 0原文

我想在 emacs org-mode 中安排一个任务在一天中多次显示。

编辑:举个例子,假设我希望你白天每 2 小时给我妻子打电话一次。

I want to schedule a task in emacs org-mode to show up multiple times during the day.

Edit: as an example suppose I want yo call my wife every 2 hours during the day.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半透明的墙 2025-01-01 17:35:36

根据组织模式手册中的重复任务,每小时有一个重复器:

在下面的例子中

** TODO 支付租金
   截止日期:<2005-10-01 星期六+1m>

+1m 是中继器;预期的解释是任务
截止日期为 <2005-10-01>,并且每(一)个月重复一次
从那时开始。您可以使用每年、每月、每周、每天
每小时使用y/w/m/d/重复cookie h 字母。

您可以使用类似的内容:

* TODO Call Wife
  DEADLINE: <2013-02-17 Sun 16:00 +2h>

不幸的是,我注意到特殊的中继器修饰符(++.+)对于每小时中继器不能正常工作。手册说:

** TODO 呼叫父亲
   截止日期:<2008-02-10 星期日 ++1w>
   将此标记为“完成”会将日期移动至少一周,
   但也需要尽可能多的时间才能将这个日期纳入
   未来。然而,即使你打电话,它仍然是周日
   并标记为周六完成。

基于此,您可能会期望用每小时的中继器(例如上面的)标记一个条目 DONE 会“将时间移动至少 n 小时,但也会移动同样多的时间将此日期变为未来所需的时间”。

不过,以下是我在将两个条目标记为“完成”后得到的结果:

** TODO Call Father
   DEADLINE: <2013-03-03 Sun ++1w>
   - State "DONE"       from "TODO"       [2013-02-25 Mon 23:06]
   :PROPERTIES:
   :LAST_REPEAT: [2013-02-25 Mon 23:06]
   :END:

** TODO Call Wife
   DEADLINE: <2013-02-17 Sun 18:00 ++2h>
   - State "DONE"       from "TODO"       [2013-02-25 Mon 23:06]
   :PROPERTIES:
   :LAST_REPEAT: [2013-02-25 Mon 23:06]
   :END:

如您所见,第二个条目中的时间已转变为18:00 ,但日期仍然相同。


关于明确创建重复项目的方法,另一个功能可能会很有用。手册说:

使用中继器的另一种方法是创建多个副本
任务子树,每个副本中的日期都会发生变化。命令Cc Cx c
是为此目的而创建的,它在结构编辑中进行了描述。

但不幸的是,它不适用于几个小时。


本文中的信息基于组织模式版本 7.9.3.e。

According to the Org Mode manual on Repeated Tasks there is an hourly repeater:

In the following example

** TODO Pay the rent
   DEADLINE: <2005-10-01 Sat +1m>

the +1m is a repeater; the intended interpretation is that the task
has a deadline on <2005-10-01> and repeats itself every (one) month
starting from that time. You can use yearly, monthly, weekly, daily
and hourly repeat cookies by using the y/w/m/d/h letters.

You may use something like that:

* TODO Call Wife
  DEADLINE: <2013-02-17 Sun 16:00 +2h>

Unfortunately, I've noticed that special repeater modifiers (++ and .+) do not work properly for hourly repeaters. The manual says:

** TODO Call Father
   DEADLINE: <2008-02-10 Sun ++1w>
   Marking this DONE will shift the date by at least one week,
   but also by as many weeks as it takes to get this date into
   the future.  However, it stays on a Sunday, even if you called
   and marked it done on Saturday.

Based on this, you would expect that marking an entry with an hourly repeater (such as the one above) DONE would "shift time by at least n hours but also as many hours as it takes to get this date into the future".

However, here's what I got after marking both entries DONE:

** TODO Call Father
   DEADLINE: <2013-03-03 Sun ++1w>
   - State "DONE"       from "TODO"       [2013-02-25 Mon 23:06]
   :PROPERTIES:
   :LAST_REPEAT: [2013-02-25 Mon 23:06]
   :END:

** TODO Call Wife
   DEADLINE: <2013-02-17 Sun 18:00 ++2h>
   - State "DONE"       from "TODO"       [2013-02-25 Mon 23:06]
   :PROPERTIES:
   :LAST_REPEAT: [2013-02-25 Mon 23:06]
   :END:

As you can see, the time in the second entry has shifted to 18:00, but the date is still the same.


Concerning an approach for creating repeating items explicitly another feature could be useful. The manual says:

An alternative to using a repeater is to create a number of copies of
a task subtree, with dates shifted in each copy. The command C-c C-x c
was created for this purpose, it is described in Structure editing.

But unfortunately, it doesn't work with hours.


Information in this post based on Org Mode version 7.9.3.e.

余生一个溪 2025-01-01 17:35:36

在没有小时/分钟级别的重复器的情况下,如果间隔不太小,您可以为小时添加多个时间戳,同时使用其他设施来重复项目:

** Testentry
<2012-01-19 Do 10:00 +1w>
<2012-01-19 Do 12:00 +1w>

生成的议程视图

Thursday   19 January 2012
  Calendar:   10:00...... Testentry
  Calendar:   12:00...... Testentry

[...]

Thursday   26 January 2012
               8:00...... ----------------
  Calendar:    9:45-10:00 XXXXXXXXXXXXXX                        :OFFICE:
               10:00...... 
  Calendar:   10:00...... Testentry
              10:00...... ----------------
  Calendar:   12:00...... Testentry
[...]

In the absence of hour/minute level repeaters, if the interval is not too small, you might add multiple timestamps for the hours, while using the other facilities for repeated items:

** Testentry
<2012-01-19 Do 10:00 +1w>
<2012-01-19 Do 12:00 +1w>

The resulting agenda view

Thursday   19 January 2012
  Calendar:   10:00...... Testentry
  Calendar:   12:00...... Testentry

[...]

Thursday   26 January 2012
               8:00...... ----------------
  Calendar:    9:45-10:00 XXXXXXXXXXXXXX                        :OFFICE:
               10:00...... 
  Calendar:   10:00...... Testentry
              10:00...... ----------------
  Calendar:   12:00...... Testentry
[...]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文