Index: /lang/elisp/twittering-mode/branches/tsuyoshi/twittering-mode.el
===================================================================
--- /lang/elisp/twittering-mode/branches/tsuyoshi/twittering-mode.el (revision 39)
+++ /lang/elisp/twittering-mode/branches/tsuyoshi/twittering-mode.el (revision 40)
@@ -480,5 +480,5 @@
 	   (list-push (attr 'user-url) result))
 	  ((?j)                         ; %j - user.id
-	   (list-push (attr 'user-id) result))
+	   (list-push (format "%d" (attr 'user-id)) result))
 	  ((?p)                         ; %p - protected?
 	   (let ((protected (attr 'user-protected)))
@@ -499,18 +499,28 @@
 		 (now (current-time)))
 	     (let ((secs (+ (* (- (car now) (car created-at)) 65536)
-			    (- (cadr now) (cadr created-at)))))
-	       (list-push (cond ((< secs 5) "less than 5 seconds ago")
-				((< secs 10) "less than 10 seconds ago")
-				((< secs 20) "less than 20 seconds ago")
-				((< secs 30) "half a minute ago")
-				((< secs 60) "less than a minute ago")
-				((< secs 150) "1 minute ago")
-				((< secs 2400) (format "%d minutes ago"
-						       (/ (+ secs 30) 60)))
-				((< secs 5400) "about 1 hour ago")
-				((< secs 84600) (format "about %d hours ago"
-							(/ (+ secs 1800) 3600)))
-				(t (format-time-string "%I:%M %p %B %d, %Y" created-at)))
-			  result))))
+			    (- (cadr now) (cadr created-at))))
+		   time-string url)
+	       (setq time-string
+		(cond ((< secs 5) "less than 5 seconds ago")
+		      ((< secs 10) "less than 10 seconds ago")
+		      ((< secs 20) "less than 20 seconds ago")
+		      ((< secs 30) "half a minute ago")
+		      ((< secs 60) "less than a minute ago")
+		      ((< secs 150) "1 minute ago")
+		      ((< secs 2400) (format "%d minutes ago"
+					     (/ (+ secs 30) 60)))
+		      ((< secs 5400) "about 1 hour ago")
+		      ((< secs 84600) (format "about %d hours ago"
+					      (/ (+ secs 1800) 3600)))
+		      (t (format-time-string "%I:%M %p %B %d, %Y" created-at))))
+	       (setq url (twittering-get-status-url (attr 'user-screen-name) (attr 'id)))
+	       ;; make status url clickable
+	       (add-text-properties
+		0 (length time-string)
+		`(mouse-face highlight
+			     face twittering-uri-face
+			     uri ,url)
+		time-string)
+	       (list-push time-string result))))
 	  ((?t)                         ; %t - text
 	   (list-push                   ;(clickable-text)
@@ -524,5 +534,5 @@
 	   (list-push (attr 'source) result))
 	  ((?#)                         ; %# - id
-	   (list-push (attr 'id) result))
+	   (list-push (format "%d" (attr 'id)) result))
 	  (t
 	   (list-push (char-to-string c) result)))
@@ -1029,4 +1039,8 @@
       (buffer-substring start-pos end-pos))))
 
+(defun twittering-get-status-url (username id)
+  "Generate status URL."
+  (format "http://twitter.com/%s/statuses/%d" username id))
+
 ;;;###autoload
 (defun twit ()
