Skip to content

On opening a file, haskell-doc opens several files defined in import section #742

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

Closed
vlatkoB opened this issue Jul 2, 2015 · 9 comments
Closed

Comments

@vlatkoB
Copy link
Contributor

vlatkoB commented Jul 2, 2015

Hi,
In a Yesod project, on opening Application.hs file, haskell-doc automatically opens Import.hs and Foundation.hs (which is imported from Import.hs). So, instead of having just one intended buffer (Application.hs), there are two more unwanted buffers opened.
If haskell-doc is not turned on, it doesn't happen.

Is this a bug or a feature? :-)
Possible to turn off?

br,
vlatko

@gracjan
Copy link
Contributor

gracjan commented Jul 9, 2015

This seems to be a function of projectile no haskell-doc. Can you confirm that haskell-doc has nothing to do with this?

@gracjan gracjan changed the title [Question] On opening a file, haskell-doc opens several files defined in import section On opening a file, haskell-doc opens several files defined in import section Jul 9, 2015
@vlatkoB
Copy link
Contributor Author

vlatkoB commented Jul 9, 2015

@gracjan When I do not turn-on-haskell-doc, only one file is opened. I tried turning off everything but haskell-mode, so I think it is haskell-doc. I noticed it on a plain Yesod app. This might be specific because all three files, Application.hs, Foundation.hs and Import.hs are in the project root, not in src dir.

@gracjan
Copy link
Contributor

gracjan commented Jul 19, 2015

This is super strange. Do we know what mixture of functionalities cause this interaction?

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Jul 27, 2015

Just discovered what's blocking answering the haskell-process-suggest-* questions so I have to C-g 3 times to unblock/unfreeze, and than it leaves the answered letter ('y','n') at point in buffer. It is 'haskell-doc'.
I turned all other packages off, left just haskell-mode, and turned haskell-doc on/off.
Emacs is 24.5.1 on Arch, and all emacs packages updated. Not using ghc-mod.
Anyone else have such problems?

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Jul 29, 2015

And another discovery. If haskell-doc is not loaded, emacs freezes with message "Scanning declarations...". And never ends. Again, 3 x C-g allows to continue.

EDIT: I made a workaround for this problem.

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Nov 30, 2015

Found the culprit for opening other files. It is haskell-doc-show-global-types. When set to t, it opens files. Setting it to nil, other files are not open.
Closing this issue.

@vlatkoB vlatkoB closed this as completed Nov 30, 2015
@gracjan
Copy link
Contributor

gracjan commented Nov 30, 2015 via email

@vlatkoB
Copy link
Contributor Author

vlatkoB commented Dec 2, 2015

I'm rather busy right now, but I do not think there is a need for that. Customize for Haskell Doc Show Global Type says clearly:

Haskell Doc Show Global Types 
   If non-nil, search for the types of global functions by loading the files.
   This variable is buffer-local.

Another question is should this be done in another way?

@gracjan
Copy link
Contributor

gracjan commented Dec 2, 2015 via email

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

2 participants