文字列の置換 "hogehoge," => "hogehoge"

(let ((str "hogehoge,") (regexp ",$") (newstr "")) (cond ((eq emacs-major-version 21) (replace-regexp-in-string regexp newstr str)) ((eq emacs-major-version 20) (progn (string-match regexp str) (replace-match newstr nil nil str))) ((eq emacs-major-version 19) (progn (require 'dired) (dired-replace-in-string regexp newstr str)))))

2003-04-04 (金) · masutaka

M-x list-load-path-shadows

ファイル名がかぶっていて、loadされないファイルを表示する。

2003-03-31 (月) · masutaka

ドメイン情報検索

% whois -h whois.crsnic.net xxx.com # <= etc .com .net % whois -h whois.nic.ad.jp xxx.jp # <= .jp

2003-03-30 (日) · masutaka

Basic認証のユーザ名とパスワード

http://username:[email protected]/ でBasic認証のユーザ名とパスワードを打たなくても良くなる。 w3mだと ~/.w3m/passwdに以下のように書く。 machine ホスト名 port ポート番号 path ローカルパート realm realmの文字列 login ユーザ名 passwd パスワード

2003-03-28 (金) · masutaka

C プログラマが知る C++ の性質

http://www.hi-ho.ne.jp/hawk/cpp.html

2003-03-27 (木) · masutaka

wc の使い方

% wc -l ~/.emacs # <= 行数をカウント 1654 /home/masutaka/.emacs % wc -c ~/.emacs # <= バイト数をカウント(≒ "du -sk [file]") 61938 /home/masutaka/.emacs ※ 他にもカラム数や単語数、文字数などが分かる。

2003-03-26 (水) · masutaka

autoconf -- configure を作成するための Bourne シェルスクリプト群

autoconf は configure.in から configure を autoheader は configure.in から config.h.in を autoscan はソースファイルから configure.in(configure.scan) を作ります。

2003-03-17 (月) · masutaka

コンマ・ピリオドか句読点か?

http://www.jaist.ac.jp/~tojo/orthography.html

2003-03-15 (土) · masutaka

関数の実体を表示する。

(symbol-function 'MEW-TO) => (lambda nil (aref mew-vec 5))

2003-03-12 (水) · masutaka

zlib の make

zlib.so* を生成するには、configure に `–shared’ オプションを付ければよい。

2003-03-10 (月) · masutaka