Update.
[elisp.git] / emacs.el
index ebc608e..ffd9665 100644 (file)
--- a/emacs.el
+++ b/emacs.el
@@ -598,6 +598,8 @@ load-warning buffer in case of failure."
 
 (define-key global-map [(control c) (control q)] 'ff/delete-trailing-whitespaces-and-indent)
 
+(define-key global-map [(control x) (control o)] 'other-window)
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Playing sounds
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1192,12 +1194,23 @@ goback argument, go back where we were."
 ;; (define-key python-mode-map [(shift right)] 'indent-rigidly-right-to-tab-stop)
 ;; (define-key python-mode-map [(shift left)] 'indent-rigidly-left-to-tab-stop)
 
+(load "vc-git")
+
+(defun ff/git-pull-push () (interactive)
+       (shell-command "git pull && git push" nil)
+       )
+
+(defun ff/git-pull () (interactive)
+       (shell-command "git pull" nil)
+       )
+
+(define-key global-map [(control x) (v) (p)] 'ff/git-pull-push)
+(define-key global-map [(control x) (v) (P)] 'ff/git-pull)
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; The big stuff (bbdb, mailcrypt, etc.)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(load "vc-git")
-
 (setq bbdb-file "~/private/bbdb")
 
 (when (file-exists-p bbdb-file)
@@ -1760,7 +1773,7 @@ require 'optim'
   "Adds all the stuff to start a new python file"
   (interactive)
   (goto-char (point-min))
-  (insert "#!/usr/bin/env python
+  (insert "#!/usr/bin/env python-for-pytorch
 
 import torch
 import math