-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Error installing using straight.el #160
Comments
This seems more of an issue of your usage of I looked briefly at the |
@nanounanue I would suspect this has something to do with your config. I'm on straight + jupyter and things work at my end. Try changing your jupyter declaration to: (use-package jupyter
:demand t
:after ob ;; or maybe `:after org` would be sufficient
:config
(add-to-list 'org-babel-load-languages '(jupyter . t))
(org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)) And also, generally (use-package simple-httpd
:config
(require 'simple-httpd)) From my understanding, by the time |
@dzop thank you, I will check the documentation again. I tried your suggestion and it fails. @dangom thank you, for clarify the |
@dangom I am still having the same problems, could you share with me your |
most of my org config is here. My jupyter and python configs add the following: (use-package python
:config
(setq python-indent-guess-indent-offset nil
python-indent-guess-indent-offset-verbose nil
python-shell-interpreter "/Users/user/anaconda3/bin/pythonw3"
python-shell-interpreter-args "-m IPython --simple-prompt -i"
flycheck-python-flake8-executable "/Users/user/anaconda3/bin/flake8"
flycheck-python-pylint-executable "/Users/user/anaconda3/bin/pylint")
:bind
;; Start a new kernel or move to an existing one, like in Spacemacs.
;; Note that this function will be defined when jupyter is initialized.
("M-RET '" . jupyter-run-repl-or-pop-to-buffer-dwim))
;; Package `anaconda-mode' seems to play well with Jupyter and adds the missing
;; eldoc and jump-to-definition functionalities without depending on the old
;; Python comint REPL. Its keybindings also don't interfere with emacs-jupyter,
;; which is nice.
(use-package anaconda-mode
:hook ((python-mode . anaconda-mode)
(python-mode . anaconda-eldoc-mode)))
(use-package pytest
:commands (pytest-one
pytest-pdb-one
pytest-all
pytest-pdb-all
pytest-module
pytest-pdb-module)
:config (add-to-list 'pytest-project-root-files "setup.cfg")
(setq pytest-cmd-flags "-v")
:bind (:map python-mode-map
("C-c a" . pytest-all)
("C-c m" . pytest-module)
("C-c ." . pytest-one)
("C-c d" . pytest-directory)))
(use-package pip-requirements)
(use-package py-isort
:commands py-isort-buffer)
(use-package blacken
:after python
:demand t
:commands blacken-buffer
:bind (:map python-mode-map
("C-c =" . blacken-buffer)))
(use-package zmq) ; Required by jupyter.
(use-package jupyter
:demand t
:after ob
:init
(defun jupyter-run-repl-or-pop-to-buffer-dwim ()
"If a buffer is already associated with a jupyter buffer,
then pop to it. Otherwise start a jupyter kernel."
(interactive)
(if (bound-and-true-p jupyter-current-client)
(jupyter-repl-pop-to-buffer)
(call-interactively #'jupyter-run-repl)))
;; * eldoc integration
(defun scimax-jupyter-signature ()
"Try to return a function signature for the thing at point."
(when (and (eql major-mode 'org-mode)
(string= (or (get-text-property (point) 'lang) "") "jupyter-python"))
(save-window-excursion
;;; Essentially copied from (jupyter-inspect-at-point).
(jupyter-org-with-src-block-client
(cl-destructuring-bind (code pos)
(jupyter-code-context 'inspect)
(jupyter-inspect code pos nil 0)))
(when (get-buffer "*Help*")
(with-current-buffer "*Help*"
(goto-char (point-min))
(prog1
(cond
((re-search-forward "Signature:" nil t 1)
(buffer-substring (line-beginning-position) (line-end-position)))
((re-search-forward "Docstring:" nil t 1)
(forward-line)
(buffer-substring (line-beginning-position) (line-end-position)))
(t
nil))
;; get rid of this so we don't accidentally show old results later
(with-current-buffer "*Help*"
(toggle-read-only)
(erase-buffer))))))))
(defun scimax-jupyter-eldoc-advice (orig-func &rest args)
"Advice function to get eldoc signatures in blocks in org-mode."
(or (scimax-jupyter-signature) (apply orig-func args)))
(defun scimax-jupyter-turn-on-eldoc ()
"Turn on eldoc signatures."
(interactive)
(advice-add 'org-eldoc-documentation-function :around #'scimax-jupyter-eldoc-advice))
:config
(add-to-list 'org-babel-load-languages '(jupyter . t))
(org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)
(scimax-jupyter-turn-on-eldoc)
;; More readable repl traceback for Spacemacs Theme.
(set-face-attribute 'jupyter-repl-traceback nil :background "wheat1")
(jupyter-org-define-key (kbd "RET") #'newline-and-indent)
:bind (:map jupyter-repl-mode-map
;; Use only C-n and C-p to move through candidates.
;; This unshadows C-n and C-p to move through lines in the REPL.
("C-n" . nil)
("C-p" . nil)))
;; Feature `jupyter-repl' is part of emacs-jupyter.
(use-feature jupyter-repl
:hook (jupyter-repl-mode . smartparens-mode))
(use-feature ob
:demand t
:after (:all jupyter python)
:config
;; Set better default settings for org-babel.
(setf (alist-get :async org-babel-default-header-args:jupyter-python) "yes")
(setf (alist-get :session org-babel-default-header-args:jupyter-python) "py3")
;; Julia not setup yet and not loaded in org-babel-do-load-languages.
;; (setf (alist-get :async org-babel-default-header-args:jupyter-julia) "yes")
)
|
@dangom Thank you so much. I already tried your configuration, and If I execute it from
And if I try to open an org-mode file (like an empty
|
This must be something related to your config or the way you are using straight. I cannot reproduce. I'd suggest nuking your .emacs.d and starting emacs again. Perhaps when you switched from package to straight something went off. |
Totally agree. I am doing this at this moment.
Actually I am thinking in returning to package.el
Do you recommend that?
…On Thu, Aug 8, 2019, 16:42 Daniel Gomez ***@***.***> wrote:
This must be something related to your config or the way you are using
straight. I cannot reproduce. I'd suggest nuking your .emacs.d and starting
emacs again. Perhaps when you switched from package to straight something
went off.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#160>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADYXQADKEPS6RWEPF4R6PDQDQ5HBANCNFSM4IH4HGSQ>
.
|
I finally solved it! In order to get to the root of the problem, I recreated from scratch my emacs configuration. But basically the problem was twofold: NOTE: I am still using
(straight-use-package '(simple-httpd :type git :host github :repo "skeeto/emacs-web-server" :local-repo "simple-httpd"))
(use-package zmq)
(use-package jupyter
:after ob
:demand t
:requires (zmq simple-httpd)
...
Thanks @dzop and @dangom for your useful tips and advices and your time! |
That is confusing since the name of the package on MELPA is still |
Recently I migrated from
package.el
tostraight.el
, but I am getting the following error:Error (use-package): ob/:config: Cannot open load file: No such file or directory, simple-httpd
I am using the following code:
If I remove the line
(jupyter .t)
it doesn't throws an error.Given the error I added the following:
But still no luck
The text was updated successfully, but these errors were encountered: