{"action":"created","issue":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/997","repository_url":"https://api.github.com/repos/jorgenschaefer/elpy","labels_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/997/labels{/name}","comments_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/997/comments","events_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/997/events","html_url":"https://github.com/jorgenschaefer/elpy/issues/997","id":179699752,"number":997,"title":"Using elpy from a .bat started emacs","user":{"login":"Modestio1","id":22491803,"avatar_url":"https://avatars.githubusercontent.com/u/22491803?v=3","gravatar_id":"","url":"https://api.github.com/users/Modestio1","html_url":"https://github.com/Modestio1","followers_url":"https://api.github.com/users/Modestio1/followers","following_url":"https://api.github.com/users/Modestio1/following{/other_user}","gists_url":"https://api.github.com/users/Modestio1/gists{/gist_id}","starred_url":"https://api.github.com/users/Modestio1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Modestio1/subscriptions","organizations_url":"https://api.github.com/users/Modestio1/orgs","repos_url":"https://api.github.com/users/Modestio1/repos","events_url":"https://api.github.com/users/Modestio1/events{/privacy}","received_events_url":"https://api.github.com/users/Modestio1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jorgenschaefer/elpy/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/milestones/21","html_url":"https://github.com/jorgenschaefer/elpy/milestones/v1.13","labels_url":"https://api.github.com/repos/jorgenschaefer/elpy/milestones/21/labels","id":1679457,"number":21,"title":"v1.13","description":"","creator":{"login":"jorgenschaefer","id":2500270,"avatar_url":"https://avatars.githubusercontent.com/u/2500270?v=3","gravatar_id":"","url":"https://api.github.com/users/jorgenschaefer","html_url":"https://github.com/jorgenschaefer","followers_url":"https://api.github.com/users/jorgenschaefer/followers","following_url":"https://api.github.com/users/jorgenschaefer/following{/other_user}","gists_url":"https://api.github.com/users/jorgenschaefer/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgenschaefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgenschaefer/subscriptions","organizations_url":"https://api.github.com/users/jorgenschaefer/orgs","repos_url":"https://api.github.com/users/jorgenschaefer/repos","events_url":"https://api.github.com/users/jorgenschaefer/events{/privacy}","received_events_url":"https://api.github.com/users/jorgenschaefer/received_events","type":"User","site_admin":false},"open_issues":96,"closed_issues":60,"state":"open","created_at":"2016-04-02T14:34:19Z","updated_at":"2016-09-30T06:52:53Z","due_on":"2016-07-31T22:00:00Z","closed_at":null},"comments":2,"created_at":"2016-09-28T07:31:25Z","updated_at":"2016-09-30T09:39:33Z","closed_at":null,"body":"I use  a .bat file to add qgis to python path then open that environnement in emacs. I am unable to find or set or install elpy in the .emacs file or the bat file. \r\n\r\nThe modules are installed but Emacs don't find them. I saw a similar post, but couldn't find an answer. \r\n\r\nMy bat file is the following:\r\n\r\n@echo off\r\nSET OSGEO4W_ROOT=C:\\OSGeo4W\r\ncall \"%OSGEO4W_ROOT%\"\\bin\\o4w_env.bat\r\ncall \"%OSGEO4W_ROOT%\"\\apps\\grass\\grass-6.4.4\\etc\\env.bat\r\n@echo off\r\npath %PATH%;%OSGEO4W_ROOT%\\apps\\qgis\\bin\r\npath %PATH%;%OSGEO4W_ROOT%\\apps\\grass\\grass-6.4.4\\lib\r\nset PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\\apps\\qgis\\python;\r\nset PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\\apps\\Python27\\Lib\\site-packages\r\nset QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\\apps\\qgis\r\nstart \"Emacs aware of Quantum GIS\" /B \"C:\\tool\\emacs\\bin\\runemacs.exe\" %*\r\n\r\nMy emacs is the following:\r\n\r\n;http://ergoemacs.org/emacs/emacs_package_system.html\r\n;http://emacs.stackexchange.com/questions/16831/using-package-el-to-install-and-update-but-use-package-for-loading-and-configuri\r\n\r\n;; Added by Package.el.  This must come before configurations of\r\n;; installed packages.  Don't delete this line.  If you don't want it,\r\n;; just comment it out by adding a semicolon to the start of the line.\r\n;; You may delete these explanatory comments.\r\n\r\n(require 'package)\r\n(setq package-enable-at-startup nil)   ; To prevent initialising twice\r\n(add-to-list 'package-archives\r\n\t     '(\"melpa\" . \"https://stable.melpa.org/packages/\"))\r\n(add-to-list 'package-archives\r\n\t     '(\"gnu\" . \"https://elpa.gnu.org/packages/\"))\r\n(add-to-list 'package-archives\r\n\t     '(\"elpy\" . \"http://jorgenschaefer.github.io/packages/\"))\t\t\r\n\r\n(package-initialize t)\r\n\r\n\r\n        ;(\"marmalade\" . \"https://marmalade-repo.org/packages/\")\r\n                         \r\n\r\n(package-refresh-contents)\r\n(package-install 'use-package))\r\n\r\n\r\n(eval-when-compile\r\n  (require 'use-package))\r\n\r\n;; Elpy, the Emacs Lisp Python Environment\r\n;; Initialize package mode along with all the installed packages\r\n\r\n(use-package elpy                     ; The one and only Git frontend\r\n  :ensure t\r\n  :bind ((\"C-c v c\" . elpy-jedi)\r\n         (\"C-c v v\" . elpy-importmagic)\r\n         (\"C-c v g\" . elpy-autopep8)\r\n         (\"C-c v l\" . elpy-yapf)\r\n         (\"C-c v p\" . elpy-pyflakes)\r\n\t (\"C-c v p\" . elpy-pyenv))\r\n   :config (setq elpy-save-repository-buffers 'dontask))\r\n\r\n\r\n(elpy-enable)\r\n(setq elpy-rpc-backend \"jedi\")\r\n\r\n(elpy-mode)\r\n  ;; Jedi backend                                                                                       \r\n(jedi:setup)\r\n(setq jedi:complete-on-dot t)                                                              \r\n  \r\n\r\n\r\n(custom-set-variables\r\n ;; custom-set-variables was added by Custom.\r\n ;; If you edit it by hand, you could mess it up, so be careful.\r\n ;; Your init file should contain only one such instance.\r\n ;; If there is more than one, they won't work right.\r\n\r\n '(company-auto-complete t)\r\n '(elpy-mode-hook (quote (subword-mode hl-line-mode)))\r\n '(package-selected-packages (quote (## elpy))))\r\n\r\n(custom-set-faces\r\n ;; custom-set-faces was added by Custom.\r\n ;; If you edit it by hand, you could mess it up, so be careful.\r\n ;; Your init file should contain only one such instance.\r\n ;; If there is more than one, they won't work right.\r\n )\r\n\r\nI know there are issues in my emacs file. \r\n\r\nWhen I open emacs normally. Elpy is listed in package list as installed but is not available (M-x elpy returns [no match].¸\r\n\r\nMore precisely if I use package-refresh-contents then package-list packages. elpy is listed as installed but no match. \r\n\r\nIf I uninstall and reinstall it I get the following elpy-config:\r\n\r\nElpy Configuration\r\n\r\nVirtualenv........: None\r\nRPC Python........: 2.7.11 (c:/OSGeo4W/apps/Python27/pythonw.exe)\r\nInteractive Python: python (c:/OSGeo4W/apps/Python27/python.exe)\r\nEmacs.............: 25.1.1\r\nElpy..............: 1.12.0\r\nJedi..............: 0.9.0\r\nRope..............: Not found (0.10.3 available)\r\nImportmagic.......: 0.1.7\r\nAutopep8..........: 1.2.4\r\nYapf..............: 0.12.0\r\nSyntax checker....: pyflakes.exe (c:/OSGeo4W/apps/Python27/Scripts/pyflakes.exe)\r\n\r\nAlso : Package list packages tells me pyenv is installed but not elpy. \r\n\r\n  elpy               1.12.0        installed             Emacs Python Development Environment\r\n  company            0.9.0         dependency            Modular text completion framework\r\n  find-file-in-pr... 3.3           dependency            Find files in a project quickly.\r\n  highlight-inden... 0.6.0         dependency            Function for highlighting indentation\r\n  pyvenv             1.9           dependency            Python virtual environment interface\r\n  yasnippet          0.10.0        dependency  \r\n\r\n\r\nWhen I use my bat file to open emacs. The emacs file is not read and no modules are available. \r\n\r\nSo I have multiple issues:\r\n\r\nI can't use elpy in a normally started emacs session. \r\n\r\nHow do I get it to work?\r\n\r\nAnd I can't get it to work when started from my bat file. \r\n\r\n\r\n\r\nI want an emacs environment in which I can use Qgis being auto-completed by elpy in emacs. I had big troubles getting Qgis to work outside the GUI... The bat file is how I managed it.\r\n\r\nThanks in advance. \r\n\r\nI hope my issue is clear. \r\n"},"comment":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/comments/250703152","html_url":"https://github.com/jorgenschaefer/elpy/issues/997#issuecomment-250703152","issue_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/997","id":250703152,"user":{"login":"Modestio1","id":22491803,"avatar_url":"https://avatars.githubusercontent.com/u/22491803?v=3","gravatar_id":"","url":"https://api.github.com/users/Modestio1","html_url":"https://github.com/Modestio1","followers_url":"https://api.github.com/users/Modestio1/followers","following_url":"https://api.github.com/users/Modestio1/following{/other_user}","gists_url":"https://api.github.com/users/Modestio1/gists{/gist_id}","starred_url":"https://api.github.com/users/Modestio1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Modestio1/subscriptions","organizations_url":"https://api.github.com/users/Modestio1/orgs","repos_url":"https://api.github.com/users/Modestio1/repos","events_url":"https://api.github.com/users/Modestio1/events{/privacy}","received_events_url":"https://api.github.com/users/Modestio1/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T09:39:33Z","updated_at":"2016-09-30T09:39:33Z","body":"From what I managed to understand since the question, the issue is with my emacs init file. I, more or less, fixed the issue with a new init file. The issue could be closed or removed."}}
{"actor":{"display_login":"Modestio1"}}