[Haskell-beginners] how to enter EOF in emacs haskell mode
Chul-Woong Yang
cwyang at aranetworks.com
Thu Oct 6 06:39:37 UTC 2016
Putting following code to .emacs solves the problem.
--
(defun haskell-send-eof ()
"send eof to interactive buffer"
(interactive)
(process-send-eof (haskell-process-process (haskell-interactive-process))))
(add-hook 'haskell-interactive-mode-hook
(lambda () (local-set-key (kbd "C-c C-d") 'haskell-send-eof)))
2016-09-15 1:17 GMT+09:00 Chul-Woong Yang <cwyang at aranetworks.com>:
> Yes, I've tried comint-send-eof with no success:
>> Current buffer has no process
>
> haskell-mode's comint-interface is deprecated.
> No success with googling and browsing of documentions on haskell-mode.
>
> 2016-09-15 0:46 GMT+09:00 Norbert Melzer <timmelzer at gmail.com>:
>>
>> So have you tried `M-x comint-send-eof RET` then? If that works, it is
>> just a matter of binding it to whatever you want.
>>
>> Chul-Woong Yang <cwyang at aranetworks.com> schrieb am Mi., 14. Sep. 2016 um
>> 17:06 Uhr:
>>>
>>> No. Usual `C-c C-d' (comint-send-eof) does not work in haskell-mode's
>>> interactive buffer.
>>> It is not defined, emacs responds as follows:
>>>
>>> > C-c C-d is undefined
>>>
>>> 2016-09-14 20:01 GMT+09:00 Shrivats <shrvtsnvs at gmail.com>:
>>>>
>>>> Hi,
>>>>
>>>> If it's anything like other interactive modes, does
>>>> C-c C-d do the job of signalling EOF?
>>>>
>>>> Shrivats
>>>>
>>>>
>>>> On Sep 14, 2016 15:53, "Chul-Woong Yang" <cwyang at aranetworks.com> wrote:
>>>>
>>>> Hi, all.
>>>>
>>>> I use emacs haskell mode for editing and testing simple programs.
>>>> I have no success in finding out how to enter EOF to haskell program
>>>> in emacs "Interactive-Haskell" buffer.
>>>> So I am unable to test haskell program which reads from stdin. :-(
>>>>
>>>> Any help would be appreciated deeply.
>>>>
>>>> Regards,
>>>> Chul-Woong Yang
>>>>
>>>> _______________________________________________
>>>> Beginners mailing list
>>>> Beginners at haskell.org
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Beginners mailing list
>>>> Beginners at haskell.org
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>>>
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> Beginners at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>
More information about the Beginners
mailing list