6
FirefoxブラウザのCStのように、強制終了したバッファを再度開く方法は?
Firefoxで閉じたタブを元に戻すCStのように、誤ってバッファを強制的に削除して開き直したい場合がありますが、Emacsには組み込みコマンドがないdefun undo-kill-buffer(http://www.emacswiki.org/RecentFilesにあります)。 (defun undo-kill-buffer (arg) "Re-open the last buffer killed. With ARG, re-open the nth buffer." (interactive "p") (let ((recently-killed-list (copy-sequence recentf-list)) (buffer-files-list (delq nil (mapcar (lambda (buf) (when (buffer-file-name buf) (expand-file-name (buffer-file-name buf)))) (buffer-list))))) (mapc (lambda (buf-file) (setq recently-killed-list (delq buf-file recently-killed-list))) buffer-files-list) (find-file (if arg (nth arg recently-killed-list) …