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 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to '.emacs') 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) -- cgit v1.2.3