如何配置Emacs将完成的任务归档到文件?

时间:2018-09-04 20:02:20

标签: emacs org-mode

我将所有任务保存在todo.org文件中。任务完成后,我想选择它并将其归档到单独的archive.org文件中。我当然想在我的配置文件中进行设置,而不是按文件头进行设置。

我尝试过:

(setq org-archive-location (concat org-directory "~/Dropbox/logs/archive.org::"))

似乎可以工作;我看到一条消息,说明任务已归档到我选择的路径。但是-当我打开archive.org时,什么也没有。曾经然后,每当我关闭并重新打开Emacs时,都会看到错误消息Symbol's value as variable is void: org-directory

所以:我如何正确配置Emacs以便将我选择的任务存档到正确的位置?还是Org模式的新手,所以请留意。

编辑:使用Emacs 25.3.2和Org 9.1.7。

1 个答案:

答案 0 :(得分:2)

由于O.P.也表示(在原始问题下方的评论中)希望自动保存目标存档缓冲区,因此该回答也可以解决该问题:

  
Processing by AlertasController#sendnoti as HTML
  Cliente Load (0.3ms)  SELECT  `clientes`.* FROM `clientes` WHERE `clientes`.`id` = 6 LIMIT 1
  ↳ app/controllers/alertas_controller.rb:37
  Alerta Load (0.2ms)  SELECT  `alerta`.* FROM `alerta` WHERE `alerta`.`id` = 1 LIMIT 1
  ↳ app/controllers/alertas_controller.rb:39
   (0.1ms)  BEGIN
  ↳ app/controllers/alertas_controller.rb:41
   (0.1ms)  ROLLBACK
  ↳ app/controllers/alertas_controller.rb:41
wrong number of arguments (given 1, expected 0)
相关问题