From 945105e5d3b3149147da880df75ba3d839987f55 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sun, 19 Mar 2023 12:58:23 +0000 Subject: Add bufferlo and small tweaks --- .gitmodules | 3 +++ init.el | 47 ++++++++++++++++++++++++++++++++++++++--------- packages/bufferlo | 1 + 3 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 .gitmodules create mode 160000 packages/bufferlo diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a6974cd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "packages/bufferlo"] + path = packages/bufferlo + url = https://github.com/florommel/bufferlo diff --git a/init.el b/init.el index 21a26f6..ab13844 100644 --- a/init.el +++ b/init.el @@ -181,8 +181,8 @@ Should be one of `:white-split', `:modified' or `:default'") (when ymh/macos-p (cl-case ymh/keyboard (:white-split (setq mac-right-option-modifier 'hyper - mac-command-modifier 'super - mac-option-modifier 'meta)) + mac-command-modifier 'meta + mac-option-modifier 'super)) (:modified (setq mac-right-option-modifier 'meta mac-command-modifier 'super mac-option-modifier 'hyper)) @@ -287,6 +287,7 @@ https://yannherklotz.com")) :init (setq tab-bar-show nil) (setq tab-bar-select-tab-modifiers '(meta)) + (setq tab-bar-new-tab-choice "*scratch*") :config (tab-bar-mode 1)) @@ -416,10 +417,7 @@ https://yannherklotz.com")) ("g" . password-store-generate))) (use-package magit - :ensure t - :init - (when ymh/macos-p - (setq magit-git-executable "/usr/local/bin/git"))) + :ensure t) (use-package org :init @@ -542,7 +540,7 @@ https://yannherklotz.com")) :bind ("C-c c" . org-capture) :init (setq org-capture-templates - `(("t" "Todo" entry (file ,(ymh/expand-bib-file "inbox.org")) + `(("t" "Todo" entry (file ,(ymh/expand-org-file "inbox.org")) "* TODO %? :PROPERTIES: :ID: %(org-id-uuid) @@ -550,7 +548,7 @@ https://yannherklotz.com")) :LOGBOOK: - State \"TODO\" from \"\" %U :END:" :empty-lines 1) - ("l" "Link Todo" entry (file ,(ymh/expand-bib-file "inbox.org")) + ("l" "Link Todo" entry (file ,(ymh/expand-org-file "inbox.org")) "* TODO %? :PROPERTIES: :ID: %(org-id-uuid) @@ -560,7 +558,7 @@ https://yannherklotz.com")) :END: %a" :empty-lines 1) - ("c" "Contacts" entry (file ,(ymh/expand-bib-file "contacts.org")) + ("c" "Contacts" entry (file ,(ymh/expand-org-file "contacts.org")) "* %(org-contacts-template-name) :PROPERTIES: :EMAIL: %(org-contacts-template-email) @@ -637,6 +635,7 @@ https://yannherklotz.com")) (lambda () (prettify-symbols-mode -1)))) (use-package direnv + :if (executable-find "direnv") :ensure t :config (direnv-mode)) @@ -1080,6 +1079,36 @@ https://yannherklotz.com")) (use-package rust-mode :ensure t) +(use-package bufferlo + :init + (unless (package-installed-p 'bufferlo) + (if ymh/emacs-29-p + (package-vc-install + '(bufferlo + . (:url "https://github.com/florommel/bufferlo"))) + (package-install-file + (expand-file-name "packages/bufferlo" user-emacs-directory)))) + :bind (("C-x b" . bufferlo-switch-to-buffer) + ("C-x C-b" . bufferlo-ibuffer) + :map ymh-map + ("f" . bufferlo-bury)) + :demand t + :config + (bufferlo-mode 1)) + +(use-package org-pdftools + :ensure t + :hook (org-mode . org-pdftools-setup-link)) + +(use-package flymake + :bind (:map flymake-mode-map + ("C-c f n" . flymake-goto-next-error) + ("C-c f p" . flymake-goto-prev-error) + ("C-c f b" . flymake-show-buffer-diagnostics) + ("C-c f f" . flymake-mode) + ("C-c f l" . flymake-switch-to-log-buffer) + ("C-c f s" . flymake-start))) + (setq gc-cons-threshold (* 1024 1024 10)) (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) diff --git a/packages/bufferlo b/packages/bufferlo new file mode 160000 index 0000000..e40613c --- /dev/null +++ b/packages/bufferlo @@ -0,0 +1 @@ +Subproject commit e40613cbbc941d5b29876046f7661ca0e62c48a6 -- cgit