From a83f5ea6c12cfedae7acc5dd51ad23b30bf886cb Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Mon, 14 Oct 2024 16:12:36 -0700 Subject: [PATCH] Some changes --- elisp/latex-help.el | 5 ++--- init.el | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/elisp/latex-help.el b/elisp/latex-help.el index 15275d9..ee7b9c6 100644 --- a/elisp/latex-help.el +++ b/elisp/latex-help.el @@ -2,7 +2,7 @@ ;;; Commentary: ;; This is inspired by an old package (originally from the 90s!!) called -;; ltx-help.el. This package used to be called latex-help.el too, but it seems +;; ltx-help.el. That package used to be called latex-help.el too, but it seems ;; to have had its name changed sometime around 2010. This package aims for ;; similar functionality, but using more up to date and convention-conforming ;; Elisp. For example, the original package still assumes that you may not have @@ -285,8 +285,7 @@ FOUND is the hash table in which to put the entries." (let ((name (file-name-nondirectory file))) (and (not (equal name ".")) (not (equal name ".."))))) - files))))) - finally return found)) + files))))))) (defun latex-help--texdoc-config-files () "Return a list of texdoc config files." diff --git a/init.el b/init.el index f42511e..9862584 100644 --- a/init.el +++ b/init.el @@ -643,6 +643,8 @@ visual states." (use-package corfu :bind (("M-" . completion-at-point) :map corfu-map + ("C-j" . corfu-next) + ("C-k" . corfu-previous) ("M-SPC" . corfu-insert-separator) ("M-m" . my/corfu-move-to-minibuffer)) :init @@ -1127,6 +1129,17 @@ otherwise, call `bibtex-find-text'." (add-to-list 'major-mode-remap-alist '(doctex-mode . docTeX-mode)) (add-to-list 'auto-mode-alist '("/\\.latexmkrc\\'" . perl-mode)) :config + (defun my/-auctex-texdoc-setup-env (oldfun &rest args) + (let ((process-environment)) + (if (display-graphic-p) + (progn (setenv "MDVIEWER_texdoc" "emacsclient") + (setenv "PDFVIEWER_texdoc" "emacsclient") + (setenv "PAGER_texdoc" "emacsclient")) + (setenv "MDVIEWER_texdoc" "emacsclient -nw") + (setenv "PDFVIEWER_texdoc" "evince") + (setenv "PAGER_texdoc" "emacsclient -nw")) + (apply oldfun args))) + (advice-add 'TeX-documentation-texdoc :around 'my/-auctex-texdoc-setup-env) (defun my/-setup-LaTeX-mode () (setq evil-lookup-func 'latex-help-at-point)) (setq TeX-auto-save t @@ -1541,8 +1554,8 @@ argument." (eshell-load . eat-eshell-mode) (eshell-mode . my/-eshell-mode-setup)) :bind (:map eshell-mode-map - ("TAB" . company-complete) - ("" . company-complete)) + ("TAB" . completion-at-point) + ("" . completion-at-point)) :init (defun my/-eshell-mode-setup () "Setup function run from `eshell-mode-hook'"