/gitpod-tp-env

Template repository for Emacs-in-Browser-Terminal using Dotfiles from https://github.com/erikmd/gitpod-workspace-emacs-nw

gitpod-tp-env

Using Emacs in Gitpod (Cloud dev. env.) for OCaml/Coq

  1. Fork this repository (or use GitHub's template feature) so that it includes this .gitpod.yml file.
  2. Log in Gitpod Classic using your GitHub account.
  3. Open your Gitpod Preferences
    • Set your Dotfiles Repository URL: https://github.com/erikmd/gitpod-workspace-emacs-nw
  4. Open your Gitpod Environment Variables
    • Add a new variable named XTERM_CONFIRM_BROWSER_EXIT with value true and scope */*
      (this setting ensures the usual Emacs keystroke Ctrl+W won't unexpectedly close your browser tab)
  5. Open the Gitpod URL https://gitpod.io/new/?autostart=false&editor=xterm
    • Fill the form with the URL of your own GitHub repository
    • Select the Terminal editor and click on Continue
    • If ever the loading takes too much time, try to reload the tab once (Ctrl+R)
  6. Run emacs in the workspace shell (based on tmux)
  7. Note the existence of the (?) special menu in Emacs, also:
    • type Alt+F1 or Ctrl+F1 to get some help on the main key bindings;
    • type F7 to disable xterm-mouse-mode and thus allow copy-and-paste with the mouse.
  8. Open an OCaml (C-x C-f code.ml RET) or Coq (C-x C-f code.v RET) file.

Tip

You may also be interested in the Gitpod Browser Extension to create workspaces more easily from other repositories/PRs.

At the beginning of the session

If remote pair-programming is needed:

At the end of the session

  • You can save your work by using Git commands, for example:
    git commit -a -m "WIP" && git push
  • Otherwise, you might want to Pin the workspace in https://gitpod.io/workspaces.

Screenshots

tmux session at startup

gitpod-classic + terminal-browser + tmux

emacs in tty mode with mouse enabled

gitpod-classic + terminal-browser + emacs

Limitation

This approach relies on the Gitpod Classic plans which are intended to be replaced with Gitpod Flex after September 2025.