From 3890fd2d0c603b3421cf6d21212c910f8803af32 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Mon, 22 Jun 2020 10:22:13 +0200 Subject: Tweak Emacs configuration some more Take advantage of recent (Emacs 28) additions to project.el to make a convenient "magit-to-project" command. Some C-c p bindings are now redundant with the new C-x p keymap; keep them for a bit, as Emacs 28 is not coming out anytime soon. Add an ibuffer group for "messaging" buffers. Set lua indentation to 2 spaces; the Lua Style Guide[1] says that this convention is used in many learning resources; this is also what pandoc filters use AFAICT. [1]: http://lua-users.org/wiki/LuaStyleGuide Org 9.4 introduces a new face for DONE headlines; I think the DONE keyword face is enough to distinguish these headlines, so I'll turn off that feature. --- .emacs | 11 ++++++++++- .emacs-custom.el | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.emacs b/.emacs index 2b2ffdf..8d68ccb 100644 --- a/.emacs +++ b/.emacs @@ -118,6 +118,11 @@ (let ((default-directory (my/project-root))) (call-interactively f)))) +(defun my/magit-project () + (interactive) + (require 'project) + (magit-status (project-prompt-project-dir))) + (global-set-key (kbd "C-c c") 'compile) (global-set-key (kbd "C-c e f") 'auto-fill-mode) (global-set-key (kbd "C-c i t") (my/make-toggle-input-method 'TeX)) @@ -127,6 +132,7 @@ (global-set-key (kbd "C-c k !") 'my/kill-ring-shell) (global-set-key (kbd "C-c m") 'man) (global-set-key (kbd "C-c p c") (my/make-project-wide 'compile)) +(global-set-key (kbd "C-c p g") 'my/magit-project) (global-set-key (kbd "C-c p !") (my/make-project-wide 'shell-command)) (global-set-key (kbd "C-c p &") (my/make-project-wide 'async-shell-command)) (global-set-key (kbd "C-c p f") 'project-find-file) @@ -310,7 +316,10 @@ (mode . lisp-interaction-mode))) ("Programming" (derived-mode . prog-mode)) ("Folders" (mode . dired-mode)) - ("Chat" (mode . erc-mode)) + ("Messaging" + (or (mode . erc-mode) + (mode . message-mode) + (derived-mode . gnus-mode))) ("Documentation" (or (mode . Info-mode) (mode . Man-mode) diff --git a/.emacs-custom.el b/.emacs-custom.el index d16cc94..973e602 100644 --- a/.emacs-custom.el +++ b/.emacs-custom.el @@ -45,6 +45,7 @@ '(isearch-allow-scroll t) '(isearch-lazy-count t) '(line-number-display-limit-width 2000) + '(lua-indent-level 2) '(magit-diff-refine-hunk t) '(magit-ediff-dwim-show-on-hunks t) '(magit-log-arguments '("--graph" "--color" "--decorate" "-n256")) @@ -56,6 +57,7 @@ '(markdown-indent-on-enter 'indent-and-new-item) '(menu-bar-mode nil) '(minibuffer-depth-indicate-mode t) + '(org-fontify-done-headline nil) '(org-fontify-quote-and-verse-blocks t) '(org-startup-indented t) '(package-archives -- cgit v1.2.3