by shigemk2

当面は技術的なことしか書かない

Emacs Lisp

Emacs string-inflection

キャメル、スネーク、ケバブの書き換え github.com www.emacswiki.org

sort-words.elを読んでみる

replace-regexp-in-regionの使い方を調べていたら出てきた emacs.rubikitch.com ソースコードを読もうと言われたから読んでみた github.com 主要なコード region内のワードをソートするelisp functionだけれど、 regionの先端末端のポインタであるpoint-min …

helm 3.6.2

Release Version 3.6.2 · emacs-helm/helm · GitHub

helm 3.4.0

とな helm-org is now a Melpa dependency of helm. Release Version 3.4.0 · emacs-helm/helm · GitHub

Emacs Lispに\dに相当するものがない

Emacs Lispに\dに相当するものがないのだった GNU Emacs Lisp Reference Manual - Àµµ¬É½¸½¤Î¥·¥ó¥¿¥Ã¥¯¥¹ ので、\w とか [0-9] とかを使うしか無い

helm 3.1

New library helm-comint.el (provide prompt navigation) Keep improving trashing on Linux Many bug fixes as usual Release Version 3.1 · emacs-helm/helm · GitHub

shell-command

定義はdefadviceだった EmacsWiki: Execute External Command

emacs-request PR 85

結果的に取り込まれはしたものの、開発者からのコメントが来ていたのを完全に失念していたため正味10ヶ月くらい放置した挙げ句developブランチに半分マージされて事実上他人に開発を丸投げしてしまった形となった人生

dired-open

コマンド準拠くさい dired-open.el : diredから画像・メディアファイルやPDFなどを開く ソースコードはこちら。 GitHub - Fuco1/dired-hacks at c5e9dcdf2ee6fd5660e2bfbb8c635674053df7c9

markdown-insert-image

altの入力は必須 markdown-mode/markdown-mode.el at master · defunkt/markdown-mode · GitHub

markdown-insert-header-atx

# test # ## test ## #### test #### ##### test ##### C-c C-t 1 とかやると呼び出される関数 markdown-mode/markdown-mode.el at master · jrblevin/markdown-mode · GitHub markdown-insert-header-atx系関数を呼び出すと実行される関数 markdown-mode/ma…

markdown-mode pull request 369

Markdown Mode for Emacs Emacsでmarkdownのメモ書きをしているから自分はmarkdown-modeのヘビーユーザーだけど、テーブルをいちから作るコマンドがなかったのでmarkdown-modeにパッチを投げた。 パッチを投げて明くる日にはコメントが来ていたので、そのう…

concat read-string concatの組み合わせ

read-stringの結果をconcatしてさらにconcatすることは可能らしい。 (setq header (concat header (read-string (concat "header " (number-to-string header-counter) ": ")) "|")) Creating Strings - GNU Emacs Lisp Reference Manual

interactiveな関数をertでテストしたい

interactiveな関数をertでテストしたい Useful Techniques - Emacs Lisp Regression Testing ertでテストするときに、引数を指定する系の関数だったらサンプルよろしくこんなふうに書けばいいけど、interactiveな関数で引数を ミニバッファとかで指定する系…

Emacs Lisp 多重ループ

(setq desired-number-one 10) (setq desired-number-two 10) (setq count-one 1) (while (<= count-one desired-number) (setq count-two 1) (while (<= count-two desired-number) (message "message in-loop: %d" count-two) (setq count-two (1+ count-t…

Emacs Lisp 簡単なループ

(setq desired-number 10) (setq count 1) (while (<= count desired-number) (message "message: %d" count) (setq count (1+ count))) Programming in Emacs Lisp: Loops & Recursion message - Programming in Emacs Lisp

memo use package

The use-package macro allows you to isolate package configuration in your .emacs file in a way that is both performance-oriented and, well, tidy. I created it because I have over 80 packages that I use in Emacs, and things were getting dif…

dired-jump

Jump to Dired buffer corresponding to current buffer. If in a file, Dired the current directory and move to file’s line. If in Dired already, pop up a level and goto old directory’s line. In case the proper Dired file line cannot be found,…

open-junk-file 使い分け

github.com 人によってはあんまり好きじゃないらしいopen-junk-fileで、こっちはjunkの下に、こっちはmemoの下に、みたいなことをやりたいときのemacs lisp (require 'open-junk-file) (setq open-junk-file-format "~/junk/%Y/%m/%d-%H%M%S.") (global-set-…

read-string

read-string minibufferからの文字列読み取り。 read-string is a built-in function in ‘C source code’. (read-string PROMPT &optional INITIAL-INPUT HISTORY DEFAULT-VALUE INHERIT-INPUT-METHOD) Read a string from the minibuffer, prompting with s…

xml-escape-string

xml-escape-string xml-escape-string is a compiled Lisp function in ‘xml.el’. (xml-escape-string STRING) Convert STRING into a string containing valid XML character data. Replace occurrences of &<>‘“ in STRING with their default XML entity …

M-x hatena-blog-write

testします M-x hatena-blog-write てきとうに書く M-x hatena-blog-post タイトル save draft(y/n) titleが不安定

emacs-helm 2.8.1

mostly bugfix ってよ

google-translate pr 71

google-translate pr 71 Google翻訳をEmacsで出来るようにするパッケージだけど、 kill-ring(翻訳結果をkill-ringに入れる) echo-areas(翻訳結果をecho-areasに入れる) popup(翻訳結果をpopupに入れる) の他に、現在のバッファに出力できるようにした。 なお…

cask testing

cask install make start-server to start the fake package server, which is used throughout the tests. make test to run all tests. Use make unit to only run the unit tests, and make ecukes to only run the integration tests. Repeat 2. as long…

google-translate pr 72

翻訳結果がマイナーチェンジしたことが原因で、TravisCIがコケていたので、直した。 ローカルじゃ落ちないから、わかりづらい。 あと、.travis.ymlを見たけど、ブランチ指定はない

ert-runner

Emacs Lisp用のテストフレームワーク。 Caskがひつよう。

string-to-int

string-to-intは26.1からなくなったぽい (string-to-int "555") -- error (string-to-number "555") -- 555 ** Some obsolete functions, variables, and faces have been removed: *** make-variable-frame-local. Variables cannot be frame-local any mor…

sort alist by key

alistをキーでソートする関数は自前では用意されていないので、独自定義する必要がありまして。 (defalias 'asoc-copy 'copy-sequence "Return a shallow copy of ALIST.") (defun asoc-sort-keys (alist comparator) "Return a copy of ALIST sorted by key…

string conversion

149 a a 95 in に 40 string 文字列 34 is は 27 at に 26 function 関数 26 to に 25 the その 20 an 〜 20 or または 19 be 〜する 15 as として 15 this この 13 see 見る 12 convert 変換する 11 and そして 11 character キャラクター 11 of の 10 for …