commit fedb24e160dcb617cef712207e6fc25733359002
parent 9b251f9e445a1fd236a5fd1f43d32bfdd807e462
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Mon, 12 Dec 2016 22:00:15 +0200
Make myinit.org work again?
Diffstat:
M | emacs/myinit.org | | | 116 | ++++++++++++++++++++++++++++++++++++++----------------------------------------- |
1 file changed, 56 insertions(+), 60 deletions(-)
diff --git a/emacs/myinit.org b/emacs/myinit.org
@@ -5,12 +5,12 @@
- [ ] What is revert-buffer?
#+BEGIN_SRC emacs-lisp
- (setq inhibit-startup-message t)
- (setq column-number-mode t)
- (setq electric-indent-mode nil)
- (setq indent-tabs-mode nil)
- (setq display-battery-mode t)
- (setq word-wrap t)
+ (setq-default inhibit-startup-message t)
+ (setq-default column-number-mode t)
+ (setq-default electric-indent-mode nil)
+ (setq-default indent-tabs-mode nil)
+ (setq-default display-battery-mode t)
+ (setq-default word-wrap t)
#+END_SRC
** Customize keys
@@ -28,8 +28,8 @@
* Ido-mode
#+BEGIN_SRC emacs-lisp
- (setq ido-enable-flex-matching t)
- (setq ido-everywhere t)
+ (setq-default ido-enable-flex-matching t)
+ (setq-default ido-everywhere t)
(ido-mode 1)
#+END_SRC
@@ -44,28 +44,29 @@
* winner-mode
#+BEGIN_SRC emacs-lisp
-(use-package swiper
- :ensure t
- :config
- (progn
- (ivy-mode 1)
- (setq ivy-use-virtual-buffers t)
- (global-set-key "\C-s" 'swiper)
- (global-set-key (kbd "C-c C-r") 'ivy-resume)
- (global-set-key (kbd "<f6>") 'ivy-resume)
- (global-set-key (kbd "M-x") 'counsel-M-x)
- (global-set-key (kbd "C-x C-f") 'counsel-find-file)
- (global-set-key (kbd "<f1> f") 'counsel-describe-function)
- (global-set-key (kbd "<f1> v") 'counsel-describe-variable)
- (global-set-key (kbd "<f1> l") 'counsel-find-library)
- (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
- (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
- (global-set-key (kbd "C-c g") 'counsel-git)
- (global-set-key (kbd "C-c j") 'counsel-git-grep)
- (global-set-key (kbd "C-c k") 'counsel-ag)
- (global-set-key (kbd "C-x l") 'counsel-locate)
- (global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
- (define-key read-expression-map (kbd "C-r") 'counsel-expression-history)))
+ (use-package swiper
+ :ensure t
+ :config
+ (progn
+ (ivy-mode 1)
+ (setq-default ivy-use-virtual-buffers t)
+ (define-key read-expression-map (kbd "C-r") 'counsel-expression-history))
+ :bind
+ ("\C-s" . swiper)
+ ("C-c C-r" . ivy-resume)
+ ("<f6>" . ivy-resume)
+ ("M-x" . counsel-M-x)
+ ("C-x C-f" . counsel-find-file)
+ ("<f1> f" . counsel-describe-function)
+ ("<f1> v" . counsel-describe-variable)
+ ("<f1> l" . counsel-find-library)
+ ("<f2> i" . counsel-info-lookup-symbol)
+ ("<f2> u" . counsel-unicode-char)
+ ("C-c g" . counsel-git)
+ ("C-c j" . counsel-git-grep)
+ ("C-c k" . counsel-ag)
+ ("C-x l" . counsel-locate)
+ ("C-S-o" . counsel-rhythmbox))
#+END_SRC
* ace-window-mode
@@ -96,8 +97,8 @@
#+BEGIN_SRC emacs-lisp
(use-package evil
- :ensure t)
- :config (evil-mode 1)
+ :ensure t
+ :config (evil-mode 1))
#+END_SRC
* try-mode
@@ -149,22 +150,18 @@ Org bullets makes things look pretty.
- [ ] org-startup-indented
#+BEGIN_SRC emacs-lisp
- (setq org-confirm-babel-evaluate nil)
+ (setq-default org-confirm-babel-evaluate nil)
; Don't prompt me to confirm every time I want to evaluate a block.
- (setq org-directory "~/foo/orgmode")
- (setq org-default-notes-file
+ (setq-default org-directory "~/foo/orgmode")
+ (setq-default org-default-notes-file
(concat org-directory "/notes.org"))
- (setq org-export-html-postamble nil)
- (setq org-hide-leading-stars t)
- (setq org-startup-folded (quote overview))
- (setq org-startup-indented t))
+ (setq-default org-export-html-postamble nil)
+ (setq-default org-hide-leading-stars t)
+ (setq-default org-startup-folded (quote overview))
+ (setq-default org-startup-indented t)
(add-hook 'org-babel-after-execute-hook
'org-display-inline-images 'append)
-
- (org-babel-load-languages
- '((ipython . t))
- '((emacs-lisp . t)))
#+END_SRC
* Programming modes
@@ -178,9 +175,8 @@ Org bullets makes things look pretty.
:ensure t
:config
(elpy-enable)
- (elpy-use-ipython)
- (elpy-rpc-python-command "python3"))
- #+SRC_END
+ (elpy-use-ipython))
+ #+END_SRC
*** ob-ipython
@@ -190,16 +186,19 @@ Org bullets makes things look pretty.
(use-package ob-ipython
:ensure t
:config
+ (org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((ipython . t)))
(add-hook 'org-babel-after-execute-hook
'org-display-inline-images 'append)
; display/update images in the buffer after I evaluate.
)
- #+SRC_END
+ #+END_SRC
*** Customize
#+BEGIN_SRC emacs-lisp
- (setq python-check-command "flake8")
+ (setq-default python-check-command "flake8")
#+END_SRC
** Haskell
@@ -207,20 +206,17 @@ Org bullets makes things look pretty.
*** Customize
#+BEGIN_SRC emacs-lisp
- (setq haskell-hoogle-url "https://www.fpcomplete.com/hoogle?q=%s")
- (setq haskell-stylish-on-save t)
- (setq haskell-tags-on-save t)
+ (setq-default haskell-hoogle-url "https://www.fpcomplete.com/hoogle?q=%s")
+ (setq-default haskell-stylish-on-save t)
+ (setq-default haskell-tags-on-save t)
#+END_SRC
** Coq (hehehe… it says "coq"…)
#+BEGIN_SRC emacs-lisp
- (use-package proofgeneral
- :ensure t
- :config
- (setq proof-autosend-enable t)
- (setq proof-electric-terminator-enable t)
- (setq proof-shell-quiet-errors nil))
+ (setq-default proof-autosend-enable t)
+ (setq-default proof-electric-terminator-enable t)
+ (setq-default proof-shell-quiet-errors nil)
#+END_SRC
*** Customize
@@ -234,7 +230,7 @@ Org bullets makes things look pretty.
**** Customize
#+BEGIN_SRC emacs-lisp
- (setq log-mode t)
- (setq erc-log-write-after-insert t)
- (setq erc-log-write-after-send t)
+ (setq-default log-mode t)
+ (setq-default erc-log-write-after-insert t)
+ (setq-default erc-log-write-after-send t)
#+END_SRC