Created
October 30, 2012 16:15
-
-
Save tomoya/3981242 to your computer and use it in GitHub Desktop.
ぽんとさんのために作りました
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; このようなデータを | |
;; 532101 18 19 | |
;; 532102 19 20 | |
;; ↓ | |
;; 532101 18 19 1.0555555555555556 | |
;; 532102 19 20 1.0526315789473684 | |
;; このようにします | |
(defun ponto-special (start end) | |
(interactive "r") | |
(replace-regexp "^\\(.* \\)\\([0-9]+\\) \\([0-9]+\\)" | |
(query-replace-compile-replacement "\\1\\2 \\3 \\,(/ (string-to-int \\3) (string-to-int \\2))" t) | |
nil start end)) | |
(provide 'ponto-special) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
なんて specific な。