使用org-indent-mode时如何用适当的缩进包装列表?

时间:2012-01-19 13:42:42

标签: emacs org-mode

在Org-mode中,我可以通过适当的缩进by using org-indent-mode获得标题。我怎样才能对列表执行相同的操作,也就是说,如何使列表在Org-mode中包含适当的缩进?

如果我插入

* Very very very very very very very very very very very very very very very very very very very long line
- Very very very very very very very very very very very very very very very very very very very long line

进入具有org-indent-mode的组织模式缓冲区我得到以下内容:

* Very very very very very very very very very very very very very very very
  very very very very long line
  - Very very very very very very very very very very very very very very very
  very very very very long line.

请注意,列表的第二行(以-开头的那一行)没有正确缩进,因为它应该与列表开头的第一个字母对齐。我期望的是以下内容:

* Very very very very very very very very very very very very very very very
  very very very very long line
  - Very very very very very very very very very very very very very very very
    very very very very long line.

我在GNU Emacs 23.3.1中运行Org-mode 7.6。

1 个答案:

答案 0 :(得分:5)

这似乎是Org-mode version 7.8.03中的标准。发布7.8的消息表明org-ident.el在使用视线模式时会被重构(并且应该更快)。

作为测试,我运行了emacs -q并使用了emacs24附带的Org-mode version 7.7。它表明了不受欢迎的行为。将7.8的本地副本添加到我的加载路径并重新加载组织,然后刷新缓冲区C-c C-c

#+STARTUP: indent

在附加线上添加了额外的空格,以便缩进符合您的预期。

升级到7.8.03(或当前的git-head)将为您提供所需的功能。


测试结果

Org-Mode 7.7

#+STARTUP: indent

* Very very very very very very very very very very very
very very very very very very very very long line
  - Very very very very very very very very very very very
  very very very very very very very very long line.

组织模式7.8.03

#+STARTUP: indent

* Very very very very very very very very very very very 
  very very very very very very very very long line
  - Very very very very very very very very very very very
    very very very very very very very very long line.