Twitter from emacs is a script which lets you send messages to your Twitter buddies directly from emacs.
Version:Twitter from emacs is a script which lets you send messages to your Twitter buddies directly from emacs.
Operating System: Linux
;; Copyright (C) 2007 by Tapsell-Ferrier Limited
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301 USA
(defvar twitter-usernamepassword-history nil)
(defun twitter (msg usernamepassword &optional imagename)
(list (read-file-name "imagename: " "~/twitter/")))
;; Set the image (maybe)
(let ((resize-mini-windows nil))
(shell-command-to-string (concat "curl -L -s "
(format "-u %s " usernamepassword)
(format "-F "user[profile_image]=@%s" " (expand-file-name imagename))
;; Send the entry
(let ((resize-mini-windows nil)
(shell-command-to-string (concat (format "curl -s -u %s " usernamepassword)
(format "-d "status=%s" " msg)
(let ((stats (json-read-from-string twitter-return-value)))
(message "%s" stats)
(display-message-or-buffer (format "Created at: %s" (cdr (assoc 'created_at stats)))))))
(defun twitter-ask ()
(read-from-minibuffer "status: ")
(read-from-minibuffer "username:password: "