Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

0 notes on commit 0d8ea3e

Please sign in to comment.
Something went wrong with that request. Please try again.