(with-eval-after-load 'org
(require 'ob)
(require 'ob-prolog)
+ (require 'ob-sql)
+ (require 'org-tempo)
(setq org-agenda-files `(,esy/inbox-path ,esy/journal-path)
org-default-notes-file esy/inbox-path
org-agenda-start-on-weekday 0
:CUSTOM_ID: global-keybindings
:END:
+** =C-c= keybindings
+:PROPERTIES:
+:CUSTOM_ID: ctrl-c-bindings
+:END:
+
+#+begin_src emacs-lisp
+ (keymap-global-set "C-c p" sweep-prefix-map)
+ (keymap-global-set "C-c w" #'esy/eww)
+ (keymap-global-set "C-c c" #'org-capture)
+ (keymap-global-set "C-c l" #'org-store-link)
+ (keymap-global-set "C-c j" #'org-agenda)
+ (keymap-global-set "C-c !" #'consult-flymake)
+ (keymap-global-set "C-c E" #'elfeed)
+ (keymap-global-set "C-c G" #'gnus)
+ (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:
:PROPERTIES:
:CUSTOM_ID: kill-dwim-command
(global-set-key (kbd "C-;") #'avy-goto-char-timer)
(global-set-key (kbd "C-s-p") #'esy/present-buffer)
(global-set-key (kbd "C-s-f") #'toggle-frame-fullscreen)
+ (global-set-key (kbd "s-j") sweep-prefix-map)
(global-set-key (kbd "C-s-l") #'esy/pulse-line))
(add-hook 'after-init-hook #'esy/customize-global-keymap)
(keymap-set ctl-x-map "o" #'ace-window)
(keymap-set ctl-x-map "F" #'esy/find-esy-org)
(keymap-set ctl-x-map "O" #'other-window)
- (keymap-set ctl-x-map "w" #'esy/eww)
(keymap-set ctl-x-map "S" #'esy/vterm-at)
(keymap-set ctl-x-map "V" #'vertalen-at-point)
(keymap-set ctl-x-map "G" #'gnus)
:END:
** denote
+:PROPERTIES:
+:CUSTOM_ID: denote
+:END:
#+begin_src emacs-lisp
(require 'denote)
:CUSTOM_ID: prolog
:END:
-#+begin_src emacs-lisp
- (add-to-list 'auto-mode-alist '("\\.pl\\'" . prolog-mode))
- (add-to-list 'auto-mode-alist '("\\.plt\\'" . prolog-mode))
+*** Setup =sweep=
+:PROPERTIES:
+:CUSTOM_ID: setup-sweep
+:END:
- (with-eval-after-load 'recentf
- (add-to-list 'recentf-exclude (rx (seq "/usr/local/lib/swipl/library/" (+ anychar) ".pl")))
- (setq recentf-max-saved-items 32))
+#+begin_src emacs-lisp
+ (require 'sweep)
+ (add-to-list 'auto-mode-alist '("\\.pl\\'" . sweep-mode))
+ (add-to-list 'auto-mode-alist '("\\.plt\\'" . sweep-mode))
#+end_src
*** Make =rg= regard =.pl= files as Prolog rather than Perl
#+end_src
*** Integrate Prolog with =project.el=
+:PROPERTIES:
+:CUSTOM_ID: prolog-project
+:END:
#+begin_src emacs-lisp
(with-eval-after-load 'project
(add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode)
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-source-correlate-start-server t)
+ (add-to-list 'revert-without-query "\\.pdf\\'")
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)))
+
+ (add-hook 'after-init-hook #'esy/pdf-tools-install)
#+end_src
* =vc= customizations
(require 'which-key)
(require 'whitespace-cleanup-mode)
(setq global-auto-revert-non-file-buffers t
- auto-revert-verbose nil)
+ auto-revert-verbose nil
+ query-about-changed-file t)
(global-auto-revert-mode)
(which-key-mode)
(global-whitespace-cleanup-mode 1))
#+end_src
** Add a repeat-map to =tranpose-lines=
+:PROPERTIES:
+:CUSTOM_ID: repeat-transpose-lines
+:END:
#+begin_src emacs-lisp
(defvar-keymap transpose-lines-repeat-map
:doc "Repeat map for \\[transpose-lines]"
#+end_src
** Use =consult= to show =xref= results
+:PROPERTIES:
+:CUSTOM_ID: consult-xref
+:END:
#+begin_src emacs-lisp
(with-eval-after-load 'xref
(setq xref-show-definitions-function #'consult-xref
#+end_src
** Sibling files
+:PROPERTIES:
+:CUSTOM_ID: find-sibling
+:END:
#+begin_src emacs-lisp
(setq find-sibling-rules '(("\\([^/]+\\)\\.c\\'" "\\1.h")))
#+end_src