Opened 6 years ago

Last modified 4 months ago

#3282 new feature request

How to start an emacs editor within ghci asynchronously with :edit filename.hs :set editor emacs & don't go

Reported by: petersonx Owned by:
Priority: lowest Milestone: 7.12.1
Component: GHCi Version: 6.10.2
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Hi Haskell Team,
if i set my editor to ":set editor emacs &" and - say- want to edit my aaa.hs file , I enter ":edit aaa.hs", the ghci console answers: "/bin/sh: a.hs: not found", instead of opening emacs asynchronously. (":set editor nohup emacs" does not help either)
then while editing emacs even i can enter commands ? into ghci, but they are not performed at all. GHCi's work goes on not before I close emacs.
help is appreciated,
Hape - Novice ;-)

Change History (13)

comment:1 Changed 6 years ago by igloo

  • difficulty set to Unknown
  • Milestone set to 6.12 branch

So if you could run an editor asynchronously, you would expect ghci to watch the file and reload if it is saved, presumably?

comment:2 Changed 6 years ago by petersonx

reloading the file could be done manually.

the wished feature in my eyes is opening an editor asynchronously (and not blocking ghci)

comment:3 Changed 5 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:4 Changed 5 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:5 Changed 4 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:7 Changed 4 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:9 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:10 Changed 2 years ago by mf825

  • Type of failure set to None/Unknown

there is an easy work-around, at least for emacs users:

start emacs like this in a separate terminal:
$ emacs -e server-start

then, in ghci:

:set editor emacsclient -n
:load Main.hs
:edit

emacsclient should not block, so you can continue using ghci. the only catch is that emacs will only open a new window if it is configured to do that (mine only has buffers), and only if Main.hs hasn't already been loaded into a buffer.

comment:11 Changed 10 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:12 Changed 4 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:13 Changed 4 months ago by thoughtpolice

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

Note: See TracTickets for help on using tickets.