Last active
December 16, 2015 00:09
-
-
Save Altech/5345590 to your computer and use it in GitHub Desktop.
use create_link.rb from Emacs.
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
(setenv "PATH" (concat "<<PATH TO create_link.rb>>" ":" (getenv "PATH"))) | |
(require 'cl) | |
(defun create-link (url) | |
(interactive "sURL: ") | |
(let ((type (case major-mode | |
('markdown-mode "-t markdown") | |
('org-mode "-t org")))) | |
(insert (shell-command-to-string (concat "create_link.rb " type " " url))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment