diff options
author | Franck Cuny <franck@fcuny.net> | 2024-08-30 17:55:32 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-08-30 17:55:32 -0700 |
commit | b73353dba56c220ee68feceb92cf15d3b17d6dfb (patch) | |
tree | c47a67fd964bd85f32293ae371cd759d6326e8f1 | |
parent | move a few more things to init-window.el (diff) | |
download | emacs.d-b73353dba56c220ee68feceb92cf15d3b17d6dfb.tar.gz |
a mix of stuff for denote / org / dired
-rw-r--r-- | config/init-base.el | 10 | ||||
-rw-r--r-- | config/init-notes.el | 113 | ||||
-rw-r--r-- | config/init-ui.el | 19 | ||||
-rw-r--r-- | config/init-writing.el | 77 | ||||
-rw-r--r-- | init.el | 1 |
5 files changed, 125 insertions, 95 deletions
diff --git a/config/init-base.el b/config/init-base.el index 9f9e596..d2c83cd 100644 --- a/config/init-base.el +++ b/config/init-base.el @@ -102,9 +102,11 @@ (use-package dired :ensure nil :defer t - :config - (setq dired-omit-files "^__pycache__$") + :hook (dired-mode . dired-omit-mode) + :bind (:map dired-mode-map + ( "." . dired-omit-mode)) :custom + (dired-omit-files (rx (seq bol "."))) (dired-use-ls-dired t) (insert-directory-program "/etc/profiles/per-user/fcuny/bin/ls") (dired-clean-up-buffers-too nil) @@ -116,10 +118,6 @@ (dired-no-confirm '(byte-compile chgrp chmod chown copy hardlink symlink touch))) -(use-package dired-x - :after dired - :hook ((dired-mode . dired-omit-mode))) - (defun my/rename-this-buffer-and-file () "Renames current buffer and file it is visiting." (interactive) diff --git a/config/init-notes.el b/config/init-notes.el new file mode 100644 index 0000000..861051d --- /dev/null +++ b/config/init-notes.el @@ -0,0 +1,113 @@ +;;; init-notes.el --- for notes and tasks -*- lexical-binding: t -*- +;; Author: Franck Cuny <franck@fcuny.net> + +;;; Commentary: + +;; commentary + +;;; Code: + +(use-package denote + :ensure t + :init + (use-package denote-org-extras + :ensure nil) + (use-package denote-journal-extras + :ensure nil) + :bind (("C-c n r" . denote-rename-file) + ("C-c n t" . denote-journal-extras-new-or-existing-entry) + ("C-c n n" . denote-subdirectory)) + :custom + (denote-rename-buffer-mode 1) + (denote-journal-extras-directory (concat denote-directory "journal/" (format-time-string "%Y"))) + (denote-file-type "org") + (denote-dired-directories (list denote-directory)) + (denote-dired-directories-include-subdirectories t) + (denote-journal-extras-title-format 'day-date-month-year)) + +(use-package org + :hook + (org-mode . turn-on-flyspell) + (org-mode . visual-line-mode) + (org-mode . org-indent-mode) + :custom + (org-directory "~/Documents/notes") + (org-default-notes-file (expand-file-name "inbox.org" org-directory)) + + (org-startup-folded t) + (org-startup-indented t) + (org-startup-with-inline-images t) + + ;; enable todo and checkbox dependencies + (org-enforce-todo-dependencies t) + (org-enforce-todo-checkbox-dependencies t) + + ;; quick access for todo states + (org-todo-keywords + '((sequence "TODO(t)" "NEXT(n)" "WAITING(w!)" "|" "DONE(d)") + (sequence "|" "CANCELLED(c)"))) + + (org-log-done 'time) + (org-log-into-drawer t) + + ;; org-refile options + (org-refile-allow-creating-parent-nodes (quote confirm)) + (org-refile-use-outline-path 'file + org-outline-path-complete-in-steps nil) + + (org-hide-emphasis-markers t) + (org-hide-leading-stars t) + (org-pretty-entities t) + + (org-return-follows-link t) + + (org-export-backends '(html md)) + + (org-imenu-depth 4) + + (org-insert-heading-respect-content t) + + (org-outline-path-complete-in-steps nil) + + (org-src-fontify-natively t) + (org-src-preserve-indentation t) + (org-src-tab-acts-natively t) + (org-src-window-setup 'current-window) + + (org-yank-adjusted-subtrees t) + + (org-structure-template-alist + '(("s" . "src") + ("E" . "src emacs-lisp") + ("p" . "src python") + ("e" . "example") + ("q" . "quote") + ("V" . "verbatim")))) + +(use-package org-bullets + :ensure t + :hook (org-mode . org-bullets-mode)) + +(use-package org-auto-tangle + :ensure t + :hook (org-mode . org-auto-tangle-mode)) + +(use-package org-babel + :no-require t + :after (org) + :config + (org-babel-do-load-languages + 'org-babel-load-languages + '((python . t) + (emacs-lisp . t) + (calc . t) + (shell . t) + (sql . t) + (dot . t))) + (remove-hook 'kill-emacs-hook 'org-babel-remove-temporary-directory) + (advice-add 'org-babel-edit-prep:emacs-lisp :after + #'(lambda (_info) (run-hooks 'emacs-lisp-mode-hook)))) + +(provide 'init-notes) + +;;; init-notes.el ends here diff --git a/config/init-ui.el b/config/init-ui.el index 7aa8946..aac576e 100644 --- a/config/init-ui.el +++ b/config/init-ui.el @@ -55,15 +55,15 @@ ;; https://monaspace.githubnext.com (set-face-attribute 'default nil :font "Monaspace Argon" - :height 150) + :height 160) (set-face-attribute 'fixed-pitch nil :font "Monaspace Argon" - :height 150) + :height 160) (set-face-attribute 'variable-pitch nil :font "Monaspace Radon" - :height 150) + :height 160) (use-package ef-themes :ensure t @@ -76,15 +76,10 @@ (ef-themes-select 'ef-light) (setq ef-themes-to-toggle '(ef-cyprus ef-deuteranopia-light)) (setq ef-themes-headings ; read the manual's entry or the doc string - '((0 . (variable-pitch light 1.9)) - (1 . (variable-pitch light 1.8)) - (2 . (variable-pitch regular 1.7)) - (3 . (variable-pitch regular 1.6)) - (4 . (variable-pitch regular 1.5)) - (5 . (variable-pitch 1.4)) ; absence of weight means `bold' - (6 . (variable-pitch 1.3)) - (7 . (variable-pitch 1.2)) - (t . (variable-pitch 1.1))))) + '((0 . (variable-pitch light 1.3)) + (1 . (variable-pitch light 1.2)) + (2 . (variable-pitch regular 1.1)) + (t . (variable-pitch 1.0))))) (provide 'init-ui) ;;; init-ui.el ends here diff --git a/config/init-writing.el b/config/init-writing.el index e54d605..ee7fb19 100644 --- a/config/init-writing.el +++ b/config/init-writing.el @@ -33,83 +33,6 @@ :init (setq markdown-command "multimarkdown")) -(use-package org - :hook - (org-mode . turn-on-flyspell) - (org-mode . visual-line-mode) - (org-mode . org-indent-mode) - :custom - ;;; general settings - (org-startup-folded t) - (org-startup-indented t) - (org-hide-emphasis-markers t) - (org-hide-leading-stars t) - (org-pretty-entities t) - (org-return-follows-link t) - (org-startup-with-inline-images t) - (org-export-backends '(html md)) - (org-imenu-depth 4) - (org-insert-heading-respect-content t) - (org-outline-path-complete-in-steps nil) - (org-src-fontify-natively t) - (org-src-preserve-indentation t) - (org-src-tab-acts-natively t) - (org-src-window-setup 'current-window) - (org-yank-adjusted-subtrees t) - (org-structure-template-alist - '(("s" . "src") - ("E" . "src emacs-lisp") - ("p" . "src python") - ("e" . "example") - ("q" . "quote") - ("V" . "verbatim"))) - :config - (font-lock-add-keywords 'org-mode - '(("^ *\\(-\\) " - (0 (ignore (compose-region (match-beginning 1) (match-end 1) "•"))))))) - -(use-package org-bullets - :ensure t - :hook (org-mode . org-bullets-mode)) - -(use-package org-auto-tangle - :ensure t - :hook (org-mode . org-auto-tangle-mode)) - -(use-package org-babel - :no-require t - :after (org) - :config - (org-babel-do-load-languages - 'org-babel-load-languages - '((python . t) - (emacs-lisp . t) - (calc . t) - (shell . t) - (sql . t) - (dot . t))) - - (remove-hook 'kill-emacs-hook 'org-babel-remove-temporary-directory) - - (advice-add 'org-babel-edit-prep:emacs-lisp :after - #'(lambda (_info) (run-hooks 'emacs-lisp-mode-hook)))) - -(use-package ox-gfm - :ensure t - :after org) - -(use-package ox-md - :after org) - -(use-package ox-pandoc - :ensure t - :after org - :preface - (defun markdown-to-org-region (start end) - "Convert region from markdown to org, replacing selection" - (interactive "r") - (shell-command-on-region start end "pandoc -f markdown -t org" t t))) - (provide 'init-writing) ;;; init-writing.el ends here diff --git a/init.el b/init.el index bf273d0..c881111 100644 --- a/init.el +++ b/init.el @@ -44,6 +44,7 @@ (require 'init-eshell) (require 'init-writing) (require 'init-window) +(require 'init-notes) (report-time-since-load) |