added logging for switching emacs buffers

This commit is contained in:
NJ 2017-06-11 18:02:28 +03:00
parent d4cf614d5d
commit 6fd1ec3f37
1 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,6 @@
(defun buffer-changes-recorder (change-beg change-end prev-len)
(append-to-file
;(message
;(append-to-file
(message
(format "%s;%s;%s\n"
(buffer-file-name)
(format-time-string "%s")
@ -13,8 +13,22 @@
(buffer-substring change-beg change-end))
)
)
nil "~/test.log"
; nil "~/test.log"
)
)
(add-hook 'after-change-functions 'buffer-changes-recorder)
(defun buffer-switchs-recorder ()
;(append-to-file
(message
(format "%s;%s;%s\n"
(buffer-file-name)
(format-time-string "%s")
(format "S;%s;%s" (selected-window) (buffer-name))
)
; nil "~/test.log"
)
)
(add-hook 'buffer-list-update-hook 'buffer-switchs-recorder)