X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/6827bbb0cbb1d792911811bcfd1739c5817db2b1..0e340dbb6d2137be8106666d56b7bbf82f223ece:/init.org?ds=sidebyside diff --git a/init.org b/init.org index 127926d..221335c 100644 --- a/init.org +++ b/init.org @@ -243,7 +243,9 @@ can then be managed with the help of Magit or other tools. ("C-c B A" . borg-activate) ("C-c B a" . borg-assimilate) ("C-c B b" . borg-build) - ("C-c B c" . borg-clone))) + ("C-c B c" . borg-clone) + ("C-c B m" . borg-insert-update-message) + ("C-c B r" . borg-remove))) #+end_src *** =use-package= @@ -283,7 +285,6 @@ database, low-level functions for querying the database, and a :bind (("C-c B d" . epkg-describe-package) ("C-c B p" . epkg-list-packages) - ("C-c B r" . borg-remove) ("C-c B u" . epkg-update))) #+end_src @@ -355,7 +356,7 @@ in my shell. (mapc #'disable-theme custom-enabled-themes)) #+end_src -** COMMENT Server +** Server Start server if not already running. Alternatively, can be done by issuing =emacs --daemon= in the terminal, which can be automated with @@ -610,7 +611,7 @@ Enable automatic reloading of changed buffers and files. #+begin_src emacs-lisp (global-auto-revert-mode 1) (setq auto-revert-verbose nil - global-auto-revert-non-file-buffers t) + global-auto-revert-non-file-buffers nil) #+end_src *** Always use space for indentation @@ -708,6 +709,7 @@ In short, my favourite way of life. org-edit-src-content-indentation 0 org-email-link-description-format "Email %c: %s" ; %.30s org-log-done 'time) + (add-to-list 'org-structure-template-alist '("L" . "src emacs-lisp") t) :bind (:map org-mode-map ("M-L" . org-insert-last-stored-link)) :hook ((org-mode . org-indent-mode) (org-mode . auto-fill-mode) @@ -1659,7 +1661,7 @@ Make =*scratch*= and =*Messages*= unkillable. Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]]. -** [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides]] +** COMMENT [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides]] :ARCHIVE: #+begin_src emacs-lisp (use-package highlight-indent-guides @@ -1813,6 +1815,18 @@ Hopefully temporary. "")))) #+end_src +** magithub + +For when I /have to/ use GH. + +#+begin_src emacs-lisp +(use-package magithub + :after magit + :config + (magithub-feature-autoinject t) + (setq magithub-clone-default-directory "~/src/git")) +#+end_src + * Email #+begin_src emacs-lisp @@ -1909,7 +1923,8 @@ Hopefully temporary. :config (setq gnus-posting-styles '((".*" - (address "amin@aminb.org")) + (address "amin@aminb.org") + (body "\nBest,\namin\n")) ("gnu.*" (address "bandali@gnu.org")) ("nnimap\\+uwaterloo:.*" @@ -1995,53 +2010,105 @@ Convenient footnotes in =message-mode=. ** supercite -#+begin_src emacs-lisp :tangle no +#+begin_src emacs-lisp (use-package supercite - :commands sc-cite-original + :after message :init - (add-hook 'mail-citation-hook 'sc-cite-original) + (setq sc-nested-citation-p t + ;; sc-cite-blank-lines-p t + sc-citation-leader "" + sc-reference-tag-string "" + sc-auto-fill-region-p nil + sc-confirm-always-p nil) + :config + (defun amin--sc-header () + "Hi ,\n\n writes:" + (let ((sc-mumble "") + (whofrom (sc-whofrom))) + (if whofrom + (insert (sc-hdr "Hi " (sc-mail-field "sc-firstname") ",\n\n") + sc-reference-tag-string + whofrom + " writes:\n")))) + (add-to-list 'sc-rewrite-header-list '(amin--sc-header) t) + (setq sc-preferred-header-style (1- (length sc-rewrite-header-list))) + (add-hook 'mail-citation-hook 'sc-cite-original)) +#+end_src - (defun sc-remove-existing-signature () - (save-excursion - (goto-char (region-beginning)) - (when (re-search-forward message-signature-separator (region-end) t) - (delete-region (match-beginning 0) (region-end))))) +** ebdb - (add-hook 'mail-citation-hook 'sc-remove-existing-signature) +#+begin_src emacs-lisp +(use-package ebdb + :defer 1 + :bind (:map gnus-group-mode-map ("e" . ebdb)) + :config + (setq ebdb-sources (no-littering-expand-var-file-name "ebdb"))) - (defun sc-remove-if-not-mailing-list () - (unless (assoc "list-id" sc-mail-info) - (setq attribution sc-default-attribution - citation (concat sc-citation-delimiter - sc-citation-separator)))) +(use-package ebdb-com + :after ebdb) - (add-hook 'sc-attribs-postselect-hook 'sc-remove-if-not-mailing-list) +(use-package ebdb-complete + :after ebdb + :config + (ebdb-complete-enable)) + +(use-package ebdb-gnus + :after ebdb) +(use-package ebdb-message + :after ebdb) + +;; (use-package ebdb-vcard +;; :after ebdb) +#+end_src + +** COMMENT bbdb + +#+begin_comment +[submodule "bbdb"] + path = lib/bbdb + url = https://git.savannah.nongnu.org/git/bbdb.git + load-path = lisp/elisp + info-path = doc + build-step = ./autogen.sh + build-step = ./configure --with-lispdir=elisp + build-step = make + build-step = make install +#+end_comment + +#+begin_src emacs-lisp +(use-package bbdb + :init + (bbdb-mua-auto-update-init 'message) + (setq bbdb-mua-auto-update-p 'query) + (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)) +#+end_src + +** COMMENT message-x + +#+begin_src emacs-lisp +(use-package message-x + :custom + (message-x-completion-alist + (quote + (("\\([rR]esent-\\|[rR]eply-\\)?[tT]o:\\|[bB]?[cC][cC]:" . gnus-harvest-find-address) + ((if + (boundp + (quote message-newgroups-header-regexp)) + message-newgroups-header-regexp message-newsgroups-header-regexp) + . message-expand-group))))) +#+end_src + +** COMMENT gnus-harvest + +#+begin_src emacs-lisp +(use-package gnus-harvest + :commands gnus-harvest-install + :demand t :config - (defun sc-fill-if-different (&optional prefix) - "Fill the region bounded by `sc-fill-begin' and point. -Only fill if optional PREFIX is different than -`sc-fill-line-prefix'. If `sc-auto-fill-region-p' is nil, do not -fill region. If PREFIX is not supplied, initialize fill -variables. This is useful for a regi `begin' frame-entry." - (if (not prefix) - (setq sc-fill-line-prefix "" - sc-fill-begin (line-beginning-position)) - (if (and sc-auto-fill-region-p - (not (string= prefix sc-fill-line-prefix))) - (let ((fill-prefix sc-fill-line-prefix)) - (unless (or (string= fill-prefix "") - (save-excursion - (goto-char sc-fill-begin) - (or (looking-at ">+ +") - (< (length - (buffer-substring (point) - (line-end-position))) - 65)))) - (fill-region sc-fill-begin (line-beginning-position))) - (setq sc-fill-line-prefix prefix - sc-fill-begin (line-beginning-position))))) -nil)) + (if (featurep 'message-x) + (gnus-harvest-install 'message-x) + (gnus-harvest-install))) #+end_src ** COMMENT gnus-alias :ARCHIVE: