.emacs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ;; Added by Package.el. This must come before configurations of
  2. ;; installed packages. Don't delete this line. If you don't want it,
  3. ;; just comment it out by adding a semicolon to the start of the line.
  4. ;; You may delete these explanatory comments.
  5. (package-initialize)
  6. (global-set-key (kbd "C-x M-r") 'rename-buffer)
  7. (global-set-key (kbd "C-c a") 'org-agenda)
  8. (global-set-key (kbd "C-c q") 'auto-fill-mode)
  9. (add-to-list 'package-archives
  10. (cons "nongnu" (format "http%s://elpa.nongnu.org/nongnu/"
  11. (if (gnutls-available-p) "s" ""))))
  12. (add-to-list 'package-archives
  13. (cons "melpa" (format "http%s://melpa.org/packages/"
  14. (if (gnutls-available-p) "s" ""))))
  15. (custom-set-variables
  16. ;; custom-set-variables was added by Custom.
  17. ;; If you edit it by hand, you could mess it up, so be careful.
  18. ;; Your init file should contain only one such instance.
  19. ;; If there is more than one, they won't work right.
  20. '(ansi-color-names-vector
  21. ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
  22. '(backup-directory-alist `(("." \, (concat user-emacs-directory "backups"))))
  23. '(custom-enabled-themes '(gruvbox-dark-hard))
  24. '(custom-safe-themes
  25. '("6b5c518d1c250a8ce17463b7e435e9e20faa84f3f7defba8b579d4f5925f60c1" "f27c3fcfb19bf38892bc6e72d0046af7a1ded81f54435f9d4d09b3bff9c52fc1" default))
  26. '(evil-want-C-u-scroll t)
  27. '(initial-scratch-message
  28. ";; This buffer is for text that is not saved, and for Lisp evaluation.
  29. ")
  30. '(menu-bar-mode nil)
  31. '(org-agenda-files '("."))
  32. '(package-selected-packages '(elpher evil gruvbox-theme))
  33. '(tool-bar-mode nil))
  34. (setq split-height-threshold nil)
  35. (setq split-width-threshold 160)
  36. (require 'evil)
  37. (evil-set-initial-state 'term-mode 'emacs)
  38. (evil-mode 1)
  39. (server-start)
  40. (add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
  41. (setenv "EDITOR" "emacsclient")
  42. (custom-set-faces
  43. ;; custom-set-faces was added by Custom.
  44. ;; If you edit it by hand, you could mess it up, so be careful.
  45. ;; Your init file should contain only one such instance.
  46. ;; If there is more than one, they won't work right.
  47. '(default ((t (:height 105 :width normal :foundry "JB" :family "JetBrainsMono Nerd Font")))))
  48. (require 'org)
  49. ;; support gopher and gemini links for org
  50. ;; https://list.orgmode.org/87k1vsiv7t.fsf@nicolasgoaziou.fr/t/
  51. (defun org-link-gopher-export-link (link desc format)
  52. "Create export version of LINK and DESC to FORMAT."
  53. (let ((link (concat "gopher:" link)))
  54. (cond
  55. ((eq format 'html)
  56. (format "<a href=\"%s\">%s</a>" link desc))
  57. ((eq format 'latex)
  58. (format "\\href{%s}{%s}" link desc))
  59. (t
  60. (format "[%s](%s)" desc link)))))
  61. (defun org-link-gemini-export-link (link desc format)
  62. "Create export version of LINK and DESC to FORMAT."
  63. (let ((link (concat "gemini:" link)))
  64. (cond
  65. ((eq format 'html)
  66. (format "<a href=\"%s\">%s</a>" link desc))
  67. ((eq format 'latex)
  68. (format "\\href{%s}{%s}" link desc))
  69. (t
  70. (format "[%s](%s)" desc link)))))
  71. (org-link-set-parameters "gopher" :export #'org-link-gopher-export-link)
  72. (org-link-set-parameters "gemini" :export #'org-link-gemini-export-link)
  73. (add-hook 'org-mode-hook 'turn-on-auto-fill)