summaryrefslogtreecommitdiff
path: root/.emacs
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-02-01 21:22:34 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-02-01 21:22:34 +0100
commitbb9776e51455faac274bc942977078f1b1806f28 (patch)
tree652abbc44448e6c925b6e6d472c7bbdec2c549c1 /.emacs
parent9f0615ccb71b902a3ea3ea975095c2e952c0f0de (diff)
downloaddotfiles-bb9776e51455faac274bc942977078f1b1806f28.tar.xz
Tweak a bunch of Emacs settings
* Use Custom to set whitespace style. As much as I dislike using Custom for lists where I just want to add/remove a couple of elements, the previous method introduced a subtle bug where visiting a diff buffer, *then* activating whitespace-mode resulted in diff-mode's whitespace style applying instead of mine. Something to do with diff-setup-whitespace I guess. * Make Org comply with RET/C-j conventions in the rest of Emacs. Since Emacs 24.4, by virtue of electric-indent-mode being enabled by default, RET is the "smart newline" key which handles indentation, and C-j is the "dumb newline" key which simply inputs character 0x0A. * Stop popping another frame for Ediff's control buffer. The popup frame needs its own .Xresources entry. Sometimes it disappears behind the system tray. Having another window allows other-windowing. * Make line-number-mode try harder with long lines. * Change the scroll logic. scroll-conservatively > 100 tells Emacs to *never ever* recenter point, which is annoying when jumping to e.g. a search result or a tags definition. scroll-conservatively = n < 100 tells Emacs to recenter when scrolling needs to move more than n lines, and to scroll only m lines when m≤n. * And some other stuff.
Diffstat (limited to '.emacs')
-rw-r--r--.emacs13
1 files changed, 3 insertions, 10 deletions
diff --git a/.emacs b/.emacs
index fc4e0de..3d48a4a 100644
--- a/.emacs
+++ b/.emacs
@@ -321,17 +321,10 @@
(lambda ()
(ibuffer-switch-to-saved-filter-groups "my/ibuffer-groups")))
-
-;; Minor modes configuration
-
-;; See erc-modules customization above for an explanation on these
-;; shenanigans. tl;dr I do not want to maintain an exhaustive list of
-;; whitespace elements and risk missing out on future additions to the
-;; default value; I just want to remove one specific item.
-(eval-after-load 'whitespace
+(eval-after-load 'org-keys
'(progn
- (let ((new-items (remq 'lines whitespace-style)))
- (customize-set-variable 'whitespace-style new-items))))
+ (define-key org-mode-map (kbd "C-j") 'org-return)
+ (define-key org-mode-map (kbd "RET") 'org-return-indent)))
;; Helper functions and miscellaneous settings.