kiwanami / emacs-window-manager

Customizable window manager for emacs
230 stars 28 forks source link

e2wm:def-plugin-svn-logsのbuffer-disable-undoの引数 #67

Closed aki2o closed 10 years ago

aki2o commented 10 years ago

以下の定義になっているのですが、

(defun e2wm:def-plugin-svn-logs (frame wm winfo)
    (e2wm:def-plugin-vcs-with-window
     'e2wm:def-plugin-svn-top-dir
     (lambda (dir topdir) 
       (let ((default-directory (file-name-as-directory topdir)))
         (svn-log e2wm:def-plugin-svn-log-arg))
       (let ((dbuf (get-buffer-create e2wm:def-plugin-svn-logs-buffer-name)))
         (with-current-buffer dbuf
           (setq buffer-read-only nil)
           (buffer-disable-undo buf)
           ...

(buffer-disable-undo buf)bufは、 e2wm:def-plugin-vcs-with-windowの中のletで宣言されているので動作しますが、 意図されたコードではないのではないかと思ったので、ご報告しておきます。

ちなみに、buffer-disable-undoは何のためにやっているんでしょうか? 時々、undoができなくなる時があって、e2wmを使っている時に起きているような気がしまして…。

kiwanami commented 10 years ago

あー、多分 dbuf ですね。 buffer-disable-undo は、編集用でないバッファはそれをやっておくとメモリ節約になるよという話をどこかで見たからなのですが、どこで見たのか忘れてしまいました。

aki2o commented 10 years ago

なるほど。ありがとうございます。 確かに検索してみたら、buffer-disable-undoって結構いろんな拡張で使ってますね。 ただ、undoできなくなっちゃうのが自分的に結構痛手で(typoしまくるからなんですが)。 e2wmが原因かは不明なので、今度起きた時はなるべく原因を調べてみようと思いまする。

aki2o commented 10 years ago

とりあえずOpenのままでもよいでしょうか?

kiwanami commented 10 years ago

修正してみましたので。 closeします。

undo障害の件、何か分かりましたら新規issueをおねがいします。 e2wmのせいだったらすみません。こちらでは起きたこと無いんですが、環境の違いか、非同期実行かなにかでしょうか。

aki2o commented 10 years ago

了解です