# -*- mode: org -*-
* v4.5.3    2026-08-01

- Thoughts and whitespace.

* v4.5.2    2026-07-01

- ~borg-insert-update-message~ believed all drones were removed
  when invoked from a subdirectory.  #183

* v4.5.1    2026-06-01

- Thoughts and whitespace.

* v4.5.0    2026-05-01

- Support assimilating packages from the repositories used for GNU
  ELPA and NonGNU ELPA.  Previously such packages were installed from
  the respective repository on the Emacsmirror, because the [Non]GNU
  ELPA repositories track every package they distribute, which we are
  not interested in, when installing a single package.  Dealing with
  this complication requires a lot of code on our side.

* v4.4.3    2026-04-01

- Increase CI security.  8638515

- Adjust to change in Emacs 31.0.50.  6fbd5c4

* v4.4.2    2026-03-01

- Old man yells at cloud.

* v4.4.1    2026-02-01

- When Emacs is run from its build directory, add the respective info
  directory to ~Info-directory-list~.

* v4.4.0    2026-01-01

- Dropped support for Emacs 27.  64f67e5

- For Emacs 28 autoloads were not re-generated from scratch.  f2316c1

- Improved documentation.

- Added new variable ~borg-debug-user-init-files~.  d09d38a

- No longer load a library before compiling it.  fcc513d

- Started to automatically report how long it takes to load ~borg~ and
  ~early-init.el~ (or more precisely the setup file, which loads ~borg~).
  Added new function ~borg-report-init-duration~, which can be used to
  do the same for other setup files, and ~borg-report-init-duration~,
  which can be used to report how long initialization and running
  ~after-init-hook~ took.  e8285cc..788d232

- Started to use a new function, ~borg--load-config~ to load all of
  Borg's additional init files, in silence.  To show messages when
  loading these files, do so explicitly in these files.  The new
  ~borg-report-load-duration~ can be used for that purpose, or just
  ~message~.  e8285cc, 01f2df0

- Added a new ~redo~ target, a shorthand for using ~clean~ followed by
  ~build~.

- Renamed make variable ~EMACS_ARGUMENTS~ to ~EMACS_ARGS~, and
  ~BORG_ARGUMENTS~ to ~BORG_ARGS~.  c069d77

- Added new make variable ~EMACS_Q_ARG~.  5dd4e43

- ~if-let~ and ~when-let~ are now undeprecated when ~borg~ is loaded.
  e76fcaf

- Fixed minor issues in ~borg.sh~ and removed some dead code.
  9f8e987..6ed307a

* v4.3.0    2025-11-01

- ~borg-batch-rebuild~ now skips empty drones, which are created when
  cloning fails.  This command would end up creating an autoloads
  file, which in turn would prevent later cloning attempts to fail.
  b8fee39

- For Emacs 28 and earlier we generated autoloads files that did not
  contain a ~provide~ form.  9166c2b

* v4.2.2    2025-10-06

- Autoload files are now always recreated from scratch because merely
  updating them, as implemented in ~loaddefs-generate,~ is unreliable.
  #174

* v4.2.1    2025-09-01

Thoughts and whitespace.

* v4.2.0    2025-06-01

- Made it safer to rerun ~make bootstrap~ or parts thereof.  cd95c7c

- Added make targets ~checkout-module~ and ~clone-modules~, making it
  more convenient to rerun just parts of the bootstrapping process.
  746d6cc

* v4.1.5    2025-04-28

- Fixed bug in bootstrapping script.  #171

* v4.1.4    2025-04-01

Thoughts and whitespace.

* v4.1.3    2025-03-02

Thoughts and whitespace.

* v4.1.2    2024-12-01

- Stopped using a ~realpath~ gnu-ism.  #167

* v4.1.1    2024-11-02

- Org export errors are now being demoted instead of being ignored
  entirely.  13caf51

- Makefile and documentation improvements.

* v4.1.0    2024-09-01

- The robustness of the code used to set ~borg-drones-directory~,
  ~borg-user-emacs-directory~ and ~borg-top-level-directory~ has been
  increased.  As a result ~borg-drones-directory~ no longer has to
  be a direct subdirectory of ~borg-user-emacs-directory~.  #144

- The Emacs configuration repository can now itself be a submodule.
  #154

- Updated tooling.

* v4.0.0    2024-08-08

- Dropped support for Emacs 26. fd9d044

- The bootstrapping process has been improved.  e27463e

