emacs: Specify the tangle for the entire file
This commit is contained in:
parent
091a42d916
commit
48d11cb7c1
1 changed files with 30 additions and 29 deletions
|
@ -2,6 +2,7 @@
|
||||||
#+OPTIONS: author:nil num:nil
|
#+OPTIONS: author:nil num:nil
|
||||||
#+STARTUP: showall
|
#+STARTUP: showall
|
||||||
#+LINK: yoshi-theme http://ryuslash.org/projects/yoshi-theme.html
|
#+LINK: yoshi-theme http://ryuslash.org/projects/yoshi-theme.html
|
||||||
|
#+PROPERTY: tangle init2.el
|
||||||
|
|
||||||
* GUI
|
* GUI
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
Disable =menu-bar-mode= since I haven't used the menu bar much ever,
|
Disable =menu-bar-mode= since I haven't used the menu bar much ever,
|
||||||
even when I first started using Emacs.
|
even when I first started using Emacs.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@
|
||||||
Since Emacs gives a pretty good indication of where in the buffer
|
Since Emacs gives a pretty good indication of where in the buffer
|
||||||
I'm working I really don't need to have the scroll bar visible.
|
I'm working I really don't need to have the scroll bar visible.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@
|
||||||
|
|
||||||
I've never used the tool bar much, so remove it.
|
I've never used the tool bar much, so remove it.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
and exist. Place them at the end of =load-path= so they don't mess up
|
and exist. Place them at the end of =load-path= so they don't mess up
|
||||||
package precedence.
|
package precedence.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(eval-and-compile
|
(eval-and-compile
|
||||||
(defun oni:path-init (dir)
|
(defun oni:path-init (dir)
|
||||||
"Add DIR to `load-path' and all its subdirectories, unless
|
"Add DIR to `load-path' and all its subdirectories, unless
|
||||||
|
@ -58,7 +59,7 @@
|
||||||
|
|
||||||
Add my project [[yoshi-theme]] to =custom-theme-load-path= and load it.
|
Add my project [[yoshi-theme]] to =custom-theme-load-path= and load it.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(add-to-list 'custom-theme-load-path "~/projects/emacs/yoshi-theme/")
|
(add-to-list 'custom-theme-load-path "~/projects/emacs/yoshi-theme/")
|
||||||
(load-theme 'yoshi t)
|
(load-theme 'yoshi t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
@ -66,7 +67,7 @@
|
||||||
Add any other interesting paths to =load-path= and, if it exists,
|
Add any other interesting paths to =load-path= and, if it exists,
|
||||||
load the ~loaddefs.el~ file from these directories.
|
load the ~loaddefs.el~ file from these directories.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(mapc #'(lambda (dir)
|
(mapc #'(lambda (dir)
|
||||||
(add-to-list 'load-path dir)
|
(add-to-list 'load-path dir)
|
||||||
(let ((loaddefs (concat dir "/loaddefs.el")))
|
(let ((loaddefs (concat dir "/loaddefs.el")))
|
||||||
|
@ -81,7 +82,7 @@
|
||||||
Don't ask ~yes~ or ~no~, ask ~y~ or ~n~, I've never had an accidental ~y~ so
|
Don't ask ~yes~ or ~no~, ask ~y~ or ~n~, I've never had an accidental ~y~ so
|
||||||
far.
|
far.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -90,7 +91,7 @@
|
||||||
Use =ibuffer= instead of the default =list-buffers= because it has many
|
Use =ibuffer= instead of the default =list-buffers= because it has many
|
||||||
more features.
|
more features.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defalias 'list-buffers 'ibuffer)
|
(defalias 'list-buffers 'ibuffer)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@
|
||||||
|
|
||||||
Do the same with =hippie-expand= and =dabbrev-expand=.
|
Do the same with =hippie-expand= and =dabbrev-expand=.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defalias 'dabbrev-expand 'hippie-expand)
|
(defalias 'dabbrev-expand 'hippie-expand)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -108,7 +109,7 @@
|
||||||
whenever I'm working in a mode that supports it anyway. This should
|
whenever I'm working in a mode that supports it anyway. This should
|
||||||
only execute once ~eldoc~ has been loaded.
|
only execute once ~eldoc~ has been loaded.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(eval-after-load "eldoc" '(diminish 'eldoc-mode))
|
(eval-after-load "eldoc" '(diminish 'eldoc-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -116,7 +117,7 @@
|
||||||
|
|
||||||
Use the standard EMMS configuration and add some MPD settings.
|
Use the standard EMMS configuration and add some MPD settings.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:emms-init ()
|
(defun oni:emms-init ()
|
||||||
"Initialization function for EMMS."
|
"Initialization function for EMMS."
|
||||||
(require 'emms-setup)
|
(require 'emms-setup)
|
||||||
|
@ -137,7 +138,7 @@
|
||||||
|
|
||||||
Add some keybindings for EMMS.
|
Add some keybindings for EMMS.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:emms-toggle-playing ()
|
(defun oni:emms-toggle-playing ()
|
||||||
"Toggle between playing/paused states."
|
"Toggle between playing/paused states."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -165,7 +166,7 @@
|
||||||
Load ~flymake-cursor~ after loading ~flymake~, add Python and Go to
|
Load ~flymake-cursor~ after loading ~flymake~, add Python and Go to
|
||||||
"allowed" files and add go error output to error patterns.
|
"allowed" files and add go error output to error patterns.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:flymake-init ()
|
(defun oni:flymake-init ()
|
||||||
"Initialization function for flymake."
|
"Initialization function for flymake."
|
||||||
(require 'flymake-cursor)
|
(require 'flymake-cursor)
|
||||||
|
@ -189,7 +190,7 @@
|
||||||
Disable the GUI for flymake errors. This causes the flymake errors
|
Disable the GUI for flymake errors. This causes the flymake errors
|
||||||
to be shown in the minibuffer.
|
to be shown in the minibuffer.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq flymake-gui-warnings-enabled nil)
|
(setq flymake-gui-warnings-enabled nil)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -197,7 +198,7 @@
|
||||||
info patterns, set the log file to somewhere in my home directory
|
info patterns, set the log file to somewhere in my home directory
|
||||||
and set logging level to 0.
|
and set logging level to 0.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq flymake-info-line-regexp
|
(setq flymake-info-line-regexp
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(regexp-opt
|
(regexp-opt
|
||||||
|
@ -250,7 +251,7 @@
|
||||||
After loading ~flycheck~ Remove the default python checkers and
|
After loading ~flycheck~ Remove the default python checkers and
|
||||||
replace them with my own, which tries both ~flake8~ and ~pylint~.
|
replace them with my own, which tries both ~flake8~ and ~pylint~.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(eval-after-load "flycheck"
|
(eval-after-load "flycheck"
|
||||||
'(progn
|
'(progn
|
||||||
(mapc (lambda (c) (delete c flycheck-checkers))
|
(mapc (lambda (c) (delete c flycheck-checkers))
|
||||||
|
@ -262,7 +263,7 @@
|
||||||
Make the ~C-l~ look like a line of ~-~ up to =fill-column= or
|
Make the ~C-l~ look like a line of ~-~ up to =fill-column= or
|
||||||
=fci-rule-column= and remove the string displayed before the ~C-l~.
|
=fci-rule-column= and remove the string displayed before the ~C-l~.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:pretty-control-l-function (win)
|
(defun oni:pretty-control-l-function (win)
|
||||||
"Just make a string of either `fci-rule-column' or
|
"Just make a string of either `fci-rule-column' or
|
||||||
`fill-column' length -1. Use the `-' character. WIN is ignored."
|
`fill-column' length -1. Use the `-' character. WIN is ignored."
|
||||||
|
@ -275,14 +276,14 @@
|
||||||
|
|
||||||
Remove the string displayed before the ~C-l~.
|
Remove the string displayed before the ~C-l~.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq pp^L-^L-string-pre nil)
|
(setq pp^L-^L-string-pre nil)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Enable =pretty-control-l-mode= at startup and whenever a new frame is
|
Enable =pretty-control-l-mode= at startup and whenever a new frame is
|
||||||
created.
|
created.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(add-hook 'emacs-startup-hook 'pretty-control-l-mode)
|
(add-hook 'emacs-startup-hook 'pretty-control-l-mode)
|
||||||
(add-hook 'after-make-frame-functions
|
(add-hook 'after-make-frame-functions
|
||||||
'(lambda (arg) (pretty-control-l-mode)))
|
'(lambda (arg) (pretty-control-l-mode)))
|
||||||
|
@ -292,21 +293,21 @@
|
||||||
|
|
||||||
Automatically join some channels when connecting to freenode.net.
|
Automatically join some channels when connecting to freenode.net.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq erc-autojoin-channels-alist
|
(setq erc-autojoin-channels-alist
|
||||||
'(("freenode.net" "#ninthfloor" "#emacs")))
|
'(("freenode.net" "#ninthfloor" "#emacs")))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Don't show ~PART~ messages.
|
Don't show ~PART~ messages.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq erc-hide-list '("PART"))
|
(setq erc-hide-list '("PART"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Insert a timestamp every time a message comes in, print it on the
|
Insert a timestamp every time a message comes in, print it on the
|
||||||
left and print the hour and minute parts of the time.
|
left and print the hour and minute parts of the time.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq erc-insert-timestamp-function 'erc-insert-timestamp-left)
|
(setq erc-insert-timestamp-function 'erc-insert-timestamp-left)
|
||||||
(setq erc-timestamp-format "[%H:%M] ")
|
(setq erc-timestamp-format "[%H:%M] ")
|
||||||
(setq erc-timestamp-only-if-changed-flag nil)
|
(setq erc-timestamp-only-if-changed-flag nil)
|
||||||
|
@ -314,14 +315,14 @@
|
||||||
|
|
||||||
Set my nickname.
|
Set my nickname.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq erc-nick "ryuslash")
|
(setq erc-nick "ryuslash")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
When starting ERC disable truncating lines, don't let ERC fill each
|
When starting ERC disable truncating lines, don't let ERC fill each
|
||||||
line and enable =visual-line-mode=.
|
line and enable =visual-line-mode=.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:erc-mode-func ()
|
(defun oni:erc-mode-func ()
|
||||||
"Function for `erc-mode-hook'."
|
"Function for `erc-mode-hook'."
|
||||||
(erc-fill-mode -1)
|
(erc-fill-mode -1)
|
||||||
|
@ -336,7 +337,7 @@
|
||||||
Add ~unison~ to the list of =eshell-visual-commands= because it
|
Add ~unison~ to the list of =eshell-visual-commands= because it
|
||||||
expects unbuffered input and eshell just doesn't give that.
|
expects unbuffered input and eshell just doesn't give that.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(eval-after-load "em-term"
|
(eval-after-load "em-term"
|
||||||
'(add-to-list 'eshell-visual-commands "unison"))
|
'(add-to-list 'eshell-visual-commands "unison"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
@ -344,7 +345,7 @@
|
||||||
Don't let eshell highlight it's prompt, this way I can decide the
|
Don't let eshell highlight it's prompt, this way I can decide the
|
||||||
colors for it myself.
|
colors for it myself.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq eshell-highlight-prompt nil)
|
(setq eshell-highlight-prompt nil)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -361,7 +362,7 @@
|
||||||
|
|
||||||
And set the =eshell-prompt-regexp= to
|
And set the =eshell-prompt-regexp= to
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:eshell-prompt-function ()
|
(defun oni:eshell-prompt-function ()
|
||||||
"Show a pretty shell prompt."
|
"Show a pretty shell prompt."
|
||||||
(let ((status (if (zerop eshell-last-command-status) ?+ ?-))
|
(let ((status (if (zerop eshell-last-command-status) ?+ ?-))
|
||||||
|
@ -397,7 +398,7 @@
|
||||||
|
|
||||||
Don't truncate lines in eshell, wrap them.
|
Don't truncate lines in eshell, wrap them.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:eshell-mode-func ()
|
(defun oni:eshell-mode-func ()
|
||||||
"Function for `eshell-mode-hook'."
|
"Function for `eshell-mode-hook'."
|
||||||
(setq truncate-lines nil))
|
(setq truncate-lines nil))
|
||||||
|
@ -407,7 +408,7 @@
|
||||||
|
|
||||||
Bind the ~f8~ key to easily show eshell.
|
Bind the ~f8~ key to easily show eshell.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun oni:raise-eshell ()
|
(defun oni:raise-eshell ()
|
||||||
"Start or switch back to `eshell'.
|
"Start or switch back to `eshell'.
|
||||||
Also change directories to current working directory."
|
Also change directories to current working directory."
|
||||||
|
|
Loading…
Reference in a new issue