• Emacs と Perl を使って,XML-RPC 経由で Movable Type のエントリを編集するツールを配布しています.良かったら持っていってください.( 2004/10/24 update) mapae logo
  • Movable Type で footnote*1 を生成する plugin を配布しています.良かったら持っていってください.( 2004/03/04 update )
  • その他の配布物等

*1: 脚注.よ〜するに,こ〜ゆ〜やつです.

anything: find-line

| コメント(0) | トラックバック(0)

あったら便利かもと思って、例によってでっち上げ。

(require 'anything-match-plugin)
(setq anything-c-source-find-line
      '((name . "Find Line")
        (init
         . (lambda ()
             (setq anything-source-find-line-buffer (current-buffer))))
        (candidates
         . (lambda ()
             (with-current-buffer anything-source-find-line-buffer
               (split-string (buffer-substring-no-properties
                              (point-min) (point-max)) "\r\n\\|\r\\|\n"))))
        (candidate-transformer
         . (lambda (candidate)
             (let ((lnfig
                    (number-to-string
                     (1+ (floor (log10 (length candidate)))))))
               (loop for line    in candidate
                     for linenum from 1
                     collect (cons (format (concat "%" lnfig "d: %s")
                                           linenum line)
                                   linenum)))))
        (action
         . (("Goto line"
             . (lambda (candidate)
                 (goto-line candidate)))))
        ))

トラックバック(0)

トラックバックURL: http://d.nym.jp/mt/trackback/2071

コメントする

最近のコメント

アーカイブ

Author

nym <n...@nym.jp>
Powered by Movable Type 5.01