マスタカネット > マスタカの ChangeLog メモ > Emacs

マスタカの ChangeLog メモ / Emacs

カテゴリ「Emacs」最新ページ / 前ページ 1 2 3 4 5 6 7 8 次ページ / page 4 (8)

2003-04-04 (金)

文字列の置換 "hogehoge," => "hogehoge" [Emacs]

2003-04-04-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(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-05-26 (月)

シングルクォートで括れば、なんでも実行できるな。 [Emacs]

2003-05-26-2.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

% emacs -q --no-site-file -batch -eval '(message (getenv "HOME"))'


2003-07-07 (月)

10進数=>16進数は前者を使った方が安定しているみたい。 [Emacs]

2003-07-07-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(string-to-number "20" 16)  #=> 32
(read (concat "?\\x" "20")) #=> 32



2003-08-27 (水)

正規表現を interactive にテストする [Emacs]

2003-08-27-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

M-x re-builder


2003-09-07 (日)

list を car しながら loop 処理させる。 [Emacs]

2003-09-07-2.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(dolist (target '(a b c))
  (if (eql 'b target) (return target)))



2003-09-11 (木)

Emacs Lisp での繰り返しの書き方 [Emacs]

2003-09-11-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

繰り返しを書くときは、まず mapcar, find-if などの高階関数で書けるかどう
かを検討する。書けなければ dolist, dotimes などを使う。それでも書けなけ
れば、while, loop, 再帰を使う。

(URL: お気楽ごくらくプログラミング入門 -- Lisper への道 --)
(URL: (Scheme) (Lisp))


2003-10-02 (木)

Emacs 年表 [Emacs]

2003-10-02-2.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(URL: A History of Emacs)
(URL: Emacs Timeline)
(URL: Mule/Emacsの歴史) 右上の Mule/Emacs の歴史 -> (左上の)Historical drawing


2003-10-02 (木)

elisp で書かれた Window Manager [UNIX][Emacs]

2003-10-02-3.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(URL: X Emacs Window Manager)


2003-10-09 (木)

run-at-time() [Emacs]

2003-10-09-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

;;foo() を 2003/10/9 3:12:30 に実行する。
(run-at-time (encode-time 30 12 3 9 10 2003) nil 'foo)



2003-11-17 (月)

ある *.el を require しているパッケージを表示。 [Emacs]

2003-11-17-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(require 'loadhist)
(file-dependents (feature-file 'cl))



2004-02-02 (月)

16進数で色一覧を表示 [Emacs]

2004-02-02-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(defun list-hexadecimal-colors-display ()
  "16進数で色一覧を表示"
  (interactive)
  (let ((r 0)
        (g 0)
        (b 0)
        (delta 32)
        (color-list ()))
    (while (< r 256)
      (setq g 0)
      (while (< g 256)
        (setq b 0)
        (while (< b 256)
          (setq color-list (append color-list (list (format "#%.2x%.2x%.2x" r g b))))
          (setq b (+ b delta)))
        (setq g (+ g delta)))
      (setq r (+ r delta)))
    (list-colors-display color-list)))



2004-02-03 (火)

tamago を CVS の先端から持ってくる。 [Emacs]

2004-02-03-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

<http://emacs-21.ki.nu/application/tamago.html>
% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/tamago login
% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/tamago co tamago
emacs-20.7 では its/aynu.el の 137 行目あたりでコンパイルエラーになってしまう。
コンパイルエラーとは関係ないけど、以下のスクリプトで調べてみたら、
すでにインストールされている egg と違う部分が結構あった。
% cd ~/share/elisp
% for file in `find egg/. -name "*.el"`; do; \
> echo "[`basename $file`]"; \
> diff -c /usr/gnu/share/emacs/site-lisp/$file $file 2>&1 ; \
> done


2004-02-03 (火)

emacs を CVS の先端から持ってくる。 [Emacs][インストールメモ]

2004-02-03-2.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

<http://homepage.mac.com/nand/macosx/emacs_cvs.html>
% export CVS_RSH=ssh
% cvs -z3 -d :ext:anoncvs@savannah.gnu.org:/cvsroot/emacs checkout -P emacs
# "rpm -e texinfo" して texinfo-4.6 を普通にインストール。
% mkdir emacs-work; cd emacs-work
% ../emacs/configure --without-xim
% make bootstrap # See INSTALL.CVS


2004-02-16 (月)

wanderlust 常に all scan ??? [Emacs]

2004-02-16-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

(setq wl-default-sync-range "all")



2004-02-16 (月)

FLIM & SEMI Install [Emacs][インストールメモ]

2004-02-16-2.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

% tar xvzf flim-1.14.6.tar.gz; cd flim-1.14.6
% make
% emacs -batch -q -no-site-file -l texinfmt -f batch-texinfo-format *.texi
# (cd /usr/local/share/emacs/site-lisp && rm flim)
# make install
# cp *.info /usr/local/info
# dir を編集する。"install-info <info> <dir>" も使えるかも知れない。
SEMI もやりかたは同じなので省略する。


2004-05-03 (月)

コンパイルしたディレクトリの確認 [Emacs]

2004-05-03-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

source-directory =>
"/home/masutaka/share/src/emacs/gnu-emacs/emacs-21.3/"


2004-05-17 (月)

色付け用の外部ツール [Emacs]

2004-05-17-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

[meadow-users-jp 5429]
http://www.jpl.org/ftp/pub/elisp/develock.el.gz
C や elisp のソースで余分な空白などを強調表示させてくれる。
ただしかなり厳しい色づけなので、実用は難しいかも。


2004-05-27 (木)

delete() の挙動 [Emacs]

2004-05-27-2.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

リストの一番始めの要素がマッチした場合は、元のリストを破壊しない。
list
=>("CVS/" ".o" "~" ".bin")
(delete "CVS/" list)
=>(".o" "~" ".bin")
list
=>("CVS/" ".o" "~" ".bin")
(delete "~" list)
=>("CVS/" ".o" ".bin")
list
=>("CVS/" ".o" ".bin")


2004-07-14 (水)

migemo の諸問題 [Emacs]

2004-07-14-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

- Emacs-21.3 on Solaris9
  buffer に ataS がある状態で、C-s ataS まで打つと Emacs が必ず落ちる。
  (setq migemo-options '("-S" "migemo" "-t" "emacs")) したら落ちなかった。

- Emacs-21.3.50 on RedHat 7.2
  [Regular expression too big] と表示される。
  => Emacs のバグだったようだ。CVS 先端では直っている。
  <http://www.m17n.org/mule-ja-archive/2003-10/msg00000.html>


2004-12-22 (水)

文字列の置換 [Emacs][sed]

2004-12-22-1.html をつぶやくこのエントリを含むはてなブックマークlivedoor clip

"aaaa1234bbbb" => "aaaabbbb"

# sh
% echo "aaaa1234bbbb" | sed -e 's/^\([a-z]*\)\([0-9]*\)\([a-z]*\)$/\1\3/'
aaaabbbb



;; elisp(文字列の走査)
(let ((str "aaaa1234bbbb"))
  (string-match "\\([a-z]+\\)\\([0-9]+\\)\\([a-z]+\\)" str)
  (concat
   (match-string-no-properties 1 str)
   (match-string-no-properties 3 str)))
=> "aaaabbbb"



;; elisp(バッファの走査)        <= ちょっと大げさ
(with-temp-buffer
  (let ((str "aaaa1234bbbb"))
    (insert str)
    (goto-char (point-min))
    (if (re-search-forward "\\([a-z]+\\)\\([0-9]+\\)\\([a-z]+\\)" (point-max) t)
       (concat
        (match-string-no-properties 1)
        (match-string-no-properties 3)))))
=> "aaaabbbb"



カテゴリ「Emacs」最新ページ / 前ページ 1 2 3 4 5 6 7 8 次ページ / page 4 (8)

最終更新時間: 2010-07-27 06:00

フィードメーター - マスタカの ChangeLog メモ