分享个加速org文件打开速度的的配置

ai说是29版本加入的,实测打开以后效果不错

    ;; 开启元素缓存
    (setq org-element-use-cache t)
    ;; 缓存持久化
    (setq org-element-cache-persistent t)
3 个赞
;;; org-element.el --- Parser for Org Syntax         -*- lexical-binding: t; -*-

;;;###autoload
(defvar org-element-use-cache t
  "Non-nil when Org parser should cache its results.")

(defvar org-element-cache-persistent t
  "Non-nil when cache should persist between Emacs sessions.")

但是这两个变量默认应该都是t才对吧

1 个赞

去掉不需要的 org-modules 。 在windows下能明显提高org文件打开速度。

(use-package org :defer 0.2
  :custom
  (org-modules '(org-tempo)))
2 个赞

我的org文件有3.1MB,配置后确实有效果

从archive的文档里看到的一段:When a project represented by a (sub)tree is finished, you may want to move the tree out of the way and to stop it from contributing to the agenda. Archiving is important to keep your working files compact and global searches like the construction of agenda views fast.

我以前也是一个大org file.后来发现archive可以帮我整理一些不要的。打开速度自然也快了很多。

是archive到其他文件还是inline的archive标签呢

我是到其它文件。

:+1: doomemacs也是这么做的。