5

org-modeの元のファイルに自動保存を使用していますが、このモードでのみ機能し、他には何も機能しません。それは簡単ですか?

これが私のorg-modeオプションです

;; Org-mode options
(add-hook 'org-mode-hook
          'turn-on-visual-line-mode
          'auto-save-mode)
(add-hook 'org-mode-hook '(lambda()
                (setq auto-save-visited-file-name t)
                (setq auto-save-interval 20)))

注:完全な構成については、 https://github.com/map7/simple_emacsを参照してください。

4

1 に答える 1

8

これにより、org-modeでの自動保存ファイル名のカスタマイズが可能になります。

(add-hook 'org-mode-hook 'my-org-mode-autosave-settings)
(defun my-org-mode-autosave-settings ()
  ;; (auto-save-mode 1)   ; this is unnecessary as it is on by default
  (set (make-local-variable 'auto-save-visited-file-name) t)
  (setq auto-save-interval 20))

注:を追加すると'auto-save-mode、デフォルトでオンになっているため、自動保存'org-mode-hookオフになります(グローバルにオフにした場合を除く)。

于 2011-11-16T03:57:04.687 に答える