Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created December 19, 2008 15:53
Show Gist options
  • Save yaotti/38026 to your computer and use it in GitHub Desktop.
Save yaotti/38026 to your computer and use it in GitHub Desktop.
;;; Gisty.el
;;; A gisty interface for Emacs
(defun gisty-post ()
(interactive)
(let ((filename (buffer-file-name))
(shell-file-name "/bin/zsh"))
(start-process-shell-command
"gisty" "*gisty*"
"gisty" (concat "post "
filename))))
(defun gisty-sync ()
(interactive)
(start-process-shell-command
"gisty" "*gisty*"
"gisty" "sync"))
(defun gisty-cd ()
(interactive)
(let* ((result (shell-command-to-string "printenv GISTY_DIR"))
(dir (substring result 0 (- (length result) 1)))) ;改行文字の除去
(find-file dir)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment