summaryrefslogtreecommitdiffstats
path: root/emacs/init.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-04-27 15:42:20 +0200
committerGravatar Tom Willemse2013-04-27 15:42:20 +0200
commitb7c74aded046797d24f33a03b30f2a4b5771e7b7 (patch)
treeec7b4c2297ae29f876e94c063692f13649167ead /emacs/init.org
parentd5dcfc530087b8343f65793c0c6c338afac2bc89 (diff)
downloaddotfiles-b7c74aded046797d24f33a03b30f2a4b5771e7b7.tar.gz
dotfiles-b7c74aded046797d24f33a03b30f2a4b5771e7b7.zip
Disable undo in eshell buffers
Diffstat (limited to 'emacs/init.org')
-rw-r--r--emacs/init.org159
1 files changed, 85 insertions, 74 deletions
diff --git a/emacs/init.org b/emacs/init.org
index a1a1294..002ff9d 100644
--- a/emacs/init.org
+++ b/emacs/init.org
@@ -2,7 +2,7 @@
#+HTML_HEAD: <style>#content { width: 700px; } .tag { float: right; } pre { background-color: #111111; color: #bfbfbf; }</style>
#+PROPERTy: tangle init.el
-* Turn off useless visual components :gui:
+* Turn off useless visual components :gui:
Turn the menu, scroll-bar and tool-bar off quickly. If this happens
later on then the GUI will show these components for a longer time.
@@ -16,7 +16,7 @@
(tool-bar-mode -1)
#+END_SRC
-* Setup load-path :load_path:
+* Setup load-path :load_path:
Not everything can be installed with ~package.el~. Or some things can,
but I prefer installing them manually because it's easier. Anyway,
@@ -46,7 +46,7 @@
(require 'oni)
#+END_SRC
-* Load theme :theme:
+* Load theme :theme:
I have been experimenting with my own color theme for quite a while
now. I use ~package.el~ to install it, so to load it I need to wait
@@ -59,7 +59,7 @@
(oni:eval-after-init (load-theme 'yoshi t))
#+END_SRC
-* Replace yes or no with y or n :y_or_n_p:
+* Replace yes or no with y or n :y_or_n_p:
I have never had the trouble of accidentally pressing ~y~ at the
moment Emacs wants to ask me something. And having to type ~yes <RET>~
@@ -70,7 +70,7 @@
(defalias 'yes-or-no-p 'y-or-n-p)
#+END_SRC
-* Replace list-buffers with ibuffer :ibuffer:
+* Replace list-buffers with ibuffer :ibuffer:
~ibuffer~ offers some excellent ways to manage buffers. One of which
is the function to filter the buffer list on (almost) any predicate,
@@ -81,7 +81,7 @@
(defalias 'list-buffers 'ibuffer)
#+END_SRC
-* Replace dabbrev with hippie-expand :hippie_expand:
+* Replace dabbrev with hippie-expand :hippie_expand:
=hippie-expand= has an expansion that functions the same as
=dabbrev-expand= and it also has many more. I cannot think of a reason
@@ -92,7 +92,7 @@
(defalias 'dabbrev-expand 'hippie-expand)
#+END_SRC
-* Hide compilation window after success :compilation:
+* Hide compilation window after success :compilation:
If compilation was succesfull I really don't need to see the
compilation window. So if either ~*Compilation*~ or ~*compilation*~
@@ -112,7 +112,7 @@
(add-to-list 'compilation-finish-functions 'ext:comp-finish-function)
#+END_SRC
-* Scroll compilation window :compilation:
+* Scroll compilation window :compilation:
Even though I don't need to see the result of the compilation if
everything went as it should, scroll the output window so that I can
@@ -122,7 +122,7 @@
(setq compilation-scroll-output t)
#+END_SRC
-* Enable auto-fill-mode :auto_fill:
+* Enable auto-fill-mode :auto_fill:
=auto-fill-mode= automatically inserts newlines when a line becomes
too long. This is useful for both text modes and the comments in
@@ -134,7 +134,7 @@
(add-hook 'text-mode-hook 'auto-fill-mode)
#+END_SRC
-* Enable eldoc-mode :eldoc:
+* Enable eldoc-mode :eldoc:
=eldoc-mode= shows the arguments for the function call at point in the
minibuffer, or in the mode-line if you're in the minibuffer. This is
@@ -144,7 +144,7 @@
(add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
#+END_SRC
-* Enable fill-column-indicator :fill_column_indicator:
+* Enable fill-column-indicator :fill_column_indicator:
Emacs has many packages that try to deal with showing a right
margin, the 80th column which your code should not go beyond. None
@@ -156,7 +156,7 @@
(add-hook 'prog-mode-hook 'fci-mode)
#+END_SRC
-* Enable flycheck-mode :flycheck:
+* Enable flycheck-mode :flycheck:
Flycheck is a modern version of Flymake. They're not actually
related, but Flycheck did come from the idea of Flymake. Flycheck
@@ -179,7 +179,7 @@
(add-hook 'sh-mode-hook 'flycheck-mode)
#+END_SRC
-* Enable flyspell-mode :flyspell:
+* Enable flyspell-mode :flyspell:
What Flymake and Flycheck are to compilation, Flyspell is to
spelling. Runs spell checking in the background and highlights
@@ -191,7 +191,7 @@
(add-hook 'text-mode-hook 'flyspell-mode)
#+END_SRC
-* Enable paredit-mode :paredit:
+* Enable paredit-mode :paredit:
I had long thought of =paredit-mode= as overly complex and not very
useful. Though maybe I did try it out last before I started writing
@@ -207,7 +207,7 @@
(add-hook 'scheme-mode-hook 'paredit-mode)
#+END_SRC
-* Enable rainbow-delimiters-mode :rainbow_delimiters:
+* Enable rainbow-delimiters-mode :rainbow_delimiters:
Any language can have quite deeply nested "delimeters", meaning
parentheses, brackets, curly braces. It helps to see their depth
@@ -217,7 +217,7 @@
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
#+END_SRC
-* Enable rainbow-mode :rainbow:
+* Enable rainbow-mode :rainbow:
When editing color-heavy "code", like CSS, it's useful to be able to
see color you're specifying. =rainbow-mode= does this.
@@ -226,7 +226,7 @@
(add-hook 'css-mode-hook 'rainbow-mode)
#+END_SRC
-* Enable slime-js-minor-mode :js2:
+* Enable slime-js-minor-mode :js2:
SLIME is one of the coolest things about using Emacs to edit Lisp
code, so if there is something similar for JavaScript, even makes it
@@ -236,7 +236,7 @@
(add-hook 'js2-mode-hook 'slime-js-minor-mode)
#+END_SRC
-* Enable smartparens-mode :smartparens:
+* Enable smartparens-mode :smartparens:
=smartparens-mode= is a less strict and less lisp-focused mode that
tries to do something similar to =paredit-mode=. It is nice to use if
@@ -247,7 +247,7 @@
(add-hook 'python-mode-hook 'smartparens-mode)
#+END_SRC
-* Enable visual-line-mode :visual_line:
+* Enable visual-line-mode :visual_line:
Having words run off the screen in a chat session is unpleasant.
Having the words cut-off wherever the line ends is even worse! Use
@@ -259,7 +259,7 @@
(add-hook 'erc-mode-hook 'visual-line-mode)
#+END_SRC
-* Enable whitespace-mode :whitespace:
+* Enable whitespace-mode :whitespace:
In most programming languages whitespace is pretty unimportant. As
long as the readers can stand it the compilers/interpreters usually
@@ -272,7 +272,7 @@
(add-hook 'python-mode-hook 'whitespace-mode)
#+END_SRC
-* Enable yas-minor-mode :yas:
+* Enable yas-minor-mode :yas:
I still need to figure out where this mode comes in in my workflow.
I try to limit code-repetition as much as I can and anything that
@@ -288,7 +288,7 @@
(add-hook 'prog-mode-hook 'yas-minor-mode)
#+END_SRC
-* Enable tagedit-mode :tagedit:
+* Enable tagedit-mode :tagedit:
=tagedit-mode= tries to be for XML/HTML what =paredit-mode= is for Lisp.
And because of this, it *rocks*. It almost makes me feel sorry that I
@@ -305,7 +305,7 @@
(add-hook 'html-mode-hook 'oni:turn-on-tagedit-mode)
#+END_SRC
-* Disable the pylint and pyflakes checkers :flycheck:
+* Disable the pylint and pyflakes checkers :flycheck:
I use flake8 in =python-mode=, so I have no need for the =python-pylint=
and =python-pyflakes= checkers. Since this works on a variable that is
@@ -319,7 +319,7 @@
'(python-pylint python-pyflakes))))
#+END_SRC
-* Make ^L look pretty :ppcL:
+* Make ^L look pretty :ppcL:
Occasionally I might put a ~^L~ character in some code to create a
page separator. But seeing ~^L~ there isn't all that pretty, not when
@@ -351,7 +351,7 @@
'(lambda (arg) (pretty-control-l-mode)))
#+END_SRC
-* Auto-join some channels in ERC :erc:
+* Auto-join some channels in ERC :erc:
If ever I log in to IRC with ERC I would like to join these
channels, seeing as how *if* I talk, it's usually in one of these.
@@ -362,7 +362,7 @@
'(("freenode.net" "#ninthfloor" "#emacs" "#dispass")))
#+END_SRC
-* Don't show part messages in ERC :erc:
+* Don't show part messages in ERC :erc:
They don't interest me.
@@ -373,7 +373,7 @@
I used to hide more messages, but I found out that it can be
confusing to not be able to see *any* joins and quits at all.
-* Move the timestamp in ERC :erc:
+* Move the timestamp in ERC :erc:
I prefer having a timestamp on the left-side of a message in the
form of ~00:00~ instead of te usual. Having it right-aligned messes up
@@ -386,7 +386,7 @@
erc-timestamp-only-if-changed-flag nil)
#+END_SRC
-* Set IRC nickname :erc:
+* Set IRC nickname :erc:
This way I don't have to tell ERC what my nickname is every time.
@@ -394,7 +394,7 @@
(setq erc-nick "ryuslash")
#+END_SRC
-* Turn off filling in ERC :erc:
+* Turn off filling in ERC :erc:
Turn of =erc-fill-mode= so that =visual-line-mode= can do its thing.
@@ -403,7 +403,7 @@
(add-hook 'erc-mode-hook 'oni:erc-mode-func)
#+END_SRC
-* Specify some visual commands for eshell :eshell:
+* Specify some visual commands for eshell :eshell:
Eshell uses buffered input, always, but some commands need
unbuffered input, put those commands in =eshell-visual-commands= to
@@ -416,7 +416,7 @@
'(add-to-list 'eshell-visual-commands "unison"))
#+END_SRC
-* Disable prompt highlighting in eshell :eshell:
+* Disable prompt highlighting in eshell :eshell:
Since I'm using a custom prompt with some custom colors I don't need
the eshell prompt to be highlighted, which overwrites any colors I
@@ -426,7 +426,7 @@
(setq eshell-highlight-prompt nil)
#+END_SRC
-* Customize eshell prompt :eshell:
+* Customize eshell prompt :eshell:
Create a prompt that shows the following:
@@ -479,7 +479,7 @@
eshell-prompt-regexp "^> ")
#+END_SRC
-* Add a pop-up function for eshell :eshell:
+* Add a pop-up function for eshell :eshell:
When working I often need to switch to a shell to issue some quick
commands and then be on my merry way again, to help with this I have
@@ -506,7 +506,18 @@
(global-set-key (kbd "<f8>") 'oni:raise-eshell)
#+END_SRC
-* Disable bidirectional support :bidi:
+* Disable undo in eshell buffers :eshell:
+
+ Eshell buffers can get big and undo does not serve any real purpose
+ in these buffers. Instead of getting boundary limit popups all the
+ time, which I do want to keep for other buffers, it's easier to
+ just turn off undo information for such buffers.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'eshell-mode-hook 'buffer-disable-undo)
+ #+END_SRC
+
+* Disable bidirectional support :bidi:
Since I don't ever get any mail from people that use right-to-left
text, and even if I did I wouldn't be able to read it, I don't need
@@ -534,7 +545,7 @@
(put 'upcase-region 'disabled nil)
#+END_SRC
-* Don't echo status changes for jabber :jabber:
+* Don't echo status changes for jabber :jabber:
If I'm talking to someone I'll see their status and if they're
offline and I want to say something I can say it anyway, I don't
@@ -547,7 +558,7 @@
'(remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo))
#+END_SRC
-* Use libnotify for jabber notifications :jabber:
+* Use libnotify for jabber notifications :jabber:
The functions don't seem to be loaded automatically, so add
autoloads for the libnotify functions.
@@ -560,7 +571,7 @@
(add-hook 'jabber-alert-muc-hooks 'jabber-muc-libnotify)
#+END_SRC
-* Enable history :jabber:
+* Enable history :jabber:
Enable chat history for both regular chats and multi-user chats. I
disabled history completely for a long time, but sometimes you miss
@@ -574,7 +585,7 @@
jabber-history-dir "~/.emacs.d/jabber-hist")
#+END_SRC
-* Setup accounts for jabber :jabber:
+* Setup accounts for jabber :jabber:
Each account should have the current hostname appended to its
account name, so that multiple PCs can log in on the same account at
@@ -585,7 +596,7 @@
(:connection-type . ssl))))
#+END_SRC
-* Have ido ignore certain buffers :ido:
+* Have ido ignore certain buffers :ido:
These buffers are either uninteresting, reached through other means
(such as a special keybinding) or they get in the way of how I work.
@@ -653,7 +664,7 @@
(eval-after-load "ido" '(oni:ido-init))
#+END_SRC
-* Disable automatic merging in ido :ido:
+* Disable automatic merging in ido :ido:
ido has this wonderful/infuriating feature of trying to correct your
mistakes by suggesting files in other directories if it can't find
@@ -669,7 +680,7 @@
(setq ido-auto-merge-work-directories-length -1)
#+END_SRC
-* Instruct ido to open buffers in selected window :ido:
+* Instruct ido to open buffers in selected window :ido:
By default, when more than one frame exists and you try to switch
to a buffer that is already visible in another frame, ido pops up
@@ -680,7 +691,7 @@
(setq ido-default-buffer-method 'selected-window)
#+END_SRC
-* Minimize maximum minibuffer height for ido :ido:
+* Minimize maximum minibuffer height for ido :ido:
I hate it when the minibuffer gets bigger than one line, so don't
let ido do that.
@@ -689,7 +700,7 @@
(setq ido-max-window-height 1)
#+END_SRC
-* Don't save history for ido :ido:
+* Don't save history for ido :ido:
I don't see the point in saving that history.
@@ -697,7 +708,7 @@
(setq ido-save-directory-list-file nil)
#+END_SRC
-* Turn on ido-mode :ido:
+* Turn on ido-mode :ido:
=ido-mode= is an excellent file and buffer selection tool, it
improves upon regular selection in numerous ways.
@@ -706,7 +717,7 @@
(ido-mode)
#+END_SRC
-* Exclude functions from ido-ubiquitous :ido_ubiquitous:
+* Exclude functions from ido-ubiquitous :ido_ubiquitous:
Not all functions work well with =ido-ubiquitous-mode=, like
=org-refile=, so exclude them from using =ido-ubiquitous-mode=.
@@ -715,7 +726,7 @@
(setq ido-ubiquitous-command-exceptions '(org-refile org-capture-refile))
#+END_SRC
-* Enable ido-ubiquitous-mode :ido_ubiquitous:
+* Enable ido-ubiquitous-mode :ido_ubiquitous:
=ido-ubiquitous-mode= lets you use ido for almost anything! Anything
which looks and acts like file or buffer selection anyway.
@@ -727,7 +738,7 @@
(add-hook 'emacs-startup-hook 'ido-ubiquitous-mode)
#+END_SRC
-* Enable idomenu :idomenu:
+* Enable idomenu :idomenu:
Imenu is an awesome feature, but since I don't use any menus it is
a little lost on me. =idomenu= uses Imenu, but shows it in an
@@ -737,7 +748,7 @@
(global-set-key (kbd "M-n") 'idomenu)
#+END_SRC
-* Use electric default in minibuffer :minibuffer:
+* Use electric default in minibuffer :minibuffer:
The =minibuffer-electric-default-mode= hides the default value if you
start typing. This leaves more room for typing. I also want the
@@ -748,7 +759,7 @@
(minibuffer-electric-default-mode)
#+END_SRC
-* Don't show help message on empty parts :mode_line:
+* Don't show help message on empty parts :mode_line:
When hovering the mouse over empty parts of the mode-line, just show
nothing, don't clutter up my echo area and ~*Messages*~ buffer.
@@ -757,7 +768,7 @@
(setq mode-line-default-help-echo "")
#+END_SRC
-* Enable jedi :jedi:
+* Enable jedi :jedi:
jedi is an interesting auto-completion program for the Python
programming language. On archlinux the program you usually want to
@@ -769,7 +780,7 @@
(add-hook 'python-mode-hook 'jedi:setup)
#+END_SRC
-* Don't use a tooltip :jedi:
+* Don't use a tooltip :jedi:
The coolest thing about jedi is its eldoc-like argument display. If
it can figure out what the arguments are they're shown. But please
@@ -779,7 +790,7 @@
(setq jedi:tooltip-method nil)
#+END_SRC
-* Org initialization :org:
+* Org initialization :org:
Since my intialization for =org-mode= got so big, I moved it to a
separate file. This file should be loaded after the =org= module
@@ -797,7 +808,7 @@
(global-set-key (kbd "C-M-z") 'ext:indent-defun)
#+END_SRC
-* Close term buffer after exit :term:
+* Close term buffer after exit :term:
When quitting the process in a term buffer, in other words, when
quitting the shell, kill the buffer. Killing the shell, but not
@@ -823,7 +834,7 @@
(global-set-key (kbd "C-c d") 'oni:downcase-prev)
#+END_SRC
-* Turn off usage of tabs for vala-mode :vala:
+* Turn off usage of tabs for vala-mode :vala:
Somehow =vala-mode= thinks it's ok for it to decide that it's users
should always use tabs. As far as I'm aware the vala compiler has
@@ -833,7 +844,7 @@
(add-hook 'vala-mode-hook 'oni:vala-mode-func)
#+END_SRC
-* Use smex :smex:
+* Use smex :smex:
Smex is to command selection what ido is to file selection. Very
similar too, it was written with ido specifically in mind.
@@ -843,7 +854,7 @@
(global-set-key (kbd "C-M-x") 'smex-major-mode-commands)
#+END_SRC
-* Autoload define-slime-contrib :js2:
+* Autoload define-slime-contrib :js2:
=slime-js-minor-mode= uses this function but forgets to require its
module, so I set up an autoload function for when I need it and
@@ -872,7 +883,7 @@
(autoload 'xmodmap-mode "xmodmap-mode" nil t)
#+END_SRC
-* Uniquify buffers better :uniquify:
+* Uniquify buffers better :uniquify:
The default way to make sure buffer names are unique is rather
uninformative, =uniquify= has a few better options.
@@ -890,7 +901,7 @@
tab-width 4)
#+END_SRC
-* Place fill-column-indicator :fill_column_indicator:
+* Place fill-column-indicator :fill_column_indicator:
Place the ruler one character farther than what I usually prefer to
have my lines wrap to, this will indicate where it should not cross,
@@ -908,7 +919,7 @@
(setq-default indent-tabs-mode nil)
#+END_SRC
-* Don't warn about mumamo :php:
+* Don't warn about mumamo :php:
I haven't yet seen a mode that offers good multiple major modes
support. And so I don't use any, so don't warn me that I don't.
@@ -939,7 +950,7 @@
(setq-default truncate-lines t)
#+END_SRC
-* Send appointments to jabber :jabber:
+* Send appointments to jabber :jabber:
When an appointment is coming up, show me in a buffer, but also
send a message to my jabber account.
@@ -948,7 +959,7 @@
(setq appt-disp-window-function #'oni:appt-display-window-and-jabber)
#+END_SRC
-* Don't display diary when appt is initialized :appt:
+* Don't display diary when appt is initialized :appt:
If the diary is displayed after the initialization of =appt= I would
get a diary buffer each time I load =org-mode=. Since I don't use the
@@ -989,7 +1000,7 @@
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
#+END_SRC
-* Automatically determine browser :browse:
+* Automatically determine browser :browse:
Use the =BROWSER= environment variable to figure out which browser to
call for =browse-url=. And use the =browse-url-generic= function to open
@@ -1000,7 +1011,7 @@
browse-url-generic-program (getenv "BROWSER"))
#+END_SRC
-* Customize C indentation :c:
+* Customize C indentation :c:
When writing C code, when calling a function I prefer the
indentation to look like:
@@ -1042,7 +1053,7 @@
c-lineup-gnu-DEFUN-intro-cont)))
#+END_SRC
-* Move customize settings into their own file :custom:
+* Move customize settings into their own file :custom:
Any settings I change using the customize interface should go into
a separate file. My ~init.el~ is under version control and I don't
@@ -1069,7 +1080,7 @@
(font . "Inconsolata:pixelsize=18")))
#+END_SRC
-* Stop elnode from running automatically :elnode:
+* Stop elnode from running automatically :elnode:
I like elnode, but it really should stop starting itself up every
time I start emacs. Not only can this cause problems with trying
@@ -1107,7 +1118,7 @@
(setq gnus-init-file "~/.emacs.d/gnus")
#+END_SRC
-* Automatically update gtags TAGS :gtags:
+* Automatically update gtags TAGS :gtags:
Before there was this option I had some complicated function to do
the same thing from somewhere, now that isn't necessary anymore.
@@ -1127,7 +1138,7 @@
(setq help-at-pt-display-when-idle t)
#+END_SRC
-* Set inferior lisp program to SBCL :lisp:
+* Set inferior lisp program to SBCL :lisp:
SBCL seems like a very good Lisp implementation to use, widely
supported by packagers too.
@@ -1162,7 +1173,7 @@
initial-scratch-message nil)
#+END_SRC
-* Store jabber avatar cache under .emacs.d :jabber:
+* Store jabber avatar cache under .emacs.d :jabber:
Even though I don't use avatars anymore I don't want ~jabber.el~
creating directories all over the place, so just to be safe I put
@@ -1172,7 +1183,7 @@
(setq jabber-avatar-cache-directory "~/.emacs.d/jabber-avatars/")
#+END_SRC
-* Setup formats :jabber:
+* Setup formats :jabber:
Most of the time I prefer having my message start at the beginning
of the line, in case someone sends me a piece of code or I send
@@ -1192,7 +1203,7 @@
jabber-groupchat-prompt-format "%t %u --\n")
#+END_SRC
-* Don't use avatars :jabber:
+* Don't use avatars :jabber:
I did for a while, but since there is no concensus over what is
good and what is bad, buffers start looking messy, so I just
@@ -1205,7 +1216,7 @@
jabber-vcard-avatars-retrieve nil)
#+END_SRC
-* Don't fill :jabber:
+* Don't fill :jabber:
Just like ERC, don't fill lines so that =visual-line-mode= can do
its thing.
@@ -1214,7 +1225,7 @@
(setq jabber-chat-fill-long-lines nil)
#+END_SRC
-* Don't send chatstates :jabber:
+* Don't send chatstates :jabber:
Don't let people know what I'm doing, don't send them information
on that I'm typing or not, etc. This isn't very useful and it
@@ -1225,7 +1236,7 @@
(setq jabber-chatstates-confirm nil)
#+END_SRC
-* Autojoin some channels :jabber:
+* Autojoin some channels :jabber:
Just one, really, the only one I'm in.
@@ -1233,7 +1244,7 @@
(setq jabber-muc-autojoin '("aethon@muc.ryuslash.org"))
#+END_SRC
-* Keep the roster buffer clean :jabber:
+* Keep the roster buffer clean :jabber:
Most of the time I really don't need to see the keybindings for the
roster buffers, so hide them initially.