Opened 5 years ago

Last modified 16 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.6.2
Component: GHCi Version: 6.10.2
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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 (10)

comment:1 Changed 5 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 5 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 4 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:4 Changed 4 years ago by igloo

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

comment:5 Changed 3 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:6 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:8 Changed 2 years ago by igloo

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

comment:9 Changed 19 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:10 Changed 16 months 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.

Note: See TracTickets for help on using tickets.