-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install auctex #379
Comments
I think most of that is redundant. Maybe you want something like: (use-package auctex
:defer t
:ensure t) |
Thanks for your help @npostavs. It works perfectly. |
@npostavs This doesn't actually work with (use-package auctex
:defer t
:ensure t
:config
(setq TeX-auto-save t)) and open a LaTeX file. Notice how I personally use something like the following, which does work with (use-package tex
:defer t
:ensure auctex
:config
(setq TeX-auto-save t)) Note that using |
Oh, I see, there is no file in the
Makes sense (though such a
|
Right.
It does for me with the latest ELPA version. Looks like the git repo has a Makefile that creates that line for whatever reason.
Yeah, I figured that using
|
Oh, yeah, I see it in the ELPA repo (I was looking at the 11.89 tarball before), and also an autoload cookie which explains why it's always loaded immediately: ;;; Ensure that loading the autoloads file also loads this file.
;;;###autoload (require 'tex-site)
(provide 'tex-site)
;;; tex-site.el ends here |
So what is the conclusion :-)? I can't get this to work:
I can only get auctex to work via tex-site. |
@petey33 What in particular doesn't work with that snippet? Does an AUCTeX major mode not start up for you when loading a What's supposed to happen is that the |
@fice-t Yes. AUCTeX major mode do not start up when loading af tex file. I get:
|
That error occurs when you try to autoload a function with the wrong file. Can you first do Also, can you reproduce this error using |
Thank you @fice-t . I can't reproduce the error with emacs -Q. The backtrace:
|
Okay, so that means the problem lies elsewhere. Your backtrace looks normal, so it might be an issue with your With your config, what's the output of In any case, that file is supposed to have the definition of |
Thank you so much @fice-t! It was my load-path. I had some other code where I messed with load-path. Now your snippet works perfectly. |
Neither
emacs 25.1, auctex-11.89.6, use-package-2.2 |
FWIW, here's what I use, and I work with LaTeX frequently: (use-package tex-site ; auctex
:load-path "site-lisp/auctex/"
:defines (latex-help-cmd-alist latex-help-file)
:mode ("\\.tex\\'" . TeX-latex-mode)
:init
(setq reftex-plug-into-AUCTeX t)
(setenv "PATH" (concat "/Library/TeX/texbin:"
(getenv "PATH")))
(add-to-list 'exec-path "/Library/TeX/texbin")
:config
(defun latex-help-get-cmd-alist () ;corrected version:
"Scoop up the commands in the index of the latex info manual.
The values are saved in `latex-help-cmd-alist' for speed."
;; mm, does it contain any cached entries
(if (not (assoc "\\begin" latex-help-cmd-alist))
(save-window-excursion
(setq latex-help-cmd-alist nil)
(Info-goto-node (concat latex-help-file "Command Index"))
(goto-char (point-max))
(while (re-search-backward "^\\* \\(.+\\): *\\(.+\\)\\." nil t)
(let ((key (buffer-substring (match-beginning 1) (match-end 1)))
(value (buffer-substring (match-beginning 2)
(match-end 2))))
(add-to-list 'latex-help-cmd-alist (cons key value))))))
latex-help-cmd-alist)
(use-package ebib
:load-path "site-lisp/ebib"
:preface
(use-package parsebib :load-path "site-lisp/parsebib"))
(use-package latex
:defer t
:config
(use-package preview)
(add-hook 'LaTeX-mode-hook 'reftex-mode)
(info-lookup-add-help :mode 'LaTeX-mode
:regexp ".*"
:parse-rule "\\\\?[a-zA-Z]+\\|\\\\[^a-zA-Z]"
:doc-spec '(("(latex2e)Concept Index" )
("(latex2e)Command Index"))))) |
@soupault What exactly is not working with @jwiegley Thanks for sharing. I believe
ELPA users shouldn't use |
@fice-t I get
, and |
@soupault I checked out your emacs config and found this in your
That will not for In any case, I suggest removing that line as it's redundant: |
@fice-t thanks for looking into it! |
No problem. Though I'd recommend |
This worked for me (emacs 27.1, auctex 13.0.5): (use-package latex
:ensure auctex
;; your stuff here
) Hope this helps... |
I use straight with its use-package integration. The auctex installation and configuration code used by me is given here. |
Hi
I'm converting my init.el to use use-package. It's great :-).
I'm trying to install auctex via use-package (I use Ubuntu and I have removed the auctex ubuntu package).
I can get auctex to work with the following snippet:
(use-package tex-site
:ensure auctex
:defer t
:mode (".tex'" . latex-mode)
:commands (latex-mode LaTeX-mode plain-tex-mode)
:config
(progn
(add-to-list 'load-path "~/.emacs.d/elpa/auctex-11.89.5")
(load "auctex.el" nil t t)
(load "preview.el" nil t t)
)
)
But is there a smarter way? Any help appreciated. Thanks in advance.
The text was updated successfully, but these errors were encountered: