Created
November 1, 2017 08:19
-
-
Save ishideo/eae1374c8f081787c19bb04f55dbd355 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
| ;; -*- coding: utf-8; lexical-binding: t -*- | |
| (defun copy-num (file words) | |
| (with-temp-buffer | |
| (insert-file-contents-literally file) | |
| (goto-char (point-min)) | |
| (catch 'e | |
| (mapcar #'(lambda (x) | |
| (unless (search-forward x nil t) | |
| (throw 'e ""))) | |
| words) | |
| (end-of-line) | |
| (thing-at-point 'filename)))) | |
| (let ((file (car argv)) | |
| (words (cdr argv))) | |
| (princ (concat (copy-num file words) "\n"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment