パッケージkill-ring
を使用して保存しsavehist
ます。savehist
テキストプロパティをそのままにしてキルリングを保存します。
残念ながら、これは問題です。
私はかなり大きなemacs設定を持っており、多くの強調表示を使用しています。これが私の最初の要素ですkill-ring
#("avehist-printable value)\n (prin1 `(setq ,symbol ',value) (current-buffer))\n (insert ?\\n))))))\n ;; If autosaving, avoid writing if nothing has changed since the\n ;; last write." 0 23 (fontified t wrap-prefix #(" " 0 5 (fontified t))) 23 24 (fontified t face (rainbow-delimiters-depth-8-face) wrap-prefix #(" " 0 5 (fontified t))) 24 25 (fontified t wrap-prefix #(" " 0 5 (fontified t))) 25 32 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 32 33 (fontified t face (rainbow-delimiters-depth-8-face) wrap-prefix #(" " 0 7 (fontified t))) 33 40 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 40 41 (fontified t face (rainbow-delimiters-depth-9-face) wrap-prefix #(" " 0 7 (fontified t))) 41 61 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 61 62 (fontified t face (rainbow-delimiters-depth-9-face) wrap-prefix #(" " 0 7 (fontified t))) 62 63 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 63 64 (fontified t face (rainbow-delimiters-depth-9-face) wrap-prefix #(" " 0 7 (fontified t))) 64 78 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 78 79 (fontified t face (rainbow-delimiters-depth-9-face) wrap-prefix #(" " 0 7 (fontified t))) 79 80 (fontified t face (rainbow-delimiters-depth-8-face) wrap-prefix #(" " 0 7 (fontified t))) 80 81 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 81 88 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 88 89 (fontified t face (rainbow-delimiters-depth-8-face) wrap-prefix #(" " 0 7 (fontified t))) 89 99 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 99 100 (fontified t face (rainbow-delimiters-depth-8-face) wrap-prefix #(" " 0 7 (fontified t))) 100 101 (fontified t face (rainbow-delimiters-depth-7-face) wrap-prefix #(" " 0 7 (fontified t))) 101 102 (fontified t face (rainbow-delimiters-depth-6-face) wrap-prefix #(" " 0 7 (fontified t))) 102 103 (fontified t face (rainbow-delimiters-depth-5-face) wrap-prefix #(" " 0 7 (fontified t))) 103 104 (fontified t face (rainbow-delimiters-depth-4-face) wrap-prefix #(" " 0 7 (fontified t))) 104 105 (fontified t face (rainbow-delimiters-depth-3-face) wrap-prefix #(" " 0 7 (fontified t))) 105 106 (fontified t wrap-prefix #(" " 0 7 (fontified t))) 106 110 (fontified t wrap-prefix #(" ;; " 0 4 (fontified t) 4 7 (fontified t face font-lock-comment-delimiter-face))) 110 113 (fontified t face font-lock-comment-delimiter-face wrap-prefix #(" ;; " 0 4 (fontified t) 4 7 (fontified t face font-lock-comment-delimiter-face))) 113 175 (fontified t face font-lock-comment-face wrap-prefix #(" ;; " 0 4 (fontified t) 4 7 (fontified t face font-lock-comment-delimiter-face))) 175 179 (fontified t wrap-prefix #(" ;; " 0 4 (fontified t) 4 7 (fontified t face font-lock-comment-delimiter-face))) 179 182 (fontified t face font-lock-comment-delimiter-face wrap-prefix #(" ;; " 0 4 (fontified t) 4 7 (fontified t face font-lock-comment-delimiter-face))) 182 193 (fontified t face font-lock-comment-face wrap-prefix #(" ;; " 0 4 (fontified t) 4 7 (fontified t face font-lock-comment-delimiter-face))))
本質的に、テキストのプロパティは~/.emacs.d/savehist
、ほぼ100倍に膨らみます。私は、約30MBのキルリングを調べています。これはいろいろな理由で悪いです。特に、emacsが非常に遅くなるからです。
現在のセッションのプロパティを削除せずに、保存savehist
するkill-ring
前にテキストプロパティを削除するようにするにはどうすればよいですか?
savehist-save-hook
ますか?