reddit / emacs

What is everyone's favorite way of trying out an alternative Emacs setup?

xenow · 2022-10-28 04:39
For instance, I've been thinking of going more light-weight and porting from some long time packages I've been using, in favor of some more recent "Emacs api" based alternatives. However, it's quite painful to try to adjust the settings drastically on my "perfect" system (I botch a config, all of a sudden just undoing those changes is difficult). I've been thinking of making an alternate/fake user account just for the other Emacs setup (or a chroot?) - anyone have any other ideas/preferences?
MitchellMarquez42 · 2022-10-28 04:43
I just mv .config/emacs .config/emacs.mitch git clone https://cool-config.git .config/emacs And then when I'm done mv .config/emacs .config/emacs.cool mv .config/emacs.mitch .config/emacs
thetemp_ · 2022-10-28 05:05
Emacs 29 has a new command-line option, "--init-directory [path]". Works great!
andyjda · 2022-10-28 05:16
I just keep my config in a git repo. If I want to make any changes I switch to a new branch
danderzei · 2022-10-28 05:35
`emacs -ql newinitfile.el`
cellular--automaton · 2022-10-28 10:24
Holy smokes batman! So no more chemacs2 ?
cellular--automaton · 2022-10-28 10:28
I use chemacs2. I read about the `init-directory` switch in Emacs 29 below which sounds even better, if you use Emacs 29.
DrownNotably · 2022-10-28 11:23
If you're using < emacs 29, just give a different home. `HOME=$HOME/emacstest emacs`
compu_musicologist · 2022-10-28 12:36
This is what I do with everything where the config is plaintext and easily diffable with git. Enables zero-risk experimentation with configs.
fieldri1 · 2022-10-28 13:01
I have a folder which contains all my configuration files in a tree, and I use GNU Stow with this tree to manage alternate configurations. I then have a live Emacs configuration and a development configuration. Running the appropriate Stow command and restarting emacs switches between them. Would be overkill just for emacs, but I use the same approach for things like i3, Conky etc. The tree is then a git repository.
github-alphapapa · 2022-10-28 17:37
That is what I wrote this tool for: https://github.com/alphapapa/with-emacs.sh I regularly run multiple Emacs configs side-by-side. Unlike Chemacs or Chemacs2, it requires no configuration.
github-alphapapa · 2022-10-28 17:37
That affects not only Emacs's config directory but everything else in your homedir. Instead see https://github.com/alphapapa/with-emacs.sh
[deleted] · 2022-10-28 17:48
[deleted]
akirakom · 2022-10-28 17:55
Since I am satisfied with my setup, I rarely try out popular configs. On Linux, you can use bubblewrap to sandbox programs. Here is an example: https://github.com/emacs-twist/examples
rbgbrbgb · 2022-10-28 19:47
Ss is&;や,,00
xenow · 2022-10-28 20:00
> alphapapa This is amazing - lightning fast launch with something like: with-emacs.sh --no-package --no-refresh-packages --dir /tmp/xxx -- -nw Which will enable me to cp -R my entire ~/.emacs.d and tune it from my safe/working install, with rapid testing of the derivative install!
xenow · 2022-10-28 20:20
This is ok for a single file (it's what I use for my "min.el" which is nothing but core Emacs packages, aka no GNU Elpa/MELPA), but I feel like it breaks down on a more comprehensive setup (I have an init.el that itself does a require on many other packages like ~/.emacs.d/my-files/my-evil.el, ~/.emacs.d/my-files/my-org.el etc.) - which in a big rework (converting from helm to selectrum, and lsp to eglot and so on) would involve many changes in many files.
cellular--automaton · 2022-10-29 01:58
Nice! I've been a long time user of `stow` for dotfile management too! I even wrote a little article about it [here](https://tusharchauhan.com/writing/dotfile-management-using-gnu-stow/) in case you want to have a quick readthrough.
a-hausmann · 2022-10-29 03:29
Function "die" ... looks like you've had some perl in your background. (Or there's "die" in another language I've not used before.) I need to try this.
arensb · 2022-10-29 03:38
So far, I've been setting up a new git branch when I want to try out a new feature. It's not perfect, but it works pretty well.
igorepst · 2022-10-29 11:11
Just to notify you: https://github.com/minad/vertico/issues/237. The issue was opened by `selectrum` dev.
xenow · 2022-10-29 15:29
oh man - thanks - looks like I should just stick with helm lol
github-alphapapa · 2022-10-30 14:07
Exactly. :)
github-alphapapa · 2022-10-30 14:10
Haha, yes, way back I did use Perl. Convenient idioms can be found in many languages. :) If you're interested in shell script tricks, check out the `debug` function, which is a self-redefining or collapsing function: https://github.com/alphapapa/with-emacs.sh/blob/master/with-emacs.sh#L54
lstrang · 2022-11-04 20:51
Since no one has mentioned it, I'll add ihsec: https://github.com/daedreth/ihsec You put different configs under ~/.ihsec, then use the `ihsec set` command to set one of them.