diff options
author | jjanzen <jjanzen@jjanzen.ca> | 2025-03-13 19:11:03 -0500 |
---|---|---|
committer | jjanzen <jjanzen@jjanzen.ca> | 2025-03-13 19:11:03 -0500 |
commit | 3c42bffc76c61ac11405316655c68e97e3bf3690 (patch) | |
tree | 3c266423153335a5b5e6d8c5687ee4ec80c3a61a /common/.config/emacs/init.el.org | |
parent | 84df97ccf25dc6af05be799ffc1038a88db24654 (diff) |
system changes
Diffstat (limited to 'common/.config/emacs/init.el.org')
-rw-r--r-- | common/.config/emacs/init.el.org | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/common/.config/emacs/init.el.org b/common/.config/emacs/init.el.org index 5f396b6..27e2c17 100644 --- a/common/.config/emacs/init.el.org +++ b/common/.config/emacs/init.el.org @@ -309,28 +309,43 @@ Install a better PDF viewer than =DocView=. TeX-source-correlate-start-server t)) #+end_src -Install and configure =eat= as a terminal emulator in Emacs. +Install and configure =eat= as a terminal emulator in Emacs with =eshell= as a shell. #+begin_src emacs-lisp (use-package eat :init (setopt eat-kill-buffer-on-exit t) + (defun jj/eshell-quit-or-delete-char (arg) + "Close the terminal if I hit C-d on an empty line" (interactive "p") (if (and (eolp) (looking-back eshell-prompt-regexp)) (eshell-life-is-too-much) (delete-forward-char arg))) + (defun eshell/manage-configs (arg) + "run the argument through make at the root of my dotfiles repository" (let ((dir (eshell/pwd))) (eshell/cd "~/.dotfiles") (compile (concat "make " arg)) (eshell/cd dir))) + + (defun eshell/yt-2-rss (url) + "convert a youtube channel link into an rss link" + (if (not (libxml-available-p)) + (message "libxml is not available") + (browse-url-emacs url t) + (let* ((dom (libxml-parse-html-region)) + (rss (dom-elements dom 'title "RSS")) + (href (dom-attr rss 'href))) + (kill-buffer) + href))) + :config (eat-eshell-mode) (setq eshell-visual-commands '()) :hook (eat-mode . (lambda () (display-line-numbers-mode -1))) (eshell-mode . (lambda () (display-line-numbers-mode -1) - (bind-keys :map eshell-mode-map ("C-d" . jj/eshell-quit-or-delete-char)) (eshell/alias "ll" "ls -alF $@*") (eshell/alias "la" "ls -a $@*") (eshell/alias "l" "ls -F $@*"))) |