Created
April 22, 2016 00:49
-
-
Save kdmsnr/251d3e38c17226e35686e5f44e91c383 to your computer and use it in GitHub Desktop.
This file contains 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
(defun memo-create() | |
(interactive) | |
(let ((memo-name (format-time-string "%Y-%m-%d-%s"))) | |
(find-file (concat "~/Dropbox/memo/" memo-name ".md")))) | |
(defun memo-search() | |
(interactive) | |
(setq q (read-string "grep word: ")) | |
(ag-regexp q "~/Dropbox/memo/") | |
(select-window ; select ag buffer | |
(car (my/get-buffer-window-list-regexp "^\\*ag ")))) | |
(defun memo-list() | |
(interactive) | |
(ag-regexp "^#[^#]" "~/Dropbox/memo/") | |
(select-window ; select ag buffer | |
(car (my/get-buffer-window-list-regexp "^\\*ag ")))) | |
(global-set-key (kbd "C-c m") 'memo-create) | |
(global-set-key (kbd "C-c s") 'memo-search) | |
(global-set-key (kbd "C-c l") 'memo-list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment