【问题标题】:emacs orgmode do not insert line between headers?emacs orgmode不在标题之间插入行?
【发布时间】:2015-04-05 18:01:19
【问题描述】:

在 emacs org-mode 中,当我创建一个新的子标题(org-insert-subheading)时,有时它会添加一个空行,有时它不基于上面文本中的某些模式。

我可以强制 emacs 从不插入换行符吗?

即,

* Heading 1
** Heading 2  #no line breaks.

【问题讨论】:

    标签: emacs org-mode line-breaks heading


    【解决方案1】:

    这由变量org-blank-before-new-entry控制:

    `org-insert-heading' 应该在新标题/项目之前留一个空行吗?
    值为 alist,`heading'`plain-list-item' 为 CAR,布尔标志为 CDR。 cdr 也可能是符号`auto',在这种情况下,Org 将查看周围的标题/项目并尝试做出是否插入空行的明智决定。

    在我的 emacs 版本中,这两个项目的默认值都是 auto。要从不插入空行,请将两者都设置为 nil:

    (setf org-blank-before-new-entry '((heading . nil) (plain-list-item . nil)))
    

    【讨论】:

      【解决方案2】:

      我认为这是由变量org-blank-before-new-entry 控制的。根据组织文档:

      org-insert-heading 应该在新标题/项目之前留一个空行吗? 值为 alist,headingplain-list-item 为 CAR, 和一个布尔标志作为 CDR。 cdr 也可以是符号“auto”,在 在这种情况下,组织将查看周围的标题/项目并尝试 明智地决定是否插入空行。

      对于普通列表,如果设置了org-list-empty-line-terminates-plain-lists, 此处的设置被忽略,不插入空行以避免中断 列表结构。

      默认值为'((heading . auto) (plain-list-item . auto)),因此它通常会在标题之前插入换行符(heading 中的auto 部分)。自定义变量时可以指定Never,不会插入换行符。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-02-26
        • 1970-01-01
        • 1970-01-01
        • 2012-07-18
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多