]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/don-configuration.org
use primary selection on unix machines
[lib.git] / emacs_el / configuration / don-configuration.org
index 9aeb4e7d9dbeb7fb15e15f3624390dd65837d095..5778d4ef367ee2d4f127e2849ec0f660fd147a3f 100644 (file)
@@ -82,7 +82,13 @@ load  [[https://github.com/jwiegley/use-package/][use-package]] even faster
     :config (setq paradox-execute-asynchronously t)
     )
 #+END_SRC
-* Add library paths
+* Paths
+** Update PATH
+#+BEGIN_SRC emacs-lisp
+  (add-to-list 'exec-path '"/usr/local/bin")
+  (add-to-list 'exec-path '"~/bin/")
+#+END_SRC
+** Add library paths
 
 #+BEGIN_SRC emacs-lisp
   (add-to-list 'load-path '"~/lib/emacs_el/")
@@ -1203,8 +1209,8 @@ This can be used to link things pretty quickly if necessary
     (defun dla/ess-region-remote-eval (start end)
       "Evaluate region in a remote ESS instance"
       (interactive "r")
-      (shell-command-on-region start end "eval_r" (get-buffer-create "***essregionremoteeval***"))
-      kill-buffer "***essregionremoteeval***")
+      (shell-command-on-region start end "eval_r" (get-buffer-create "***essregionremoteeval***") nil nil nil)
+      (kill-buffer "***essregionremoteeval***"))
     ;; Don't restore history or save workspace image
     '(inferior-R-args "--no-restore-history --no-save")
     )
@@ -1221,6 +1227,14 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
   )
 #+END_SRC
 
+** YAML Mode
+#+BEGIN_SRC emacs-lisp
+  (use-package yaml-mode
+    ;; add ess to the x major mode
+    :mode ("\\.\\(yaml|yml\\)\\'" . yaml-mode)
+  )
+#+END_SRC
+
 ** Polymode
 #+BEGIN_SRC emacs-lisp
 (use-package poly-noweb
@@ -1288,6 +1302,26 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
     (setq atomic-chrome-buffer-open-style 'full)
     )
 #+END_SRC
+** Edit Server
+#+BEGIN_SRC emacs-lisp
+  (use-package edit-server
+    :ensure t
+    :commands edit-server-start
+    :init (if after-init-time
+              (edit-server-start)
+            (add-hook 'after-init-hook
+                      #'(lambda() (edit-server-start))))
+    :config (setq edit-server-new-frame-alist
+                  '((name . "Edit with Emacs FRAME")
+                    (top . 200)
+                    (left . 200)
+                    (width . 80)
+                    (height . 25)
+                    (minibuffer . t)
+                    (menu-bar-lines . t)
+                    (window-system . x)))
+    )
+#+END_SRC
 ** Multiple Cursors
    :PROPERTIES:
    :ID:       6fcf218b-a762-4c37-9339-a8202ddeb544
@@ -1356,6 +1390,15 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
     (setq default-abbrev-mode t))
 #+END_SRC
 
+** Python Programming
+#+BEGIN_SRC emacs-lisp
+  (use-package elpy
+    :ensure t
+    :init
+    (elpy-enable)
+    )
+#+END_SRC
+
 ** Go language
 #+BEGIN_SRC emacs-lisp
 (use-package go-mode
@@ -1712,7 +1755,7 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
     (interactive)
     (save-excursion
       (org-back-to-heading 'invisible-ok)
-      (hide-other)
+      (outline-hide-other)
       (org-cycle)
       (org-cycle)
       (org-cycle)))
@@ -2461,6 +2504,11 @@ same directory as the org-buffer and insert a link to this file."
   )
 #+END_SRC
 * Keybindings
+** Home/End Begining/End of line
+#+BEGIN_SRC emacs-lisp
+  (global-set-key [home] 'move-beginning-of-line)
+  (global-set-key [end] 'move-end-of-line)
+#+END_SRC
 ** Goto line
 #+BEGIN_SRC emacs-lisp
   (global-unset-key "\M-g")
@@ -2516,11 +2564,26 @@ same directory as the org-buffer and insert a link to this file."
   (show-paren-mode 1)
   (setq show-paren-delay 0.2)
 
+#+END_SRC
+** My Username
+#+BEGIN_SRC emacs-lisp
   (setq user-mail-address "don@donarmstrong.com")
 
+#+END_SRC
+** Use primary selection on unix machines
+#+BEGIN_SRC emacs-lisp
   ;; switch back to the old primary selection method
-  (setq x-select-enable-clipboard nil)
-  (setq x-select-enable-primary t)
+  (if (or (string-equal system-type "darwin")
+          (string-equal system-type "windows")
+          )
+      (progn
+        (setq x-select-enable-clipboard t)
+        (setq x-select-enable-primary nil)
+        )
+    (progn
+      (setq x-select-enable-clipboard nil)
+      (setq x-select-enable-primary t)
+      ))
   ; (setq mouse-drag-copy-region t)
 
   (fset 'perl-mode 'cperl-mode)