Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't work. #10

Open
a-berg opened this issue Jan 31, 2021 · 3 comments
Open

It doesn't work. #10

a-berg opened this issue Jan 31, 2021 · 3 comments

Comments

@a-berg
Copy link

a-berg commented Jan 31, 2021

Dunno if I have misread the instructions but basically I have put 3 configs inside ~/.ihsec (including one that is a symlink to the git repo I use for my emacs config and one installed from github via ihsec install) and after doing ihsec set XXX the folder .emacs.d just has a link to the folder in .ihsec/XXX.
Is this the intended use? Because Emacs is unable to find init.el if it's not directly inside .emacs.d.

I'm using GNU Emacs 26.3 @ Pop! OS 20.10 (which in itself is basically very close to ubuntu 20.10)

@a-berg
Copy link
Author

a-berg commented Feb 1, 2021

I think it's a matter of how ln works. I'm a bit of a noob, but by doing

ln ln -s "$CONFIGS_DIR/$2/.*" $EMACSDIR
                         ^^^

it works. If you confirm that this doesn't break anything I can make a PR.

@lkcampbell
Copy link

lkcampbell commented Feb 24, 2021

I ran into the same problem on my Mac.

I believe the expected behavior is to change the regular directory ~/.emacs.d/ into a symbolic directory link that points to ~/.ihsec/foobar/.

The observed behavior, as stated above, is that a symbolic link to ~/.ihsec/foobar/, called foobar, is put inside of the ~/.emacs.d/, which doesn't work.

I tried the script change proposed by @a-berg but it didn't work for me. Not sure why. I'm not great with bash scripting either.

I imagine the bug fix for this would involve some permutation of the ln command that changes the existing source directory into a symbolic link, but, again, I am not savvy enough with bash scripting (yet) to know what that solution would be.

One workaround that you can do without changing the script is to remove the ~/.emacs.d/ directory prior to running the command. Although this still has some problems, such as the arrow appearing next to all entries in the output for ihsec list, instead of only showing an arrow next to the current configuration.

I might play around with it a bit more. @daedreth are you still maintaining this repo? Doesn't look like you have had activity in a while. If so, I will investigate and make a pull request. If not, I will just tweak my own version. Thanks.

@SamuelBanya
Copy link

Agreed.

NOTE: Do the following at your own risk and make sure you backup your Emacs config on a Git repo if necessary.

Just tried out 'ihsec' and the only way to truly make it work the first time is to delete your contents of '~/.emacs.d'. Afterwards, it was pretty easy to just grab peoples' Emacs configs from GitHub to test them out. Kind of fun, and still a very useful package.

Would be cool if someone made an actual MELPA package with a Helm style mode to just swap stuff on the fly but I guess you would need a baseline config for something like that too to keep it consistent. The choice to use Bash in that sense actually makes a ton sense with this in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants