glycerine/gemacs

doesn't work properly, cannot compile

kai-uwe-rommel opened this issue · 13 comments

I'm trying to use gemacs on Windows. Unfortunately, some key bindings do not work.
The C-<space> does not work and when I try C-x C-v the C-v does an OS-command "paste" on the window.
I'd like to look into the code to see if I can fix it even though I am a total Golang beginner.
But I can't even compile it with go on Windows (have go 1.21.1).
Perhaps over the time of five years, it became incompatible with current Golang compilers?

I can build with go1.18.1, but not run (Windows 10)

gemacs.go:759 panic: character set not supported.

I regularly run standard emacs under cygwin. I would recommend that rather than gemacs, which is kind of just a curiosity at this point.

https://www.cygwin.com/

Garrett may have fixes for the encoding issue -- for anyone who really does want to get this working.

gdamore/tcell#583

I don't have capacity atm.

I know and have standard emacs.
I was looking at gemacs while searching for a very small/lightweight standalone editor that I can easily take with me onto almost every system (Windows, Linux ...) where I have to work as an admin.

Ah. Good use case.

I updated the vendor of Garrett's tbox. I still get the panic when running gemacs under a cygwin window, but it actually did work under a regular CMD.exe windows terminal.

This is building under go1.18.2

You could also try cross-compiling with a windows target?

I installed go1.21.4 on my windows box, and it did build gemacs at tip.

See the "make release" target in the Makefile for cross compilation tips.

As I wrote, I'm a total Go beginner...
After setting GO111MODULE=auto things started working.
I could now build gemacs. It behaves the same as the official release executable, e.g. C-<space> does not work on Windows.
Let's see if I can find out why and fix it. I'm not sure, given my current track record.

Ah, I see C-space specifically. I can confirm it does not work for me either, on Windows. It does work on macOS and Linux.

You may want to consult Garrett for his thoughts on why. He knows 1000x more than I do about terminals and such. (He wrote github.com/gdamore/tcell ).

Will do so. Actually, I think it will not be easy to fix if at all as long as pure Go is used. So I thought about adding some other key binding in gemacs as an alternative to C-<space> (for example, C-x <space>) because that is a really essential function.
In which module are the key bindings set? I haven't found that yet ...

I assume that recognizing such keys will require a different way of getting keystrokes than the pure Go libraries use on Windows. But let's see what Garret responds with.

why would it be different?

I would recommend that you go and play with tcell on windows so you have some context.