gistから取得できないanything-gist.elをforkして修正
物は
http://sheephead.homelinux.org/2010/11/24/6396/
です。
素晴らしいものですが自分の環境ではgistからうまくデータが取得できなかった。
内部で使われているwgetの取得先URLを修正して使用することにした。
gistのURLルーティングの仕組みなどは調べていないので修正が適切ではない可能性が高い。
成果物
https://gist.github.com/1134541
に置きました。インストールは
(auto-install-from-url "https://gist.github.com/raw/1134541")
です。
再現/変更を要した環境は
GNU Emacs 23.1.90.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29)
of 2010-06-16 on ??????????????"
GNU Wget 1.12 built on darwin10.8.0.
関係ないと思いますがEmacsはns-toggle-fullscreenが効くもの、wgetはbrewだったと記憶しています。
diff
diff -c /Users/???????/emacs.d/elisp/anything-gist.el /Users/????????/emacs.d/elisp/anything-gist_org.el_ *** /Users/??????????/emacs.d/elisp/anything-gist.el Wed Aug 10 02:33:17 2011 --- /Users/??????????/emacs.d/elisp/anything-gist_org.el_ Wed Aug 10 01:48:29 2011 *************** *** 43,50 **** ;; 2010/11/24 fixed bug ;; anyhing candidate bug fix ;; clone and push asynchronously - ;; 2011/08/08 fixed bug - ;; change url ;;; Command: ;; `anything-for-gist' --- 43,48 ---- *************** *** 158,166 **** (delete-region (point-min) (point-max)) (insert (shell-command-to-string (concat ! "wget -q http://gist.github.com/raw/" id ! " -O -"))) (goto-char (point-min)) (switch-to-buffer gist-buffer))) (progn --- 156,164 ---- (delete-region (point-min) (point-max)) (insert (shell-command-to-string (concat ! "wget -q http://gist.github.com/" id ! ".txt -O -"))) (goto-char (point-min)) (switch-to-buffer gist-buffer))) (progn *************** *** 170,178 **** (with-current-buffer gist-buffer (insert (shell-command-to-string (concat ! "wget -q http://gist.github.com/raw/" id ! " -O -"))) (switch-to-buffer gist-buffer)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; --- 168,176 ---- (with-current-buffer gist-buffer (insert (shell-command-to-string (concat ! "wget -q http://gist.github.com/" id ! ".txt -O -"))) (switch-to-buffer gist-buffer)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; *************** *** 232,240 **** ("add embed to kill ring" . (lambda(obj-name) (kill-new (concat ! "<script src=\"http://gist.github.com/raw/" (nth 2 (split-string obj-name)) ! "\"></script>")))) ("add URL to kill ring" . (lambda(obj-name) (kill-new (concat --- 230,238 ---- ("add embed to kill ring" . (lambda(obj-name) (kill-new (concat ! "<script src=\"http://gist.github.com/" (nth 2 (split-string obj-name)) ! ".js\"></script>")))) ("add URL to kill ring" . (lambda(obj-name) (kill-new (concat