Fork me on GitHub
#emacs
<
2020-02-06
>
tianshu09:02:44

@onetom what's your solution for now, I'm trying to find a way for remote pair-programming.

onetom09:02:04

i still don't have a good solution. what i do have is all the pairing parties being on the same http://zerotier.com network, have their built-in mac remote management turned on with the "anyone can request permission" option and no password specified. that way u can just open and u see the same screen. it's very network intensive, but quite usable at lower screen resolutions. it also consumes less bandwidth, if the viewer scales down it's window. ah, and of course u have to enable the Control checkbox in the Options... dialog of the System Preference / Sharing / Remote Managment form.

onetom10:02:47

what i also looked into just last night is to setup a nixos machine, because it can be configured declaratively, very concisely. then enable the per-user emacs daemon support in it. brew cask install xquartz start a bigger xterm with xterm -fa Mono enable middle click emulation with opt-click. ssh -Y nixos-host run emacseditor which is a wrapper script which connects to the running daemon. then u can use the make-display-frame or what, which everyone refers to; i haven't actually tried this step yet.

onetom10:02:09

if u dont use the per-user emacs daemon support and start emacs via a remote desktop interface, then emacsclient -c will have X11 authorization errors, when u want to create a new frame via ssh.

onetom10:02:55

i tried this locally using the latest nixos virtualbox appliance. this is how my /etc/nixos/configuration.nix looks like:

{ config, pkgs, ... }:

{
  imports = [ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix> ];

  # Let demo build as a trusted user.
nix.trustedUsers = [ "demo" ];
nix.binaryCaches = [  ""];
services.openssh.enable = true;
services.openssh.forwardX11 = true;
services.emacs.enable = true;
programs.ssh.startAgent = true;
programs.x2goserver.enable = true;
services.xrdp.enable = true;
services.xrdp.defaultWindowManager = "${pkgs.icewm}/bin/icewm";
# networking.firewall.allowedTCPPorts = [ 3389 ];
networking.firewall.enable = false;
}

onetom10:02:30

as u can see i've also tried the built-in RDP and x2go support they work too, but they were slow, even locally

tianshu10:02:36

emmm, I'm using linux and my partner using mac. I think he won't install xquartz, it is a heavy stuff.

tianshu10:02:53

we all use emacs

tianshu10:02:54

I think we can have per user emacs daemon, but that will be two instances, if we use the same daemon, we can't have different configuration.

onetom11:02:22

80M /Users/onetom/Library/Caches/Homebrew/downloads/91b9d0c82398ac57be33a52922d5ed21ddf4b747516e70738f5ec6a2a9944d0c--XQuartz-2.7.11.dmg

onetom11:02:53

i don't think it's an acceptable excuse that it's heavy... we can agree it's quite stupid to have these hefty dependencies, but there are a lot of more serious things which one should worry about...

onetom11:02:07

and yes, that's correct, you can't have different configurations, just like u can't have different configs when u r physically sharing a monitor. but this is a social problem, which is independent from whether u r remote or local pairing.

tianshu11:02:06

We've tried use a remote server and tmux.

tianshu11:02:33

it's pretty basic, we only have a shared repository. nothing more.

tianshu11:02:24

But I think almost every Emacs user have their own config, how do you solve this problem?

onetom16:02:49

im an intellij+cursive user and im learning emacs, just so i can teach clojure to my colleagues easier... compared to that, having different emacs configs is a lot smaller problem :) cross-editor collaboration is very hard solve, but https://floobits.com/ seems very promising. i haven't tried it again since it was released, though, so i cant give my blessing.

onetom16:02:23

but i agree, that the character based emacs is quite an eye-sore and behaves slightly different way than the graphical one, that's why i was looking into a solution which works with the graphical one. ssh -Y + XQuartz + make-frame-on-display might solve this quite well, i hope

tianshu18:02:09

Is this solution work for Linux?

onetom15:02:46

oh course, that's where is works the best

tianshu16:02:14

Hey, we finally decided to just use mosh + tmux + emacs, and use same one linux user but different .emacs.d folders. After some little tweaks to make our emacs configs work well in terminal, we enjoy our solution for now for backend development. mosh provide a very smooth typing experience.

👍 4
onetom14:02:11

different .emacs.d folders sound like a good idea, but how does that work for emacs --daemon mode? can 2 differently configured emacs-es connect to the same daemon somehow?

tianshu14:02:10

No, you can. But in terminal mode, you can just press C-z /`fg` to switch between shell and emacs, so we don't need emacsclient on remote server.

tianshu14:02:49

sorry, you can't use emacsclient, typo

iammiles18:02:49

Does anyone have any experience using paredit with emacs-doom? I just installed doom, like it a lot, but I want to swap out smartparens for paredit (which I'm more familiar with)

ag19:02:42

M-x sp-use-paredit-bindings

iammiles19:02:15

That works great. Thanks, @U0G75ARHC!

4