Browse Source

pyvenv

macos
parent
commit
14ef566b0b
2 changed files with 87 additions and 9 deletions
  1. +71
    -9
      .emacs
  2. +16
    -0
      Readme.md

+ 71
- 9
.emacs View File

@ -30,8 +30,8 @@
;;+++++++++++++ ;;+++++++++++++
;; frame size ;; frame size
(setq initial-frame-alist '((top . 0)(left . 0)
(width . 80)(height . 50)))
(setq initial-frame-alist '((top . 35)(left . 10)
(width . 80)(height . 45)))
;;+++++++++++ ;;+++++++++++
;; Doom-themes, all-the-icons, mode-line and font ;; Doom-themes, all-the-icons, mode-line and font
(unless (package-installed-p 'doom-themes) (unless (package-installed-p 'doom-themes)
@ -62,12 +62,38 @@
'(font . "Source Code Pro-18")) '(font . "Source Code Pro-18"))
;;+++++++ ;;+++++++
;;auctex: ;;auctex:
(is-installed 'auctex)
;;(is-installed 'pdf-tools);; PDFtools
;;(pdf-tools-install)
(setenv "PATH" (concat "/Library/TeX/texbin:" (setenv "PATH" (concat "/Library/TeX/texbin:"
(getenv "PATH"))) (getenv "PATH")))
(add-to-list 'exec-path "/Library/TeX/texbin") (add-to-list 'exec-path "/Library/TeX/texbin")
(setq TeX-auto-save t) (setq TeX-auto-save t)
(setq TeX-save-query nil)
(setq LaTeX-includegraphics-read-file 'LaTeX-includegraphics-read-file-relative)
(setq TeX-parse-self t) (setq TeX-parse-self t)
(setq-default TeX-master nil) (setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(custom-set-variables
'(pdf-tools-handle-upgrades nil)) ; Use brew upgrade pdf-tools instead.
(setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo")
(pdf-tools-install)
(setq reftex-plug-into-AUCTeX t)
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-source-correlate-start-server t)
;; Update PDF buffers after successful LaTeX runs
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode))
(add-hook 'pdf-view-mode-hook
(lambda () (pdf-tools-enable-minor-modes)))
(setq TeX-source-correlate-method 'synctex)
(custom-set-variables '(LaTeX-command "latex -synctex=1"))
(setq reftex-bibliography-commands '("bibliography" "nobibliography" "addbibresource"))
;;--end---- ;;--end----
;;++++++++ ;;++++++++
;; emacs startup config ;; emacs startup config
@ -122,25 +148,61 @@
(is-installed 'neotree) (is-installed 'neotree)
(require 'neotree) (require 'neotree)
(global-set-key [f8] 'neotree-toggle) (global-set-key [f8] 'neotree-toggle)
;;========
;; auto-complete
(is-installed 'auto-complete)
(ac-config-default)
;;======= ;;=======
;; Python completion: ;; Python completion:
(is-installed 'jedi)
(is-installed 'anaconda-mode)
(add-hook 'python-mode-hook 'anaconda-mode)
(add-hook 'python-mode-hook 'anaconda-eldoc-mode)
;(add-hook 'python-mode-hook 'jedi:setup)
;(setq jedi:complete-on-dot t) ; optional
;(setq jedi:environment-root "/usr/local/bin/python3")
;;=======
;; Python pyvenv
(is-installed 'pyvenv) (is-installed 'pyvenv)
;;(is-installed 'jedi:install-server)
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t) ; optional
(setq python-shell-interpreter "/usr/local/bin/python3")
(pyvenv-mode t)
(setenv "WORKON_HOME" "~/.pyvenv/")
;(setq python-shell-interpreter (concat pyvenv-virtual-env "bin/python3"))
;(setq python-shell-interpreter "/usr/local/bin/python3")
;;==========
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(custom-safe-themes
'("0fe24de6d37ea5a7724c56f0bb01efcbb3fe999a6e461ec1392f3c3b105cc5ac" "e1ef2d5b8091f4953fe17b4ca3dd143d476c106e221d92ded38614266cea3c8b" "08a27c4cde8fcbb2869d71fdc9fa47ab7e4d31c27d40d59bf05729c4640ce834" "7a994c16aa550678846e82edc8c9d6a7d39cc6564baaaacc305a3fdc0bd8725f" default))
'(org-agenda-files
'("~/ownCloud/org/linux.org" "~/ownCloud/org/phd.org" "~/ownCloud/org/iDesiIng.org" "~/ownCloud/org/index.org"))
'(package-selected-packages '(package-selected-packages
(quote
(docker-compose-mode markdown-mode org-ref doom-modeline all-the-icons doom-themes which-key helm use-package))))
'(anaconda-mode which-key use-package pyvenv pkg-info org-ref neotree markdown-mode jedi helm-projectile doom-themes doom-modeline docker-compose-mode auctex))
'(safe-local-variable-values
'((LaTeX-includegraphics-read-file . LaTeX-includegraphics-read-file-relative)
(org-attach-use-inheritance . t)
(org-attach-id-dir . /Users/gmarx/ownCLoud/org/phd/)
(org-attach-id-dir . /Users/gmarx/ownCloud/org/phd/)
(org-startup-folded . "fold")
(org-startup-folded . fold)
(org-startup-folded . t)
(gnus-group-uncollapsed-levels)
(gnus-group-uncollapsed-levels . t)
(org-todo-keywords
(sequence "Marx" "Luis" "Pascual" "Osvaldo" "DONE"))
(org-todo-keywords
(sequence "Marx" "Luis" "Pascual" "Osvaldo" | "DONE"))
(org-todo-keywords
(type "Marx" "Luis" "Pascual" "Osvaldo" | "DONE"))
(org-todo-keywords quote
((type "Marx" "Luis" "Pascual" "Osvaldo" | "DONE"))))))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.


+ 16
- 0
Readme.md View File

@ -1,8 +1,24 @@
#Readme #Readme
# RS101
This repository contains the basic configuration to work with emacs for compile LaTeX, This repository contains the basic configuration to work with emacs for compile LaTeX,
Markdown and Docker tested with MacOS, Ubuntu and Windows. Markdown and Docker tested with MacOS, Ubuntu and Windows.
This configuration is used with the research seminar 101. This configuration is used with the research seminar 101.
# Python `venv`
It has been tested that to work with Python's virtual environments (venv) on emacs, the venv must be created and activated on shell y using:
``` shell
$ python3 -m venv /path/to/new/virtual/environment/
$ source /path/to/new/virtual/environment/activate
```
after this we have to activate the virtual environment with emacs' command `pyvenv-workon` and select the environment to work with.
$
# Known issues # Known issues
## Windows ## Windows

Loading…
Cancel
Save