added logging for switching emacs buffers

master
NJ 5 years ago
parent d4cf614d5d
commit 6fd1ec3f37
  1. 20
      source_recorder/source-recorder.el

@ -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)

Loading…
Cancel
Save