Permalink
Browse files

Redisplay tweets with idle timer.

* twittering-mode.el: Redisplay tweets with idle timer.
(twittering-timer-interval-for-redisplaying): change the meaning.
(twittering-start): `twittering-redisplay-status-on-buffer' is
called by `run-with-idle-timer'.
  • Loading branch information...
1 parent 7d6576b commit 0d8ea3eb5e8819c4ce2a2083f251f04e7daac2c0 @cvmat cvmat committed Nov 14, 2010
Showing with 23 additions and 5 deletions.
  1. +5 −0 ChangeLog
  2. +6 −0 NEWS
  3. +5 −0 NEWS.ja
  4. +7 −5 twittering-mode.el
View
@@ -29,6 +29,11 @@
receive `status' instead of `status-str'.
(twittering-get-and-render-timeline): likewise.
+ * twittering-mode.el: Redisplay tweets with idle timer.
+ (twittering-timer-interval-for-redisplaying): change the meaning.
+ (twittering-start): `twittering-redisplay-status-on-buffer' is
+ called by `run-with-idle-timer'.
+
2010-11-13 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: `twittering-send-http-request' correctly
View
6 NEWS
@@ -86,6 +86,12 @@
twittering-mode cannot use account information given on the second try.
When you are asked to input it again, cancel it by 'C-g' and do
'M-x twit'.
+* Redisplaying tweets with idle timer.
+ Twittering-mode waits for Emacs to become idle before it redisplays
+ tweets for time and icon image. Tweets are redisplayed each time Emacs
+ remains idle for a certain time specified by the variable
+ `twittering-timer-interval-for-redisplaying', which is 1 second by
+ default.
* ...
### Bug fixes
View
@@ -89,6 +89,11 @@
ント情報を与えるとurlライブラリの機能で再入力を求められますが、再入力
した情報で通信を続行することはできません。再入力を求められたときはC-g
でキャンセルし、改めてM-x twitを実行してください。
+* ユーザからの入力待ち状態になってから再描画
+ 時刻やアイコン画像の表示のためのtweetの再描画を、Emacsがユーザからの
+ 入力待ち状態(idle状態)に入り、その状態が一定時間継続してから行うように
+ しました。待ち時間は変数`twittering-timer-interval-for-redisplaying'で
+ 指定できます。デフォルトの待ち時間は1秒です。
* ...
### バグ修正
View
@@ -153,8 +153,10 @@ limited by the hour.")
"Timer object for timeline redisplay statuses will be stored here.
DO NOT SET VALUE MANUALLY.")
-(defvar twittering-timer-interval-for-redisplaying 17
- "The interval of auto redisplaying statuses.")
+(defvar twittering-timer-interval-for-redisplaying 1.0
+ "The interval of auto redisplaying statuses.
+Each time Emacs remains idle for the interval, twittering-mode updates parts
+requiring to be redrawn.")
(defvar twittering-username nil
"*An username of your Twitter account.")
@@ -5862,9 +5864,9 @@ means the number of statuses retrieved after the last visiting of the buffer.")
#'twittering-timer-action action)))
(unless twittering-timer-for-redisplaying
(setq twittering-timer-for-redisplaying
- (run-at-time "0 sec"
- twittering-timer-interval-for-redisplaying
- #'twittering-redisplay-status-on-buffer))))
+ (run-with-idle-timer twittering-timer-interval-for-redisplaying
+ t
+ #'twittering-redisplay-status-on-buffer))))
(defun twittering-stop ()
(interactive)

0 comments on commit 0d8ea3e

Please sign in to comment.