p3r7 / norns.el

monome norns interactive development for Emacs
MIT License
9 stars 2 forks source link

Chopping domain when editing remote files fails DNS resolution #1

Open xmacex opened 11 months ago

xmacex commented 11 months ago

Moving from llllllllines discussion to issue.

The norns--core-curr-host function chops the value of norns-mdns-domain from the hostname on line 248 whenever we are editing a remote file. I have not changed any settings of the mode.

https://github.com/p3r7/norns.el/blob/b82aa3dbaef1216edcf06fd6db66abb17cd91a4a/norns.el#L238-L249

M-x norns-maiden-send RET print("hi") RET

norns/5555 nodename nor service provided, or not known

However if I comment out that line 248 (and rebalance the parentheses)))), norns-maiden-send does what I expect.

M-x norns-maiden-send RET print("hi") RET

hi
<ok>

maiden>>

Also the REPL works just fine.

On my Android wifi hotspot I can get to norns.local just fine from browser, SSH or TRAMP, but there is no such host as norns without the domain. Same behavious whether I run Emacs on macOS or on Android in Termux, and open a file on norns over TRAMP.

I am missing the rationale for chopping the domain... What would work in my case, would be to remove the chopping ie the entire line 248, or make it conditional or customizeable if it serves some purpose when connecting without a domain. The monome docs about connecting over network as well as advanced ways use the full hostname+domain norns.local.

Thanks for this mode, it is great fun <3

p3r7 commented 11 months ago

thanks again for reporting & investigating this.

i honestly don't remember exactly why i did this specifically but i guess it was either for a platform-specific (maybe Windows?) behavior or due to a specific network setup (.local is valid on my network but it's mDNS domain seems to be .lan).

to fix this:

i'll need to parse the commit logs & do some tests on my end.

xmacex commented 11 months ago

https://github.com/p3r7/norns.el/blame/96802382da9f36cf785fe32bd06d9dc3edfc5820/norns.el#L146

https://github.com/p3r7/norns.el/commit/df8502ee03c613d4fc43f5b2e37de0906e18a789#diff-32c498dd694d6862c9c6ef163eaede18480145086ba8916c870f4802b636b98eR94-R97

p3r7 commented 11 months ago

mhm, it's either a Windows specific thing or i messed up when adding support for dockerized norns.

xmacex commented 11 months ago

Sorry I have no experience on either. norns in Docker with Emacs is such an {ince,contra}ption I get vertigo simply thinking about it.

ergodicbreak commented 7 months ago

hello @p3r7, thanks for norns.el I got started with it tonight! I needed to rebind norns-mdns-domain from "local" to "lan" for the maiden-repl to work on my Manjaro Linux laptop (oddly I use norns.local in the browser) -- not sure if that's in the scope of this issue but it seemed related.

p3r7 commented 7 months ago

not sure if that's in the scope of this issue but it seemed related.

i'm not sure really.

needed to rebind norns-mdns-domain from "local" to "lan"

the aim of those vars is to rebind them. they come with default values but are essentially config.