variable to ~t~, otherwise set it to ~nil~.
#+begin_src emacs-lisp
-(defvar a/byte-compiled-init t
+(defvar a/byte-compiled-init nil
"If non-nil, byte-(re)compile init.el on successful tangles.")
#+end_src
,@args))
#+end_src
+While at it, let's exclude =straight.el='s build from recentf:
+
+#+begin_src emacs-lisp
+(with-eval-after-load 'recentf
+ (add-to-list 'recentf-exclude
+ (expand-file-name "~/.emacs.d/straight/build/")))
+#+end_src
+
Also, here's a useful function for reloading the init file (useful
after running =straight-check-all=:
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
t)
(require 'ox-beamer))
+
+(use-feature ox-extra
+ :config
+ (ox-extras-activate '(latex-header-blocks ignore-headlines)))
#+end_src
**** asynchronous tangle
'magit-insert-modules
'magit-insert-stashes
'append)
- (setq
- magit-repository-directories '(("~/.emacs.d/" . 0)
- ("~/src/git/" . 1)))
+ (setq magit-repository-directories '(("~/" . 0)
+ ("~/src/git/" . 1)))
(nconc magit-section-initial-visibility-alist
'(([unpulled status] . show)
([unpushed status] . show)))
([S-down] . ivy-next-history-element)
("DEL" . ivy-backward-delete-char))
:config
- (setq ivy-wrap t)
+ (setq ivy-wrap t
+ ivy-height 14
+ ivy-use-virtual-buffers t
+ ivy-virtual-abbreviate 'abbreviate
+ ivy-count-format "%d/%d ")
(ivy-mode 1)
;; :custom-face
;; (ivy-minibuffer-match-face-2 ((t (:background "#e99ce8" :weight semi-bold))))
#+begin_src emacs-lisp
(use-package swiper
:after ivy
- :bind (("C-s" . swiper)
+ :bind (("C-s" . swiper-isearch)
("C-r" . swiper)
("C-S-s" . isearch-forward)))
#+end_src
:after ivy
:bind (([remap execute-extended-command] . counsel-M-x)
([remap find-file] . counsel-find-file)
- ("s-r" . counsel-recentf)
("C-c x" . counsel-M-x)
("C-c f ." . counsel-find-file)
+ ("C-c f l" . counsel-find-library)
:map minibuffer-local-map
("C-r" . counsel-minibuffer-history))
:config
(defalias 'locate #'counsel-locate))
#+end_src
+*** COMMENT Helm
+
+#+begin_src emacs-lisp
+(use-package helm
+ :commands (helm-M-x helm-mini helm-resume)
+ :bind (("M-x" . helm-M-x)
+ ("M-y" . helm-show-kill-ring)
+ ("C-x b" . helm-mini)
+ ("C-x C-b" . helm-buffers-list)
+ ("C-x C-f" . helm-find-files)
+ ("C-h r" . helm-info-emacs)
+ ("s-r" . helm-recentf)
+ ("C-s-r" . helm-resume)
+ :map helm-map
+ ("<tab>" . helm-execute-persistent-action)
+ ("C-i" . helm-execute-persistent-action) ; Make TAB work in terminals
+ ("C-z" . helm-select-action)) ; List actions
+ :config (helm-mode 1))
+#+end_src
+
*** eshell
#+begin_src emacs-lisp
(mode . emacs-lisp-mode)
(mode . scheme-mode)
(mode . haskell-mode)
- (mode . lean-mode)))
+ (mode . lean-mode)
+ (mode . alloy-mode)))
+ ("tex"
+ (or
+ (mode . bibtex-mode)
+ (mode . latex-mode)))
("emacs"
(or
(name . "^\\*scratch\\*$")
:config (dash-enable-font-lock))
#+end_src
+*** DocView
+
+#+begin_src emacs-lisp
+(use-package doc-view
+ :bind (:map doc-view-mode-map
+ ("M-RET" . image-previous-line)))
+#+end_src
+
* Editing
:PROPERTIES:
:CUSTOM_ID: editing
(use-package guix)
#+end_src
+** COMMENT TeX
+
+#+begin_src emacs-lisp
+(use-package auctex
+ :custom
+ (font-latex-fontify-sectioning 'color))
+#+end_src
+
* Emacs enhancements
:PROPERTIES:
:CUSTOM_ID: emacs-enhancements
:defer 0.5
:after eshell
:config
+ (defvar user-@-host (concat (user-login-name) "@" (system-name) " "))
(defun +eshell/prompt ()
(let ((base/dir (shrink-path-prompt default-directory)))
- (concat (propertize (car base/dir)
+ (concat (propertize user-@-host 'face 'default)
+ (propertize (car base/dir)
'face 'font-lock-comment-face)
(propertize (cdr base/dir)
'face 'font-lock-constant-face)
- (propertize (+eshell--current-git-branch)
- 'face 'font-lock-function-name-face)
- "\n"
- ;; "λ"
- ;; (propertize "λ" 'face 'eshell-prompt)
- ;; needed for the input text to not have prompt face
- (propertize "λ " 'face 'default))))
-
- (defun +eshell--current-git-branch ()
- (let ((branch (car (loop for match in (split-string (shell-command-to-string "git branch") "\n")
- when (string-match "^\*" match)
- collect match))))
- (if (not (eq branch nil))
- (concat " " (substring branch 2))
- "")))
- (setq eshell-prompt-regexp "\\(.*\n\\)*λ "
- eshell-prompt-function #'+eshell/prompt))
+ (propertize "> " 'face 'default))))
+ (setq eshell-prompt-regexp (concat user-@-host ".*> ")
+ eshell-prompt-function #'+eshell/prompt))
#+end_src
** [[https://github.com/peterwvj/eshell-up][eshell-up]]
(text-mode . yas-minor-mode))
#+end_src
+** Debbugs
+
+#+begin_src emacs-lisp
+(use-package debbugs
+ :straight (debbugs
+ :host github
+ :repo "emacs-straight/debbugs"
+ :files (:defaults "Debbugs.wsdl")))
+#+end_src
+
+** org-ref
+
+#+begin_src emacs-lisp
+(use-package org-ref
+ :init
+ (a/setq-every '("~/usr/org/references.bib")
+ reftex-default-bibliography
+ org-ref-default-bibliography)
+ (setq
+ org-ref-bibliography-notes "~/usr/org/notes.org"
+ org-ref-pdf-directory "~/usr/org/bibtex-pdfs/"))
+#+end_src
+
+** slack
+
+Not an "Emacs enhancement", but just so that I don't have to use the
+proprietary web interface. Needed for interacting with the URA(s)
+this summer.
+
+#+begin_src emacs-lisp
+(use-package slack
+ :commands (slack-start)
+ :init
+ (eval-when-compile ; silence the byte-compiler
+ (defvar url-http-data nil)
+ (defvar url-http-extra-headers nil)
+ (defvar url-http-method nil)
+ (defvar url-callback-function nil)
+ (defvar url-callback-arguments nil)
+ (defvar oauth--token-data nil))
+ (setq slack-buffer-emojify t
+ slack-prefer-current-team t)
+ :config
+ (slack-register-team
+ :name "nday-students"
+ :default t
+ :token nday-students-token
+ :subscribed-channels '(general)
+ :full-and-display-names t)
+ (add-to-list 'swiper-font-lock-exclude 'slack-message-buffer-mode t)
+ (setq lui-time-stamp-format "[%Y-%m-%d %H:%M:%S]"
+ lui-time-stamp-only-when-changed-p t
+ lui-time-stamp-position 'right)
+ :bind
+ (("C-c s s" . slack-start)
+ ("C-c s u" . slack-select-unread-rooms)
+ ("C-c s b" . slack-select-rooms)
+ ("C-c s t" . slack-change-current-team)
+ ("C-c s c" . slack-ws-close)
+ :map slack-mode-map
+ ("M-p" . slack-buffer-goto-prev-message)
+ ("M-n" . slack-buffer-goto-next-message)
+ ("C-c e" . slack-message-edit)
+ ("C-c k" . slack-message-delete)
+ ("C-c C-k" . slack-channel-leave)
+ ("C-c r a" . slack-message-add-reaction)
+ ("C-c r r" . slack-message-remove-reaction)
+ ("C-c r s" . slack-message-show-reaction-users)
+ ("C-c p l" . slack-room-pins-list)
+ ("C-c p a" . slack-message-pins-add)
+ ("C-c p r" . slack-message-pins-remove)
+ ("@" . slack-message-embed-mention)
+ ("#" . slack-message-embed-channel)))
+
+(use-package alert
+ :commands (alert)
+ :init
+ (setq alert-default-style 'notifier))
+#+end_src
+
* Email
:PROPERTIES:
:CUSTOM_ID: email
:config
(require 'ebdb)
(require 'ebdb-mua)
- (require 'ebdb-gnus))
+ (require 'ebdb-gnus)
+
+ (with-eval-after-load 'recentf
+ (add-to-list 'recentf-exclude gnus-home-directory)))
(use-feature gnus-art
:config
(concat "Hi %F,\n\n" a/message-cite-style-format)
a/message-cite-style-format)))
"Citation style based on Mozilla Thunderbird's. Use with message-cite-style.")
- (setq message-cite-style 'message-cite-style-bandali
+ (setq ;; message-cite-style 'message-cite-style-bandali
message-kill-buffer-on-exit t
message-send-mail-function 'message-send-mail-with-sendmail
message-sendmail-envelope-from 'header