Skip to content

Instantly share code, notes, and snippets.

@cvmat
Created November 8, 2012 14:38
Show Gist options
  • Save cvmat/4039157 to your computer and use it in GitHub Desktop.
Save cvmat/4039157 to your computer and use it in GitHub Desktop.
;;;; Commands for displaying information related to a status
(defun twittering-display-user-information (&optional pos)
(interactive)
(let* ((pos (or pos (point)))
(status (twittering-find-status (twittering-get-id-at pos)))
(name (or (cdr (assq 'user-name status)) ""))
(screen-name (or (cdr (assq 'user-screen-name status)) ""))
(location (or (cdr (assq 'user-location status)) ""))
(url (or (cdr (assq 'user-url status)) ""))
(description (or (cdr (assq 'user-description status)) "")))
(message "%s"
(mapconcat
'identity
`(,(format "%s(@%s)" name screen-name)
,@(unless (string= "" location) (list (concat " " location)))
,@(unless (string= "" url)
(list (concat "\nURL: " url)))
,@(unless (string= "" description)
(list (concat "\nDESC: " description))))
""))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment