Skip to content

Instantly share code, notes, and snippets.

diff -r 9d6d50d683d5 twittering-mode.el
--- a/twittering-mode.el Sun Aug 09 23:08:27 2009 +0900
+++ b/twittering-mode.el Fri Nov 13 11:24:51 2009 +0900
@@ -567,7 +567,7 @@
(when (and icon-string twittering-icon-mode)
(set-text-properties
1 2 `(display
- (image :type ,(twittering-image-type fullpath)
+ (image :type png
:file ,fullpath))
@cvmat
cvmat / .hgrc
Created November 13, 2009 04:43
[extensions]
hgext.bookmarks=
git=~/local/mercurial/lib/python/hggit
diff -r 8c43f3b117db -r 82c5b6f07685 twittering-mode.el
--- a/twittering-mode.el Fri Sep 17 01:07:19 2010 +0900
+++ b/twittering-mode.el Fri Sep 17 01:37:16 2010 +0900
@@ -117,6 +117,8 @@
"Alist of tinyfy services.")
(defvar twittering-mode-map (make-sparse-keymap))
+(defvar twittering-mode-menu-on-uri-map (make-sparse-keymap "Twittering Mode"))
+(defvar twittering-mode-on-uri-map (make-sparse-keymap))
diff -r 915094a3e32c twittering-mode.el
--- a/twittering-mode.el Sat Oct 09 20:17:55 2010 +0900
+++ b/twittering-mode.el Tue Oct 12 00:05:52 2010 +0900
@@ -2651,7 +2651,19 @@
'decode-char 'after 'twittering-add-fail-over-to-decode-char)
(ad-activate 'decode-char)
(unwind-protect
- (apply 'xml-parse-region args)
+ (condition-case error-info
+ (apply 'xml-parse-region args)
@cvmat
cvmat / gist:1074322
Created July 10, 2011 06:11
use original passphrase function instead of default one
diff -r 3139b3d6d41d twittering-mode.el
--- a/twittering-mode.el Sun Jun 26 23:37:23 2011 +0900
+++ b/twittering-mode.el Sun Jul 10 15:07:52 2011 +0900
@@ -2798,7 +2798,7 @@
((require 'epa nil t)
(let ((context (epg-make-context epa-protocol)))
(epg-context-set-passphrase-callback
- context #'epa-passphrase-callback-function)
+ context #'my-passphrase)
(epg-context-set-progress-callback
@cvmat
cvmat / and-let.el
Created February 2, 2012 04:10
and-let* for Emacs LISP
(defmacro and-let* (bindings &rest body)
(let ((head (car bindings))
(rest (cdr bindings)))
(cond
((null head)
`(progn
,@body))
((and (null rest) (null body))
(cond
((symbolp head)
(defun generate-index (n &optional m l)
(let ((base (mapcar 'char-to-string (number-sequence ?a ?z))))
(cond
((null m)
(generate-index n 0 l))
((<= n m)
l)
((null l)
(generate-index n (1+ m) base))
(t
@cvmat
cvmat / twittering-notify.el
Created May 27, 2012 11:15
Tweet notification with the text.
(defun my-notify-tweets ()
(mapcar (lambda (tweet)
(let ((text (cdr (assq 'text tweet)))
(user (cdr (assq 'user-name tweet))))
(start-process "twittering-notify" nil "notify-send"
"-i" "/usr/share/pixmaps/gnome-emacs.png"
(format "A new tweet from %s" user)
text)))
;; You should replace `twittering-rendered-new-tweets' with
;; `twittering-new-tweets-statuses' for 2.0.0.
@cvmat
cvmat / twittering-org.el
Created August 15, 2012 07:47
Twittering-mode and org-mode integration
(org-add-link-type "twitter" 'twittering-org:open)
(add-hook 'org-store-link-functions 'twittering-org:store-link)
(defun twittering-org:open (id-str)
(twittering-visit-timeline (concat ":single/" id-str)))
(defun twittering-org:store-link ()
"Store a link to a tweet."
(when (and (twittering-buffer-p) (twittering-get-id-at))
(let ((status (twittering-find-status (twittering-get-id-at))))
(apply 'org-store-link-props
@cvmat
cvmat / eval-after-autoload.el
Created August 28, 2012 16:00
macro for autoload and eval-after-load
;;
;; Example with after-body.
;; (eval-after-autoload-if-found
;; '(cycle-buffer cycle-buffer-backward) "cycle-buffer" nil t nil
;; (setq cycle-buffer-allow-visible t)
;; (setq cycle-buffer-show-length 12)
;; (setq cycle-buffer-show-format '(" <(%s)>" . " %s")))
;;
;; Example without after-body.
;; (eval-after-autoload-if-found 'smooth-scrolling "smooth-scrolling" nil t)