- Added support for including other files in
  ~~/.config/emacs/.gitmodules~ and use that to separate essential
  module configuration (still in ~.gitmodules~), additional remotes
  (now in ~.gitremotes~) and build configuration (now in ~.borgconfig~).
  f9a9140

- ~borg-read-package~ used to suggest the Emacsmirror URL for packages
  from many forges, when it should have suggested the upstream URL
  instead.  d8aecb0

- When building an individual drone, it is now cleaned first, just
  like it was always done when building all drones at once.  b8f7561

- While a build step is running, the new ~borg-clone~ variable is bound
  to the package currently being build.  c0ad642

- Added new variable ~borg.extra-build-step~ which allows specifying
  additional build steps to be used when building any drone.  2f41ec4

- The value of a ~submodule.DRONE.disabled~ variable can now be a lisp
  expression.  15a8905

- Added new variable ~borg-minimal-emacs-alist~, used to disable drones
  that require a more recent Emacs release than what is currently
  being used.  00132c1

- Added support for exporting Org files to Texinfo.  #121

- When building only most drones using the ~quick~ make target, drones
  that aren't going to be re-build are no longer cleaned.  5647cd7

- Stopped using ~git submodule--helper~ subcommands, which were removed
  in Git v2.38.0.  78a1c87 8d00bb8 etc.

- Renamed many ~make~ targets.  Made ~help~ the default target.  Removed
  the ~all~ target (since there is no one-fits-all).  Added ~clean-force~
  target.  675d97a 41d8ba4 d843820 3dc7068 d873be8 etc.

- Improved support for native compilation.  c166368 40b0664 2520ae9
  21acd89 etc.

- Use ~loaddefs-generate~ in Emacs 29 and later.  14c140d

- The format of the raw output of ~borg-drones~ changed.  47122b6

- Disabled drones are now highlighted in Magit's tabulated module lists.
  d3cdc17

- ~make clean~ and ~make force-clean~ now also remove autoload files.
  1172842, 52234b0

- Values added to ~SILENCIO~ in ~borg.mk~ are no longer discarded.  This
  variable can be used to suppress warnings when compiling drones.
  72000eb

- 7baf949 borg-makeinfo: Do not regenerate tracked but missing file
- 04df5ca borg-build: Remove trailing slash from clone name
- 1f87dfc borg--build-interactive: Use pop-to-buffer-same-window
- 9e59c64 Handle autoloads and load-path more robustly
- 7ef6a70 make: No longer hardcode drone directory in target names
- cb198c7 borg.sh: Improve safety outside initial "make bootstrap"
- 3cd6b4f make: Explicitly specify output directory for makeinfo --html
- c83238b borg-elpa: Don't assume epkg is available
- a337603 Ensure activation happens only after building is done
- e29d983 borg-drones: Append slash to borg-drones-directory if necessary
- 8a5a718 Display build buffer after setting major-mode
- 1b4efad #157 borg-build: let-bind borg-compile-function
- 94b9be7 borg-update-autoloads: Add to load-path again

* v3.3.1    2022-02-16

- ~borg-user-emacs-directory~ wasn't used in all places where it
  should be used.

- Added new function ~borg-dronep~.

- Added new macro ~borg-do-drones~, which is mostly like ~dolist~ but
  caches variables that are set in ".gitmodules".

- Added new make target ~build-native~.

- Like manual in the top directory, those in the ~doc/~ and ~docs/~
  directories are now also automatically build and added to
  ~Info-directory-list~.

- Added an additional make variable ~EMACS_ARGUMENTS~ that is reserved
  for use by users.

* v3.3.0    2022-01-01

- When setting ~borg-top-level-directory~ do not assume we are inside
  a Git repository, which makes it possible to use Borg to build a
  static configuration to be deployed outside the repository used
  to build it.  #110

- Fixed path to ~etc/borg/config.mk~, which is now also loaded when
  building not-interactively.

