emacscollective / borg

Assimilate Emacs packages as Git submodules
https://emacsmirror.net/manual/borg
GNU General Public License v3.0
255 stars 28 forks source link

Installing borg as secondary package manager : clone epkgs issue and git staging issue. #106

Closed rileyrg closed 3 years ago

rileyrg commented 3 years ago

reference : https://emacsmirror.net/manual/borg/Use-as-secondary-package-manager.html#Use-as-secondary-package-manager

1) observation (possibly my setup specific) : When I tried to install/assimilate my first package, in this case json-navigator, borg prompted me to git clone epkgs. Unfortunately the buffer it prompts in in isn't interactive. I killed the buffer and cloned ekpgs directly from the command line.

2) Git : so I have assimilated my first package as outlined above, but git is confusing me a little. Since I use an exclusionary .gitignore for my existing emacs config, I enabled borg and borg/* - it insisted on that in order to assimiliate. If I dont, I see

The following paths are ignored by one of your .gitignore files: borg/json-navigator hint: Use -f if you really want to add them. hint: Turn this message off by running hint: "git config advice.addIgnoredFile false"

So in my .gitignore

!borg !borg/*

I'm assuming here that we do indeed want to add them. But I'm not 100% sure as I don't use git submodules until now.

After this I can assimilate fine:

(09:14:27) Building json-navigator

Initializing drones...done (1 drones in 0.004s) Package cl is deprecated Creating /home/rgr/Dropbox/homefiles/directories/development/projects/emacs/emacs-config/borg/json-navigator/json-navigator-autoloads.el... Compiling /home/rgr/Dropbox/homefiles/directories/development/projects/emacs/emacs-config/borg/json-navigator/json-navigator.el... Done (Total of 1 file compiled)

Process emacs ... --eval (borg-build "json-navigator") finished

My magit status is now (excuse the screenshot - I'm unable to copy selected region as text from magit status)

screenshot-latest

If I try to stage unstaged changes The borg module won't stage. And expanding, I see this,

screenshot-latest

I'm guessing this is a trivial git issue I don't understand regarding borg directory's .gitignore status. Thanks for the help.

tarsius commented 3 years ago
  1. The "Clone https://github.com/emacsmirror/epkgs.git to ~/.emacs.d/epkgs/? " prompt? What do you mean by "isn't interactive"? Anyway, sounds like a fluke and you got it going.

  2. Yeah, that's expected and your approach to addressing seems appropriate. But there's a second step: (goto 3)

  3. While the cursor is on "modified borg/json-navigator" press enter to go to the submodule. You will probably "learn" that there is a new untracked file "json-navigator.elc", and some others. Setup a global gitignore rule for that as described at the end of https://emacsmirror.net/manual/borg/Bootstrapping-using-a-seed.html.