Toxaris / pts

Interpreter for functional pure type systems.
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

Add Emacs mode (fix #81) #85

Closed Toxaris closed 9 years ago

Toxaris commented 9 years ago

Can you test whether this works on your machine, Paolo?

Stuff that should work:

  1. copy-paste the snippet from the README.me to your .emacs, restart emacs, emacs should not break.
  2. visit UU.lpts, the mode should load, nothing should break, you should get syntax highlighting.
  3. Press C-c C-l. Emacs should ask you for a project directory.
  4. Then emacs should ask you for a PTS instance. There should be tab completion.
  5. Then emacs should call pts for you.
  6. Visit UU/T/cps.lpts and press C-c C-l. This time, emacs should guess the project directory from the module statement and only ask you for the instance.
Blaisorblade commented 9 years ago

On it.

Blaisorblade commented 9 years ago

:+1: It seems very good, so merging. I have just two minor problems:

  1. visit UU.lpts, the mode should load, nothing should break, you should get syntax highlighting.

No, at that point pts-mode doesn't even exist. I need to reexecute the Emacs snippet in .emacs (or in a separate file). But I am not sure your code is at fault here.

  1. Visit UU/T/cps.lpts and press C-c C-l. This time, emacs should guess the project directory from the module statement and only ask you for the instance.

That doesn't work if you visit Uu/T/cps.lpts (if you manage to get Emacs not to fix the case) — I think that's a minor issue, but since we use both case-insensitive OSes, I thought I could mention it. (Why did I even try in the first place? Not sure).

Blaisorblade commented 9 years ago

I fixed the first problem, so I'm all set. This was the error I got:

Loading /Users/pgiarrusso/.emacs.d/pts.el (source)...
Loading PTS returned an invalid path: /bin/bash: pts: command not found

Loading /Users/pgiarrusso/.emacs.d/pts.el (source)...done

see commit if you want gory details.

Toxaris commented 9 years ago

I need to reexecute the Emacs snippet in .emacs (or in a separate file). But I am not sure your code is at fault here.

Sounds like you skipped the "restart emacs" step.

Ahh no, thats because of your path situation, now I get it.

Blaisorblade commented 9 years ago

Ahh no, thats because of your path situation, now I get it.

:+1:

Blaisorblade commented 9 years ago

On my desktop@work I forgot to update pts. The result was funny:

Loading /Users/pgiarrusso/.emacs.d/pts.el (source)...
Tramp: Opening connection for pts using scp...
Tramp: Sending command `exec ssh   -e none pts'

Tramp: Waiting for prompts from remote shell
Tramp: Sending command `exec ssh   -e none pts'
Tramp: Opening connection for pts using scp...done

Updating pts fixed the problem, but this failure mode looks still "interesting". Whatever.

Toxaris commented 9 years ago

Related to #13?

Blaisorblade commented 9 years ago

Yeahish... Googling "Emacs pts" mentions /dev/pts/, which is the Linux name for virtual terminal paths :-).