- Added new variable ~borg-compile-function~, which can be set to
  ~native-compile~ to enable upfront native compilation.  This should
  be done in ~~/.emacs.d/etc/borg/config.el~ like so:

  #+begin_src emacs-lisp
    (when (native-comp-available-p)
      (setq borg-compile-function #'native-compile))
  #+end_src

  Renamed ~borg-byte-compile-recursively~ to ~borg-compile-recursively~
  and ~borg-byte-compile~ to ~borg-compile~ accordingly.  #116

- ~borg-drones~ learned to ignore non-drone submodules.  #117

- The ~variable~ argument of ~borg-get~ can now be a symbol.

- If a variable has multiple values ~borg-get~ failed to return the
  last value when using the cache, as it already did when not using
  the cache.

* v3.2.0    2021-05-30

- Taught ~borg-load-path~ to use the ~elisp/~ directory automatically
  like it already uses the ~lisp/~ directory or the top-level.  The
  ~elisp/~ directory takes precedence over the other two directories.
  a8bce40

- Users can now specify the init files that should be compiled by
  setting the ~INIT_FILES~ variable in the top-level ~Makefile~.  If
  that is not specified, then the same files as before are compiled
  (~init.el~ and ~<username>.el~).  35b63df

- Each init file is now loaded before it is compiled.  Previously
  this was only done for ~init.el~.  f6a2e0c

- The ~default-directory~ used during compilation and when presenting
  the results did not always match, leading to broken links.  41b4494

- When initializing and rebuilding packages, then missing and disabled
  packages are skipped now.  bde5d4c, 93f40f9, 640169d

- It is now possible to place the drones in a directory that is named
  something other than ~lib~ using the ~borg.drones-directory~ variable.
  The default is still ~lib~, except when using Borg alongside Package;
  then the new default is ~borg~.  83f96dd, fd31cff

- The ~borg-user-emacs-directory~ no longer has to be the top-level
  directory of the containing repository.  bbea37f

- The variable ~borg-drones-directory~ was previously known as
  ~borg-drone-directory~.  dd0c142

- When Borg is used as secondary package manager, then ~borg.mk~ is now
  usable as well.  5d87d34

- Added documentation on how to recover from missing commits and
  missing repositories.  ecb2f9f

- Symlinks are resolved now when setting path variables.  444b9d7

* v3.1.2    2019-12-05

- The new option ~borg-rewrite-urls-alist~ allows rewriting certain urls
  when a package repository is cloned.  This is mostly intended to
  replace Github and Gitlab ssh URLs with https urls.

* v3.1.1    2019-05-05

- Cosmetics and improvements to maintenance tools.

* v3.1.0    2019-01-28

- The new user configuration file ~~/.emacs.d/etc/borg/init.el~ is
  loaded by ~borg-initialize~ if Emacs is running without an interactive
  terminal.

* v3.0.0    2018-10-31

- Borg can now be used as a secondary package manager alongside
  ~package.el~.  When used like this, then Borg itself should be
  installed from Melpa.  This is still experimental.  For instructions
  and help see https://github.com/emacscollective/borg/issues/46.  The
  manual does not yet cover this topic.

- The commands ~borg-assimilate~ and ~borg-clone~ now require the user to
  confirm before acting on a package that is known to be (potentially)
  unsafe.  Note that this does not imply that other packages are safe,
  and also that the ~epkg~ package has to be available for this to kick
  in for the most dangerous packages — those from the Emacswiki, into
  which anyone could trivially inject malicious code.

- The new files ~borg.mk~ and ~borg.sh~ were added, replacing files that
  were previously located directly in the super-repository.

  The super-repository still contains a ~Makefile~, which users who do
  not use the Emacs.g collective have to update manually, but failure
  to do so should be less problematic now, because this file only
  defines a single target needed to make ~borg.mk~ and ~borg.sh~
  accessible during bootstrap, while using these files for everything
  it previously did itself.

  This makes it easier and safer to improve the respective
  functionality iteratively and to create configurations that are not
  based on the Emacs.d collective.

- The new user configuration files ~~/.emacs.d/etc/borg/config.el~ and
  ~~/.emacs.d/etc/borg/config.mk~ are loaded by ~borg-build~ and ~make~ if
  they exist.  These files are primarily intended to set the variables
  ~borg-emacs-argument~ (which see) and ~EMACS_ARGUMENTS~.  The latter can
  also be used to set ~EMACS~ and/or to define new make targets.

- The new command ~borg-insert-update-message~ inserts information
  about drones that are updated in the index.  The inserted text is
  formatted according to the commit message conventions documented
  in the manual.  In ~git-commit-mode-map~ ~C-c C-b~ is bound to this
  command.

- A new make target ~tangle-init~ was added which recreates ~init.el~ from
  ~init.org~.

- Added new variables ~submodule.DRONE.recursive-byte-compile~ and
  ~borg-byte-compile-recursively~.

- The user is asked to save relevant buffers before compiling.

- The values of ~submodule.DRONE.no-byte-compile~ are now treated as
  relative to the top-level.  The documentation already claimed that
  was the case before.

- All build output is appended to the same buffer now.  Previously each
  build created a new, unspecialized buffer that never got cleaned up.
  The buffer is automatically shown on every build but can easily be
  buried using ~C-q~.

- The command ~borg-insert-update-message~ now also handles assimilations
  and removals.

* v2.0.0    2017-09-19

- Added new command ~borg-clone~ to make it easier to review a package
  before assimilating it.  Assimilating a package gives that package
  a change to run arbitrary code, so the review should happen first.

  Packages that have been cloned are now being referred to as clones.
  If they have additionally been assimilated, then they are referred
  to as drones, as before.  Note that drones are also clones.

  When a package has not even been cloned yet, then it is referred
  to as just a package.

- Added new command ~borg-remove~ to replace ~borg-uninstall~.  The new
  name is more appropriate because this command is also suitable for
  removing a package that has previously been cloned, without also
  being assimilated.  This command moves the working tree to the
  trash, but does not remove the gitdir.  It also refuses to do
  anything if the working tree isn't clean.

- Command ~borg-assimilate~ now assimilates an already cloned package
  without the user having to use a prefix argument, while separating
  the gitdir from the working tree, if that isn't already the case.
  The latter is useful after the user initialized a new repository,
  or cloned a package using something other than ~borg-clone~.

  When assimilating a package, that has been cloned or assimilated
  before but was then removed again, then the user is now given the
  choice between reusing the existing gitdir or starting over.

- Command ~borg-build~ now also activates the clone or drone using the
  new command ~borg-activate~, which was extracted from ~borg-assimilate~.

- Command ~borg-build~ now always uses a non-interactive Emacs instance
  to avoid polluting the new byte-code with old versions of the same
  code that is already loaded.

- The functions ~borg-update-autoloads~, ~borg-byte-compile~, and
  ~borg-makeinfo~ can now be used as explicit build steps without
  having to specify their argument(s).

- Added new variable ~borg-build-shell-command~ to give users complete
  control over how shell command build steps are executed.

- Added new utility function ~borg-gitdir~ and, in order to avoid
  confusion and match Git terminology, renamed ~borg-repository~ to
  ~borg-worktree~.

- Added new utility functions ~borg-read-package~, ~borg-read-clone~,
  and ~borg-clones~.

- Fixed a type error in ~borg-initialized~ when drones are being
  skipped.

* v1.0.0    2016-12-31

- Repository moved to https://github.com/emacscollective/borg.

- The ~~/.emacs.d/bin/borg-bootstrap~ script can now add additional
  remotes.  That script is part of the repository of the ~emacs.g~
  collective.  It cannot be part of the ~borg~ repository, because it
  is has to be available before the ~borg~ repository and all the other
  drone/submodule repositories are cloned.  But the documentation
  about this script can be found in the ~borg~ manual.

- ~borg-initialize~ now uses a cache to avoid calling ~git config~
  excessively.  On Windows this significantly improves performance.

- ~borg-drones~ learned to optionally return drone variables instead
  of just the drone names.

- ~borg-byte-compile~ and ~borg-update-autoloads~ now don't require the
  PATH argument.

- ~borg-uninstall~ was broken.

- The manual was updated heavily.

- Cosmetic and other minor improvements.

- Minor bug fixes and typo fixes.

* v0.2.0    2016-11-05

- Repository moved to https://gitlab.com/emacscollective/borg.

- Updated manual and made source compatible with Org v9.0.

- Improved and extended ~make~ targets.

* v0.1.6    2016-10-08

- Updated homepage link.

* v0.1.5    2016-09-27

- Typo fixes.

* v0.1.4    2016-09-27

- When invoked as a command ~borg-build~ failed.

* v0.1.3    2016-09-01

- Added new function ~borg-batch-rebuild-init~ to allow compiling
  just the init files without also compiling all drones.

* v0.1.2    2016-08-27

- ~borg-batch-rebuild~ now also compiles the secondary init file
  ~<user-real-login-name>.el~ if present.

- ~borg-batch-rebuild~ now compiles ~org~ before all other packages.

* v0.1.1    2016-05-18

- ~borg-build~ did not respect ~submodule.<name>.build-step~.

* v0.1.0    2016-05-17

- First release.
