Skip to content
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

Cannot load idris #475

Open
colin-adams opened this issue Feb 20, 2018 · 7 comments
Open

Cannot load idris #475

colin-adams opened this issue Feb 20, 2018 · 7 comments

Comments

@colin-adams
Copy link

Idris - latest git version
idris-mode - freshly installed from melpa with a brand-new .emacs and .emacs.d

.emacs contains:

'(idris-mode-hook
(quote
(turn-on-idris-simple-indent turn-on-eldoc-mode column-number-mode)))
'(package-selected-packages (quote (idris-mode))))

Opening a .idr file puts the buffer into mode Idris (Not loaded)

Pressing C-c C-l results in message:
Buffer idris-repl has no process

@jsoo1
Copy link
Contributor

jsoo1 commented Sep 5, 2018

Did you happen to have a package dependency in your ipkg pkgs clause that was not resolved? This happened to me when there was a message Warning from Idris: The following packages were specified but could not be found: - recursion in *Messages*. This is odd becuase I have pkgs = recursion_schemes in the ipkgfile. Note the missing _schemes.

@david-christiansen
Copy link
Member

david-christiansen commented Sep 5, 2018 via email

@jsoo1
Copy link
Contributor

jsoo1 commented Sep 6, 2018

Where do you think the messages should end up?

@jsoo1
Copy link
Contributor

jsoo1 commented Sep 6, 2018

Hmmm. I think I was experiencing #460 but I still like the UX improvement of moving the message to an idris buffer.

@david-christiansen
Copy link
Member

I think it would make sense to show them in a *Help*-style buffer. Something like replacing this in inferior-idris.el:

(message "Warning from Idris: %s" msg)

with something like this:

(idris-show-info (format "Warning from Idris during startup:\n %s" msg))

to make it more obvious that it's something the user should know about and perhaps do something about.

@david-christiansen
Copy link
Member

This would require pushing some imports around to avoid cycles in the module import graph, but it should be doable. Otherwise, it could be something that just pops up a dedicated non-Idris-info buffer and puts it into read-only mode. Sketch:

(defun idris-show-inferior-idris-warning (msg)
  "Show MSG in a pop-up buffer."
  (let ((buf (get-buffer-create "*Idris Startup Warnings*")))
    (with-current-buffer buf
      (insert msg)
      (terpri)
      (read-only-mode 1))
    (pop-to-buffer buf)))

@jsoo1
Copy link
Contributor

jsoo1 commented Sep 7, 2018

Looks good. Should we create an issue for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants