M-x write-or-die

M-x no-more-die,



(let ( (write-or-die-time ())

(write-or-die-init ()) )



(defun write-or-die ()

(interactive)

(setf write-or-die-init (run-with-idle-timer 3 t 'w-or-die)))



(defun w-or-die ()

(interactive)

(kill-region (point-max) (- (point-max) 10))

(setf write-or-die-time (run-with-idle-timer

(time-add (current-idle-time)

(seconds-to-time 3))

()

'w-or-die)))



(defun no-more-die ()

(interactive)

(cancel-timer write-or-die-init)

(cancel-timer write-or-die-time))



)



For those of you that write, or wish you wrote, or otherwise procrastinate while performing text-based activities, try out write-or-die . It is a nice cattle prod; if you don't write for several seconds, it will punish you. I find that the Kamikaze mode is most effective --- the punishment is that it will delete words, bit by bit, until you begin to write again.However, I use emacs; and switching from my carefully-tuned text-editor extraordinaire to a javascript-based text-box is a bit of a disappointment. That's why I threw together this emacs version of write-or-die.Just paste the following into your init.el, and when the time comes,. When you have accomplished your goal,and you're set.Possible improvements --- flashing colors, like the web-version has, to warn you of the time limit; word-by-word deletion, rather than 10 characters at a time; variable time limit; etc. But those can wait. Right now I need to write another 10,000 words.