7 ms·
I like orgmode and emacs and wish to convert more activities into orgmode. One thing I found tricky was switching computers or getting a new computer can be ve
by j7ake 6y ago
I like orgmode and emacs and wish to convert more activities into orgmode.
One thing I found tricky was switching computers or getting a new computer can be very disruptive to the emacs/orgmode workflow because of the amount of customizations that build over years of using a specific orgmode workflow. Apps, on the other hand, are very portable between devices (phone, table, laptop).
Are there easy solutions to make emacs and orgmode set ups more portable between machines?
- easytiger 6y agoDepends. checkin to a vc repo?
- clircle 6y agoEmacs config in github, org notes in dropbox. I did this for a little while, but now I just use org notes on my work computer, and the ios notes app for personal things. Org need not consume everything.
- nanna 6y agoI've found that using use-package in my init.el to manage, install and customize my packages helps me run a reasonably similar emacs setup across my Linux and Windows computers. I use git to synchronise it across systems. (use-package wordnut :ensure t ;; install package if it doesn't exist :config (global-set-key (kbd "C-c w") 'wordnut-search)) If I want a package to only load on Linux or windows, I can do it so: (use-package xclip :if (eq system-type 'gnu/linux) :ensure t :config (xclip-mode 1)) (use-package w32-browser :if (eq system-type 'windows-nt) :ensure t)
- jeremyjh 6y agoI wish there were a way to pin/lock the version of dependencies. Each time I update all packages something new breaks, and I have to spend time tracking it down and fixing or reverting it. So I've just been syncing my entire .emacs.d folder.
- snicker7 6y agoIf you are using Linux, you can already do with with Guix-installed emacs packages. Otherwise, I think straight.el is adding this feature in the future.
- jeremyjh 6y agoThanks, I didn't know about straight.el. Looking into that and the Doom distribution that is built on top of it. Looks far more sane.
- TacticalCoder 6y ago> So I've just been syncing my entire .emacs.d folder. That's one solution. I've got mine under Git. It's a bit more "work" in that when I upgrade packages (which I don't do all the time) I need to commit what's been deleted/added but I can at any time go back to any past working setup. Then I just use Git across user accounts / machines to synch my Emacs setup. Others are using Nix. > Each time I update all packages something new breaks... Don't know what's the "proper" way to do it but I upgrade packages manually and never all at once. That is: I never start from an empty Emacs. There are some tradeoffs I guess but I never have to track down which package is problematic and reverting is basically checking out the last commit. I'm not saying it's the best way to do it but it just works.
- robto 6y agoIn addition to nix and guix, which have been mentioned, you can also use straight.el[0]. It's a functional package manager for emacs, so you'd use it instead of package.el. It checks out the git repo for each package and maps package name->commit hash in a nice little file, which you can then commit to git. Then, on a new machine, it will check out that specific rev for all your packages. It even has nice use-package integration, so if you're already using that you likely won't have to change all your config. [0]https://github.com/raxod502/straight.el https://github.com/raxod502/straight.el
- anaerobicover 6y agoPlus 1 to this. I've adopted straight.el a little while ago and I've been especially loving how easy it makes hacking on my installed packages. Now that they're version controlled, I can easily try things and back them out if they don't work. And more importantly I can remember the tweaks I've made, because there's a readily-available diff. With regular package.el it was nearly impossible to keep track of little changes I had made and preserve them across upgrades or transfer them to another machine.
- fennecfoxen 6y agoI want to love org-mode, but I made the early mistake of trying to export some of my data in a coherent format. It seems okay for keeping organized, but it's a disaster as an archive or a publishing platform, in no small part because of the workflow issues you mentioned.
- ta988 6y agoYes that's currently my problem as well. What kind of things were you trying to export?
- ta988 6y agoTry Doom emacs (lots of sane defaults) plus vc repo with hostname dependent config (so email or use specific things don't spill).
- Naga 6y agoThis doesn't solve the direct issue, but I use emacs --daemon and either use it to edit files on other computers, or ssh into my main computer to access the daemon directly. It really simplified my workflow trying to get configurations in sync.
- ta988 6y agoI've used syncthing. Other than occasional "i forgot to save on one machine" issues it works great.
- ubermonkey 6y agoIf you are on Windows, my understanding is that it's pretty easy to create a portable emacs setup that you store in, say, your Dropbox or $preferred-sync-platform that would keep things central. But yeah, otherwise, it's a problem. I've grown very dependent on org and emacs, but access anywhere but my two laptops is kind of painful and kludgy. I can use BeOrg, but BeOrg seems to have been built to support an orgmode use pattern that is very different from mine. I can also ssh into my Ubuntu vm from my iPad, and obviously THAT experience is fine, but it's also more of a production than I'd really like if I just want to briefly interact with the org files.
- throwanem 6y agoHonestly, I don't really try to integrate everything into Org-mode. I use it very heavily for planning and tasking of programming projects, for example, because if I'm programming something, I'm already doing that in Emacs anyway. Likewise for time tracking in contract work, or projects where that's othwrwise needed. And I use Org for writing, for much the same reason: I do that in Emacs, anyway. But for general-purpose calendaring, reminders, and so on, it's much easier and more convenient to just run a CalDAV/CardDAV service that everything else integrates with OOTB. I do keep my ~/org in Dropbox and have a phone app I can use to make quick edits, and which I have used for longer writing on trains and such. But it's definitely not a first-class UI, and I don't try to use it as such. (On the other hand, I'm getting ready to redo my blog in Jekyll rather than Wordpress, not least to improve the authoring workflow by being able to bring it into Emacs...)
- ubermonkey 6y agoWe're in kind of the same place. Org is indispensable for my work life, but it's not EVERYTHING and isn't the core of my overall life, because it's not really a great option for on-the-go. I use an Exchange calendar for work, and I don't have appointments as part of my agenda in Org. I carry a notebook with me when I'm out and about for jotting things down. Like you, I can get to my corpus of org files via Dropbox from my phone and whatever editor I want to use there, but that's more of an "in a pinch" kind of use case than anything I'd want to do on the regular. If I need to write something real on the go, I just do it in Notes on the iPad, and then migrate it into org if that's where it needs to go when I'm back at my computer. I still blog, too, but I use a dedicated tool called MarsEdit on my Mac to do it. I haven't seen a reason to move that into Emacs, though I'm sure it's technically possible.
- throwanem 6y agoYou should be able to cover the 99% cases by making your ~/.emacs.d a Git repo and cloning it as part of setting up a new machine. This will bring along all your installed packages as well; 'package-list is a customization and thus preserved with your init, and #'package-initialize will install any missing packages it finds when called. (Speaking of preserved customizations, by default those are written into ~/.emacs.d/init.el. As part of setting up for a version-controlled ~/.emacs.d/, I'd strongly recommend setting 'custom-file to e.g. ~/.emacs.d/custom.el, so that those are stored separately from your init logic proper - it's not a huge issue either way, but customizations are a fertile field for merge conflicts due to the way they're written and stored, and I find this makes those conflicts significantly more comfortable to resolve.) You could in theory also add init logic to check for the presence of needed external binaries and, if necessary, install them via Homebrew, apt, or some Windows equivalent - I've thought about doing this since I already do have some platform-specific logic in my init, but it hasn't been enough overhead to bother since I rarely need to spin up a new workstation machine. (Also, of course, ensure that you store any secrets like passwords or other credentials in a separate file, not checked into version control.) To ensure you reliably have a specific version of Org, you can add the orgmode.org ELPA [1] to your 'package-archives and install a given version from there, rather than relying on whatever comes with a given Emacs build. I do this myself and recommend it to others; Org changes a good deal between versions in my experience, so version pinning helps avoid unexpected behavior that has otherwise been fairly common. In the same spirit, it can be worth building Emacs from source on a new machine. I also do this, again in order to ensure the behaviors of a specific version to which I've become accustomed; I generally upgrade only when a major new feature or bug fix makes it strongly worthwhile, and then on all my machines at once. (It's a manual process, but not a difficult one. I guess I could automate it, but for something I do a few times a decade, that hasn't seemed worth it so far.) [1] https://orgmode.org/elpa.html https://orgmode.org/elpa.html
- throwanem 6y ago(Just to add a quick corrigendum here - you need to separately invoke #'package-install-selected-packages, after #'package-initialize and adding your ELPA repos, to install missing packages. Sorry for the error! It had been a few years since I needed to set up Emacs on a fresh machine, until last weekend when I did so and discovered the omission.)
- zarkov99 6y agoYes, keep your ~/.emacs.d in Dropbox. I have been doing that for I think 10 years or so. It works very well.
- stjohnswarts 6y agoI haven't used drop box before, how do you keep synced? Do you access it the .emacs.d through a symlink? do you copy it over to ~ and copy back when you make changes? Do you use it directly from the Dropbox "local" folder? I'm currently using git to push/pull but it would be nice if it was more automated.
- zarkov99 6y agoDropbox keeps it synced, that is its function. I simlink from ~/.emacs.d into Dropox. Its fairly seamless, you change it in one machine and it just pops up in the other.