1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Emacs 保存時、休憩後(放置後の再スタート)にプチフリーズする

Posted at

たぶん原因はこれ。
昔も同じ原因にたどり着いた記憶が薄っすら思い出されます。
バージョンコントロールを無効にしましょう!
ひとまずやっつけで対応したコードをここに置いてゆきます!幸運を!

ありがとうありがとう

Emacs で勝手に vc-follow-link が実行されて辛い - あらびき日記 https://abicky.net/2014/06/07/175130/

Emacsでファイルのオープン・保存が遅い https://blog.rainyman.jp/nest/?p=1117

esup.el : Emacs起動が遅い原因を探れ!init-loader.el対応コードあり http://emacs.rubikitch.com/esup/

Mac アクティビティモニタで[歯車]→[プロセスのサンプルを収集]

init.el

init.el抜粋
;; You can also configure builtin package via leaf!
(leaf cus-start
  :doc "define customization properties of builtins"
  :tag "builtin" "internal"
  :preface
  (defun c/redraw-frame nil
    (interactive)
    (redraw-frame))
  :bind (("<M-escape> <escape>" . c/redraw-frame))
  :custom (;; (debug-on-error . t)        ;; エラー時に有効にする。エラー内容表示
       ;; (init-file-debug . t)
       (c-tab-always-indent . t)
       (case-fold-search . t)               ;; 検索時に大文字と小文字の区別をしない nil:する t:しない
・・・
       ;; Emacs で勝手に vc-follow-link が実行されて辛い - あらびき日記 https://abicky.net/2014/06/07/175130/
       ;; [vc-follow-link が勝手に実行されて辛い時]
       ;; vc-find-file-hook では Git などでバージョン管理されていないファイルを開こうとした時に、その
       ;; ファイル自体や親ディレクトリがシンボリックリンクだった場合にリンクを辿ろうとします。っで、
       ;; 既にリンク先のファイルを開いていたら無条件でリンクを辿る仕様になっていて、「既にリンク先の
       ;; ファイルを開いているかどうか」の判定がバグっています。
       ;; (get-file-buffer
       ;;  (abbreviate-file-name
       ;;   (file-chase-links buffer-file-name)))
       ;; 対策:
       ;;   * vc-follow-symlinks を nil にしてリンクを辿らないようにする
       ;;   * vc-handled-backends を nil にして vc を実質無効にする
       ;;   * vc-find-file-hook の around advice を作成するなり、同名の関数を定義するなりして (file-chase-links buffer-file-name) を buffer-file-truename に変更する
       ;;
       (vc-follow-symlinks . nil)           ;; シンボリックリンクを開くときの質問省略、リンク先を開く
       (vc-handled-backends . nil)          ;; vc を実質無効にする
       )
  :config
  (defalias 'yes-or-no-p 'y-or-n-p)
  ;;(keyboard-translate ?\C-h ?\C-?)
  (define-key query-replace-map [return] 'act)
  (define-key query-replace-map [?\C-m] 'act)
  ;; Emacsのバージョンコントロール(vc)を無効にする
  (setq vc-handled-backends())
  )

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?