#+begin_src emacs-lisp
;;; esy.el --- GNU Emacs configuration -*- lexical-binding: t -*-
- ;; Copyright (C) 2021-2022 Eshel Yaron
+ ;; Copyright (C) 2021-2023 Eshel Yaron
;; Author: Eshel Yaron <eshelshay.yaron@gmail.com>
;; URL: https://eshelyaron.com/esy.html
;; You should have received a copy of the GNU General Public License
;; along with this file. If not, see <http://www.gnu.org/licenses/>.
- ;;; Package-Requires: ((emacs "29"))
+ ;;; Package-Requires: ((emacs "30"))
;;; Commentary:
;; Tangled version of esy.org
;;; Code:
bbdb
corfu
define-word
+ denote
+ devdocs
diff-hl
ef-themes
elfeed
embark-consult
+ emms
gnu-elpa-keyring-update
gnuplot
graphviz-dot-mode
org-default-notes-file esy/inbox-path
org-agenda-start-on-weekday 0
org-ellipsis "…"
+ org-use-speed-commands t
org-todo-keywords '((sequence
"TODO(t)"
"BLOCKED(b@/!)"
"|"
"DONE(d!)"
"CANCELED(c@)"))
+ org-tag-alist '((:startgroup)
+ ("work" . ?w)
+ ("studies" . ?s)
+ ("esols" . ?e)
+ ("personal" . ?p)
+ (:endgroup))
org-babel-load-languages '((emacs-lisp . t)
(shell . t)
(sql . t)
org-confirm-babel-evaluate nil
org-log-done 'time
org-log-into-drawer t
+ org-fast-tag-selection-single-key 'expert
org-use-fast-todo-selection 'expert
org-clock-in-switch-to-state "INPROGRESS")
(add-to-list 'org-src-lang-modes '("prolog" . sweeprolog))
(keymap-global-set "C-c l" #'org-store-link)
(keymap-global-set "C-c a" #'org-agenda)
(keymap-global-set "C-c !" #'consult-flymake)
+ (keymap-global-set "C-c C" #'openai-chat)
+ (keymap-global-set "C-c D" #'denote)
(keymap-global-set "C-c E" #'elfeed)
(keymap-global-set "C-c G" #'gnus)
(keymap-global-set "C-c M" #'mastodon)
(keymap-global-set "C-c S" #'esy/vterm-at)
(keymap-global-set "C-c V" #'vertalen-at-point)
(keymap-global-set "C-c F" #'esy/find-esy-org)
+
#+end_src
** Custom kill command :cmd:
#+begin_src emacs-lisp
(defun esy/vterm-mode-hook-function ()
- (setq-local term-prompt-regexp "^[^#$%>\n]*[#$%>] *"
- global-hl-line-mode nil))
+ (setq-local term-prompt-regexp "^[^#$%>\n]*[#$%>] *"))
(defun esy/vterm-with (arg shell)
(interactive
(defun esy/vterm-at (arg dir)
(interactive
- (list current-prefix-arg (read-directory-name "Start vterm in directory: " )))
- (require 'vterm)
+ (list current-prefix-arg
+ (read-directory-name "Start vterm in directory: " )))
(let ((default-directory dir))
(vterm arg)))
vterm-use-vterm-prompt-detection-method t)
(add-to-list 'vterm-tramp-shells '("kubernetes" "/bin/bash"))
(add-hook 'vterm-mode-hook #'esy/vterm-mode-hook-function))
-
- (defun esy/ttyper (arg)
- "Start `ttyper' in a `vterm-mode' buffer."
- (interactive "P")
- (let ((vterm-shell (executable-find "ttyper")))
- (vterm arg)))
#+end_src
** Elfeed
(setq elfeed-feeds
'(
"https://ajroach42.com/feed.xml"
+ "https://cdn.jwz.org/blog/feed/"
"https://jcm.libsyn.com/rss/"
"https://betterappsec.com/feed"
"https://emacs.dyerdwelling.family/index.xml"
"https://archive.casouri.cc/note/atom.xml"
"https://cestlaz.github.io/rss.xml"
"https://drewdevault.com/blog/index.xml"
+ "https://evanhahn.com/blog/index.xml"
+ "https://alexschroeder.ch/wiki/feed/full/"
+ "https://usesthis.com/feed.atom"
+ "https://xeiaso.net/blog.rss"
+ "https://changelog.complete.org/feed"
"https://herman.bearblog.dev/feed/"
"https://lwn.net/headlines/rss"
"https://maggieappleton.com/rss.xml"
"https://bitspook.in/blog/feed.xml"
"https://flower.codes/feed.xml"
"https://www.cs.uni.edu/~wallingf/blog/atom.xml"
+ "https://matklad.github.io/feed.xml"
+ "https://www.evalapply.org/index.xml"
+ "https://www.stilldrinking.org/rss/feed.xml"
+ "https://fasterthanli.me/index.xml"
+ "https://kitchen-sink.kwakk.info/feed"
+ "https://lars.ingebrigtsen.no/feed"
)))
#+end_src
+** denote
+
+#+begin_src emacs-lisp
+ (setq denote-directory "~/Notes")
+#+end_src
** eww :www:
:PROPERTIES:
:CUSTOM_ID: eww
#+begin_src emacs-lisp
(with-eval-after-load 'eww
- (setq eww-auto-rename-buffer 'title
- browse-url-browser-function #'eww-browse-url))
+ (setq eww-auto-rename-buffer 'title)
+ (with-eval-after-load 'browse-url
+ (setq browse-url-browser-function #'eww-browse-url
+ browse-url-generic-program "open")))
- (with-eval-after-load 'shr
- (setq shr-use-colors nil))
+ ;; (with-eval-after-load 'shr
+ ;; (setq shr-use-colors nil))
#+end_src
*** Prompt for URL with history-based completion
(add-to-list 'auto-mode-alist '("\\.ya?ml\\'" . yaml-ts-mode))
#+end_src
+** JSON
+:PROPERTIES:
+:CUSTOM_ID: json
+:END:
+
+#+begin_src emacs-lisp
+ (add-to-list 'auto-mode-alist '("\\.json\\'" . json-ts-mode))
+#+end_src
+
** Rust
:PROPERTIES:
:CUSTOM_ID: rust
(setq global-auto-revert-non-file-buffers t
auto-revert-verbose nil
query-about-changed-file t
- kill-do-not-save-duplicates t)
+ kill-do-not-save-duplicates t
+ show-trailing-whitespace t)
(global-auto-revert-mode)
(global-whitespace-cleanup-mode 1)
#+end_src