Created
November 19, 2018 16:33
-
-
Save lagagain/e98ee7052b073549e7f0a437ceaa9ee6 to your computer and use it in GitHub Desktop.
[practice] emacs elisp send-regrion-to-term
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 send-region-to-term nil | |
(interactive) | |
(send-string "*terminal*" (buffer-substring-no-properties (region-beginning) (region-end))) | |
(send-string "*terminal*" "\n")) | |
(local-set-key (kbd "C-c C-r") | |
'send-region-to-term) |
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
;;; try | |
(term "/bin/bash") ;; open *terminal* | |
;; send under string to *termianl* with C-c C-r or M-x send-region-to-term | |
python3 | |
print ("Hello") | |
exit () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A good place for learning elisp site: elisp learning