-
Notifications
You must be signed in to change notification settings - Fork 347
Choose a REPL session target from list #828
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
Conversation
@vlatkoB: almost great! I think
|
Almost all requests fulfilled, except the using something from (defun haskell-cabal-extract-targets ()
"Enumerate targets from .cabal file."
(interactive)
(let (matches)
(goto-char (point-min))
(haskell-cabal-next-section)
(while (not (eobp))
(push (haskell-cabal-section-value (haskell-cabal-section)) matches)
(haskell-cabal-next-section))
(reverse matches))) However, it works correctly only when invoked inside (defun test-in-temp ()
(interactive)
(let ((cabal-file (haskell-cabal-find-file)))
(when (and cabal-file (file-readable-p cabal-file))
(with-temp-buffer
(insert-file-contents cabal-file)
(print (haskell-cabal-extract-targets)))))) Either I'm blind to some obvious mistake, or functions in I asked on IRC for help, but no answer. I'm very fresh in elisp, and can't solve it without going too deep, for what I currently have no time. In other words, any help is appreciated. |
I just tested the two functions that you've put here and those work (well, almost). I get all the answers plus some additional things.
|
If you mean the functions in the post above, the result is not correct. Not only there are more results than needed, but the result for test is prefixed with The result of the function should be the same when in the buffer with Can the author of |
If you look into (modify-syntax-entry ?- "w" st) That says that in buffers where |
It is working now. Changed |
Works for me. Please clean up two more things and we are good to go. |
What |
There are two commits in this pull request. defvar is in line 449 of the first one. |
I'm a little lost. Could use a little help. |
It was me who was lost, everything is fine. I have one more request though: can you make it use its own separate history variable? Have a read here: http://www.gnu.org/software/emacs/manual/html_node/elisp/Minibuffer-Completion.html There is an argument called Can you do this? |
Can you check? |
@vlatkoB: Can you fix these two small things? Your pull request is valuable and it is a shame that it wait in queue. |
@gracjan They were fixed the day you asked for them. |
Fixes #817 |
Choose a REPL session target from list
New function
haskell-session-choose-target
enables choosing from available targets list from.cabal
file.It is just a wrapper around
haskell-session-change-target
which can still be used to select a target directly, by specifying it as an arg.