Comment by sroerick
4 days ago
I'm a little embarrassed by my current workflow, which is:
A. Emacs and org mode on my laptop
B. Neovim to do development via SSH on my dedicated Hetzner box, because my laptop is too potato for dev
C. A bash script to push up any random notes I have up to the server
I have used sshfs, syncthing and unison in the past, but never quite got the workflow for either to click.
After about 13 years of trying I still am not as functional as most Dropbox users. I just can't stand Dropbox.
You're looking for tramp-mode. I used tramp-mode for years when working in a lab in grad school where is write code in emacs, have it save via SSH, then build and run the code on the remote. It allows you to use emacs just to author text and to use the remote for everything else.
Ok, so I'm playing with OCAML a lot right now, and it seems like in this workflow I would lose access to all the IDE tooling that is provided. That's not the end of the world, but still a big workflow hit which is solved by just remote ssh into NVIM. I'm definitely curious about your workflow, though.
Curious how would you lose it? Do you mean the tooling you're using won't work across Tramp? You should ask in an emacs community for more detailed feedback on this if you're interested.
1 reply →
Don't be embarrassed by a setup that works.
In the spirit of hopefully constrictive feedback:
A/B: Any reason not to do emacs or neovim everywhere? You can copy your dotfiles to the server if needed?
C: I wouldn't/don't use Dropbox either. If bash+scp works then great, but have you considered keeping your files in git? Still easy to sync over ssh from one machine to another, but natively handles things like sync conflicts.
I just haven't found Emacs to be particularly productive over SSH. IMO it works best on a local machine, there's just too much in the GUI which isn't as workable over terminal. Font rendering, images, clickable text links all take a hit. None are really deal breakers, but Emacs TUI just kind of feels like an afterthought. X11 over SSH doesn't feel responsive to me.
Its almost more of an aesthetic choice really, its just that Emacs feels comfier to me on a local machine. You otherwise lose too much of that feeling of customizing everything to your own taste, which is to me the nicest part of Emacs. It's kind of what I imagine a well tuned Forth to feel like.
Neovim is great over SSH, and I kind of prefer it as an editor - but Org support is too compelling. I've tried Neovim Org configs but they just can't compete with the legacy of Emacs Org. Org roam is unbeatable even with the preponderance of wiki style knowledge base apps. Org publish is just too good, as well. I've played with Neorg, and I really like it as a project, but it does feel like it is about 20 years behind.
I use git a lot but it runs into the large binary problem. I know git-annex is supposed to be good, but I haven't used it much. Syncthing is good but a lot of UI. I like unison but it isn't super well suited to the 'background sync' workflow.
My laptop is also a modified chromebook with a 50 GB HDD. I could get a real computer and solve a lot of my sync issues tomorrow, but then what would I have to complain about?
I see people with surface pros running VB studio, drinking Folger's with no discernable side effects and they are probably happier and more productive than I am.
Point being I might try Emacs on android
> I just haven't found Emacs to be particularly productive over SSH. IMO it works best on a local machine, there's just too much in the GUI which isn't as workable over terminal. Font rendering, images, clickable text links all take a hit. None are really deal breakers, but Emacs TUI just kind of feels like an afterthought. X11 over SSH doesn't feel responsive to me.
But that's what tramp is for, it works nicely and is surprisingly well integrated into the rest of Emacs. The only obvious downside is initial performance, but that can be worked around by tweaking SSH settings to keep connections open.
Another hack I use is to initiate a connection from remote to my local Emacs instance. The use case is ssh'ing into a remote shell, typing "remote-emacs <file-xyz>" and having that open the file on my local machine.
I did that by creating a script that gets my local IP from $SSH_CONNECTION, uses that to ssh into my local machine and executes "emacsclient -n /ssh:$HOSTNAME:$FILEPATH" which then in turn opens the remote file using tramp. Pretty useful.
3 replies →
> but Emacs TUI just kind of feels like an afterthought
This reads as a testament to how far the Emacs GUI has progressed!
1 reply →
I've used git-annex and I'll tell you, it's overcomplicated. Git LFS is probably better.
Your setup is pretty awesome. But if you miss dropbox so much, why not set up owncloud on the hetzner machine?
Does your bash script use rsync or does it duplicate some of rsync's functionality? (rsync also uses zip to speed things up.)
It literally just takes a string, formats it as an org entry, and then appends it to an 'incoming.org' file on my remote.
Then I can access the incoming.org file and org-refile entries at will.
Usage is just 'note "note text"'. this is generally how I process notes in org - I collect things in an inbox and them I elaborate on them, then refile them into a fully fledged note or the appropriate context.
Its dead simple, but comfy for my workflows and solves the problem of "collecting notes from mobile" without trying to struggle session mobile Emacs or Org mode
Hi OP, just chiming in here because you mentioned us at Hetzner and I saw your post. I also wasn't sure if the comment from nurettin below was meant to be "NextCloud" instead of "owncloud"...? NextCloud and Dropbox have some very similar use cases. We have a line of NextCloud-based products (Storage Shares). Maybe it would be worth trying out. --Katie