Skip to content

Instantly share code, notes, and snippets.

View masutaka's full-sized avatar

Takashi Masuda masutaka

View GitHub Profile
@masutaka
masutaka / .zaliases
Created September 27, 2011 16:14 — forked from yoshinari-nomura/.zaliases
Small aliases to get along with Emacs buffer.
## Invoke the ``dired'' of current working directory in Emacs buffer.
function dired () {
emacsclient -e "(dired \"${1:a}\")"
}
## Chdir to the ``default-directory'' of currently opened in Emacs buffer.
function cde () {
EMACS_CWD=`emacsclient -e "
(expand-file-name
(with-current-buffer
@masutaka
masutaka / init.el
Created October 7, 2011 15:07
A dictionary tool which can switch commandline-dictionary-app and sdic.
;; http://www.namazu.org/~tsuchiya/sdic/index.html
(require 'sdic)
;; hg clone http://hg.pqrs.org/commandline-dictionary-app
(defvar dict-bin "/Users/masutaka/repository/commandline-dictionary-app/src/dict"
"a path of commandline-dictionary-app")
(defun dictionary-app (word)
"Display the meaning of word using Dictionary.app."
(interactive (list (sdic-read-from-minibuffer)))
@masutaka
masutaka / migemo.rb
Last active September 27, 2015 13:07
Formula of migemo
require 'formula'
class Migemo < Formula
url 'http://0xcc.net/migemo/migemo-0.40.tar.gz'
homepage 'http://0xcc.net/migemo/'
md5 '7021c45096b6816fccf16f8389324a91'
depends_on 'emacs'
depends_on 'ruby-bsearch'
depends_on 'ruby-romkan'
@masutaka
masutaka / .zshrc
Created October 11, 2011 16:20
You can cd using GNU Screen window number.(ex. cdd [GNU Screen window number])
source /path/to/cdd.zsh
function chpwd() {
_reg_pwd_screennum
}
(defvar twinstall-curl-program (executable-find "curl"))
(defvar twinstall-last-url "")
(defvar twinstall-hash-tags "#emacsjp #twinstall")
(defun twinstall-tweet-url (url)
(let* ((name (file-name-nondirectory url))
(text (cond
((string= (concat auto-install-emacswiki-base-url name) url)
(format "EmacsWikiから%sをインストールしました。 %s %s"
name twinstall-hash-tags url))
@masutaka
masutaka / init.el
Last active April 29, 2021 22:13
a timer setting for recentf-mode without notifications to minibuffer.
(require 'cl)
(defvar my-recentf-list-prev nil)
(defadvice recentf-save-list
(around no-message activate)
"If `recentf-list' and previous recentf-list are equal,
do nothing. And suppress the output from `message' and
`write-file' to minibuffer."
(unless (equal recentf-list my-recentf-list-prev)
@masutaka
masutaka / gist:1340000
Created November 4, 2011 17:53
This is my note for buffer-local function
(defun foo ()
(interactive)
(message "this is a default message."))
(defadvice foo (around my-foo-wrapper)
(if (not (and (boundp 'use-my-foo) 'use-my-foo))
ad-do-it
(message "this is a special message.")))
(ad-activate 'foo)
@masutaka
masutaka / init.el
Created December 16, 2011 17:45
dired-todays-face
(defface dired-todays-face '((t (:foreground "forest green"))) nil)
(defvar dired-todays-face 'dired-todays-face)
(defconst month-name-alist
'(("1" . "Jan") ("2" . "Feb") ("3" . "Mar") ("4" . "Apr")
("5" . "May") ("6" . "Jun") ("7" . "Jul") ("8" . "Aug")
("9" . "Sep") ("10" . "Oct") ("11" . "Nov") ("12" . "Dec")))
(defun dired-today-search (arg)
"Fontlock search function for dired."
#!/bin/sh
if [ -n "`git diff`" ]; then
git commit -a -m "temporary commit"
fi
### End of file
@masutaka
masutaka / shibuya-el-position-paper.md
Created September 6, 2012 06:23 — forked from ainame/shibuya-el-position-paper.md
masutaka@shibuya.elのポジションペーパーです。

Shibuya.el#1 ポジションペーパー

Personal

  • 名前

    • 増田 貴士 (Masuda Takashi)
  • Twitter

  • @masutaka