From: Michael O. <mw...@gn...> - 2006-03-23 13:42:13
|
Mark Plaksin <ha...@mc...> writes: > The documentation for erc-autoaway-use-emacs-idle says: > > Note that using Emacs idletime is currently broken for most > versions, since process activity (as happens all the time on IRC) > makes Emacs non-idle. Emacs idle-time and user idle-time are just > not the same. > > type-break mode knows when you've been typing and when you haven't. > What about making ERC's use-emacs-idle option work like type-break > mode? Maybe some part of type-break itself can be used. type-break > uses run-at-time plus some other functions to figure out how long > you've been typing (or idle). This seems like a good idea. I figure we could remove the idle timer functionality (since it appears to be broken) and make it an option to use the time of the last keystroke as a basis for autoaway detection. To get the time of the last keystroke, we'd just have to add the following function to `post-command-hook'. (defun erc-autoaway-get-last-keystroke (setq erc-autoaway-last-keystroke (current-time))) =2D-=20 Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/ Interests: Emacs Lisp, text markup, IRC, EMMS, anime, manga, Debian /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG |_] | \| |_| Jabber: mwolson_at_hcoop.net |