レポート採点用。いままで採点するレポートの種類(回)ごとに 変数を設定し直していた。保管フォルダへのリファイルはその都度 ミニバッファヒストリを辿っていた。3年くらいやってていい加減面倒になった。 キーボードマクロを登録したら楽になった。てことで、Emacs-Lispにした。飛躍的に楽になった!
;;; -*- Emacs-Lisp -*-
;;; An Utility Function to Speed up Evaluation of Report
;;; (c)2005 by HIROSE Yuuji [yuuji@gentei.org]
;;; $Id: $
;;; Last modified Mon Nov 14 21:51:39 2005 on roy
;;; Update count: 1
(defun scr-reply ()
(interactive)
(or (eq major-mode 'mew-summary-mode)
(error "Call me in mew-summary-mode"))
(or (string-match
"\\([0-9][0-9]?\\)-\\([0-9][0-9]?\\)" (mew-summary-folder-name))
(error "Call me on date-like folder"))
(let*((fn (mew-summary-folder-name))
(m (substring fn (match-beginning 1) (match-end 1)))
(d (substring fn (match-beginning 2) (match-end 2))))
(setq unread-command-events '(?\C-k ?\C-m))
(mew-summary-reply)
(xcite-yank-cur-msg)
(insert (format "%d月%d日のレポートを返却します。\n評価:\t\tB"
(string-to-int m) (string-to-int d)))
(save-excursion
(while (re-search-backward "^Cc: " nil t)
(cond
((looking-at "Cc: \\sw+-\\([0-9][0-9]?\\)-\\([0-9][0-9]?\\)@")
(goto-char (match-beginning 1))
(insert "return-")
(beginning-of-line)
(insert "D"))
(t (delete-region (point) (progn (forward-line 1) (point)))))
))
(save-excursion (insert "\n\n\n"))
))
;;
; Local variables:
; fill-prefix: ";; "
; paragraph-start: "^$\\|\\|;;$"
; paragraph-separate: "^$\\|\\|;;$"
; buffer-file-coding-system: euc-jp
; coding: euc-jp
; End:
Mew依存。使用のための前提多すぎ。 ずえーったいに他の人は使えまい。どうだあ。
叱咤激励感想ツッコミはゲストブックへ
Generated with mkdiary.rb