 are following, if you have images turned on."
   (interactive
     (list (let ((friends (mapcar (lambda (s) (substring s 1)) twit-at-friends-cache))
-				(cur-author (twit-grab-author-of-tweet)))
+				(cur-author (twit-get-text-property 'twit-user)))
 			(completing-read (if cur-author
 								 (concat "To (" cur-author "): ")
 								 "To: ")

	  (error twit-too-long-msg)
      (twit-direct-message user msg)))

;;* post interactive
;;;###autoload
(defun twit-post (prefix)
  "Send a post to twitter.com.

                                      (concat "@" reply-to " ")))))
    (if (> (length post) 140)
		(error twit-too-long-msg)
		(twit-post-status twit-update-url post))))

;;* post interactive tweet
;;;###autoload
(defun twit-post-region (start end)
  "Send text in the region as a post to twitter.com.
Uses `twit-post-status' to do the dirty work and to obtain
needed user and password information.  Posts must be <= 140 chars
long."
  (interactive "r")
  (let ((post (buffer-substring start end)))
    (if (> (length post) 140)
	(error twit-too-long-msg)
    (twit-post-status twit-update-url post))))

;;* post interactive
;;;###autoload
(defun twit-post-buffer ()
  "Post the entire contents of the current buffer to twitter.com.
Uses `twit-post-status' to do the dirty work and to obtain
needed user and password information.  Posts must be <= 140 chars
long."
  (interactive)
  (let ((post (buffer-substring (point-min) (point-max))))
    (if (> (length post) 140)
	    (error twit-too-long-msg)
	    (twit-post-status twit-update-url post))))

;;* friend post add
(defun twit-add-friend (user)
  "User name of person you want to follow."
  (interactive (list (let ((author (twit-get-text-property 'twit-user)))
					   (completing-read (format "Add Friend%s: " (if author (concat "(" author ")") ""))
										nil
										nil
										nil
										nil
										nil
										author))))
  (twit-post-function (format twit-add-friend-url user)
					  (concat "follow=true&screen_name=" (url-hexify-string user))
					  twit-add-friend-success-msg
					  twit-add-friend-fail-msg))

;;* friend post remove
(defun twit-remove-friend (user)
  "User name of person you want to follow."
  (interactive (list (let ((author (twit-get-text-property 'twit-user)))
					   (completing-read  (format "Remove Friend%s: " (if author
																		 (concat " (" author ")")
																		 ""))
										 (twit-get-friends t)
										 nil
										 t
										 nil
										 nil
										 author))))
  (twit-post-function (format twit-remove-friend-url user)
					  (concat "screen_name=" (url-hexify-string user))
					  twit-remove-friend-success-msg
					  twit-remove-friend-fail-msg))

;;* favorite add post
(defun twit-add-favorite (post)
  "Add a post as a favorite."
  (interactive (list (read-from-minibuffer (format "Tweet to Favorite (%s): " (twit-get-text-property 'twit-id))
										   nil
										   nil
										   nil
										   nil
										   (twit-get-text-property 'twit-id))))
  (twit-post-function (format twit-add-favorite-url (if (not (string-equal "" post))
														post
														(twit-get-text-property 'twit-id)))
					  ""
					  twit-add-favorite-success-msg
					  twit-add-favorite-fail-msg))

;;* favorite remove post
(defun twit-remove-favorite (post)
  "Add a post as a favorite."
  (interactive (list (read-from-minibuffer (format "Remove Tweet From Favorites (%s): " (twit-get-text-property 'twit-id))
										   nil
										   nil
										   nil
										   nil
										   (twit-get-text-property 'twit-id))))
  (twit-post-function (format twit-remove-favorite-url (if (not (string-equal "" post))
														   post
														   (twit-get-text-property 'twit-id)))
					  ""
					  twit-remove-favorite-success-msg
					  twit-remove-favorite-fail-msg))

;;* show followers refactorme interactive memoryleak
;; minor modes might be a cause of the memoryleak, see about removing them
;; this is too delicate, depending on the order of the xml elements, and not
;; the actual xml elements. 
;;;###autoload
(defun twit-list-followers ()
  "Display a list of all your twitter.com followers' names."
  (interactive)
  (pop-to-buffer
   (with-twitter-buffer "*Twit-followers*"
						(loop for name in 
							  (loop for name in
									(loop for user in 
										  (xml-get-children
										   (cadr (twit-parse-xml twit-followers-file "GET")) 'user)
										  collect (sixth user))
									collect (third name))
							  do (insert (concat name "\n"))))))

;;* show friends interactive
;;;###autoload
(defun twit-show-friends ()
   "Display a list of all your friends."
   (interactive)
   (pop-to-buffer
	(with-twitter-buffer "*Twit-friends*"
						 (let ((friends (twit-get-friends)))
						   (twit-write-title (format "Friends (%s):\n" (length friends)))
						   (loop for f in friends do
								 (insert (propertize (concat f "\n") 'twit-user f)))))))

;;* twit follow timer interactive
;;;###autoload
