Created
November 7, 2024 10:45
-
-
Save secemp9/e522c8a24bd16e9ebc6ee54ab662f651 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
;(defun shellfm () | |
;(interactive) | |
; (shell-command-on-region | |
; (point-min) (point-max) "cat $@")) | |
(defun shell-command-on-buffer () | |
"Asks for a command and executes it in inferior shell with current buffer | |
as input." | |
(interactive) | |
(shell-command-on-region | |
(point-min) (point-max) "~/sed.emacs $@ ") | |
(next-window-any-frame) | |
(eval-buffer)) | |
(global-set-key (kbd "M-/") 'shell-command-on-buffer) | |
(global-set-key (kbd "M-:") 'eval-buffer) | |
(defun last-30-commands () | |
(interactive) | |
(kmacro-start-macro-or-insert-counter nil) | |
(shell-command-on-buffer) | |
(eval-buffer) | |
(shell-command-on-buffer) | |
(eval-buffer) | |
(kmacro-end-or-call-macro nil)) | |
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
grep -v "^;" | sed '/#+BEGIN_SRC emacs-lisp/!d;s//&\n/;s/.*\n//;:a;/#+END_SRC/bb;$!{n;ba};:b;s//\n&/;P;D' $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment