(elpaca sqlformat)
(elpaca (sweeprolog
:repo "~/checkouts/sweep/"
- :files ("*.org" "dir" "*.info" "sweep.pl"
- "sweeprolog-pce-theme.el" "sweeprolog.el")
- :pre-build (("emacs" "--batch" "-l" "ox-texinfo" "README.org"
- "--eval" "(setq org-babel-confirm-evaluate-answer-no t)"
- "-f" "org-texinfo-export-to-texinfo"))))
+ :files ("*.org" "*.texi" "sweep.pl"
+ "sweeprolog-pce-theme.el" "sweeprolog.el")))
(elpaca terraform-mode)
(elpaca (vterm
:files ("*")
(elpaca (do-at-point
:repo "https://git.sr.ht/~pkal/do-at-point"
:pre-build (("pandoc" "-o" "do-at-point.texi" "README.md"))))
+(elpaca rfc-mode)
(elpaca-wait)
eldoc-minor-mode-string nil
flyspell-mode-line-string nil
paredit-lighter nil
- ;; IRC stuff
- rcirc-default-nick "esy"
- rcirc-server-alist '(("irc.libera.chat"
- :channels ("#emacs")
- :port 6697
- :encryption tls))
- rcirc-log-flag t
+ eglot-confirm-server-edits 'diff
;; use my custom project-prompting function
project-prompter #'esy/read-project-by-name
;; have common bindings initially hidden in the output of C-h b
(put 'transpose-lines 'repeat-map 'transpose-lines-repeat-map)
;;; utility commands
+
+(defun esy/emacs-patch (file)
+ (interactive "fPatch file: ")
+ (require 'emacsbug)
+ (delete-other-windows)
+ (let ((pbuf (get-buffer-create "*Patch*"))
+ (subject nil))
+ (with-current-buffer pbuf
+ (insert-file-contents file nil nil nil t)
+ (setq subject (mail-fetch-field "Subject"))
+ (diff-mode))
+ (compose-mail report-emacs-bug-address subject)
+ (message-goto-body)
+ (insert "Tags: patch\n\n\n\n")
+ (mml-attach-file file "text/patch" nil "attachment")
+ (message-goto-body)
+ (forward-line 2)
+ (display-buffer pbuf '(display-buffer-in-direction (direction . right)))
+ (message-add-action (lambda ()
+ (when-let (window (get-buffer-window pbuf))
+ (quit-window nil window)))
+ 'send 'kill)))
+
(defun esy/kill-dwim ()
"When region is active, kill region, otherwise kill last word."
(interactive)
(defun esy/hut-builds ()
(interactive)
+ (require 'eat)
(let ((eat-kill-buffer-on-exit nil))
(eat "hut builds show -f" t)))
(keymap-global-set "M-#" #'dictionary-search)
(keymap-global-set "M-o" #'previous-buffer)
(keymap-global-set "M-O" #'next-buffer)
+(keymap-global-set "C-'" #'do-at-point)
(keymap-global-set "C-," #'backward-delete-char)
(keymap-global-set "C-." #'embark-act)
(keymap-global-set "C-;" #'avy-goto-char-timer)
(put command 'disabled nil))
;;; disable some commands
+
(put 'suspend-frame 'disabled t)
;;; Configure project management commands
;;; Configure terminal emulation via `vterm'
(with-eval-after-load 'vterm
- (when (eq system-type 'darwin)
- (setq vterm-shell "/bin/zsh"))
(add-to-list 'vterm-tramp-shells '("kubernetes" "/bin/bash")))
;;; Remove some over-intrusive keybindings in `paredit'
(with-eval-after-load 'paredit
(keymap-unset paredit-mode-map "M-s" t)
- (keymap-unset paredit-mode-map "M-?" t))
+ (keymap-unset paredit-mode-map "M-?" t)
+ (with-eval-after-load 'eldoc
+ (eldoc-add-command 'paredit-RET)))
;;; Configure Prolog integration via `sweeprolog'
(with-eval-after-load (car mm)
(setf (alist-get (cdr mm) minor-mode-alist) '(""))))
+;;; Configure Texinfo mode
+
+(with-eval-after-load 'texinfo
+ (add-hook 'texinfo-mode-hook #'abbrev-mode))
+
;;; Track currency exchange rates
(defvar esy/eur-to-ils-rates nil)
gnus-simplify-subject-functions '(gnus-simplify-subject-re)
gnus-treat-display-smileys nil
gnus-select-method '(nntp "news.gmane.io")
- gnus-secondary-select-methods (mapcar
- (pcase-lambda
- (`(,name ,_ ,address ,_ . ,tail))
- `(nnimap ,name
- (nnimap-address ,address)
- (nnimap-server-port "imaps")
- (nnimap-stream ssl)
- .
- ,tail))
- esy-comm-accounts)
+ gnus-secondary-select-methods (cons
+ '(nntp "news.eternal-september.org")
+ (mapcar
+ (pcase-lambda
+ (`(,name ,_ ,address ,_ . ,tail))
+ `(nnimap ,name
+ (nnimap-address ,address)
+ (nnimap-server-port "imaps")
+ (nnimap-stream ssl)
+ .
+ ,tail))
+ esy-comm-accounts))
gnus-no-groups-message "No new articles"
gnus-use-full-window nil
gnus-article-treat-types '("text/plain"
;; emacsbug.el
report-emacs-bug-no-explanations t
- submit-emacs-patch-display-help nil)
+ submit-emacs-patch-display-help nil
+
+ ;; rcirc.el
+ rcirc-default-nick "esy"
+ rcirc-server-alist '(("irc.libera.chat"
+ :channels ("#emacs")
+ :port 6697
+ :encryption tls))
+ rcirc-log-flag t)
(with-eval-after-load 'gnus
(require 'gnus-icalendar)
;;; some-button.el --- Push some button -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2022 Eshel Yaron
+;; Copyright (C) 2021-2023 Eshel Yaron
;; Author: Eshel Yaron <eshelshay.yaron@gmail.com>
(format "\t%64s" turl))))))))
;;;###autoload
-(defun some-button (&optional arg)
- "Push a button in the current buffer with completion and preview."
+(defun some-button (&optional no-push)
+ "Jump to a button in the current buffer and push it.
+If NO-PUSH is non-nil (interactively, the prefix argument), only
+jump to the selected button but don't push it."
(interactive "P")
(if-let ((buf (current-buffer))
(win (selected-window))
"Button: " table win buf)))
(pos (cdr (assoc choice table))))
(goto-char pos)
- (when (not arg)
+ (unless no-push
(or (ignore-errors (push-button))
(shr-browse-url))))
(user-error "No buttons in current buffer")))