# -*- mode: org -*-

* Changelog

** Unreleased

** [[https://github.com/aurtzy/disproject/tree/v2.2.0][2.2.0]] - 2025-10-03

This version introduces two new (customizable) menus: one for selecting
~display-buffer~ overrides to apply to suffix commands, and another for finding
common project files, dubbed "special files".

An Info user manual has also been written to provide documentation on using and
customizing Disproject, and should now be distributed with this package.

*** Added

- Add ~disproject-display-buffer-action-suffix~ class and
  ~disproject-display-buffer-action-set~ suffix command.  These facilities
  provide a means of generating suffix commands that set ~display-buffer~ action
  overrides.
- Add ~disproject-display-buffer-action-dispatch~ prefix command, bound to =,=
  in the main menu.  This provides a new menu with some out-of-the-box commands
  (implemented with ~disproject-display-buffer-action-set~) for managing the
  ~display-buffer~ override.  Replaces transient switch =--prefer-other-window=,
  although the other-window override is set to =o= to preserve the =,o= key
  sequence.
- Add ~disproject-find-special-file-suffix~ class and
  ~disproject-find-special-file~ suffix command, which provide a means of
  creating suffixes that find "special files" in projects.
- Add ~disproject-find-dir-locals-file~ and ~disproject-find-dir-locals-2-file~
  suffix commands, bound to =l= and =L= (respectively) in
  ~disproject-find-special-file-dispatch~.  These supersede
  ~disproject-dir-locals~.
- Add ~disproject-find-special-file-dispatch~ prefix, bound to =l= in the main
  menu (replacing ~disproject-dir-locals~).
- Add ~disproject-find-special-file-suffixes~ variable for customizing
  ~disproject-find-special-file-dispatch~.  By default, it includes suffixes for
  finding dir-locals files and a transient switch that enables using
  ~customize-dirlocals~ (added in Emacs 30.1) to open them with the Customize
  interface ([[https://github.com/aurtzy/disproject/issues/10][#10]]).
- Add ~disproject-global-header-group~ transient group, which inserts the
  selected-project header and "Global options" section.
- Include ~disproject-global-header-group~ in ~disproject-custom-dispatch~ and
  ~disproject-find-special-file-dispatch~.  This makes the "Global options"
  section available in these menus.
- Add a user manual.

*** Changed

- Bump transient dependency version to 0.9.2.
- Force-enable ~switch-to-buffer-obey-display-actions~ when a ~display-buffer~
  override is set.
- Set =transient= slot to t for ~disproject-switch-project*~ commands in suffix
  definitions.
- Rename ~disproject-find-line~ description "line occurrence" to "line in
  buffers".
- Show ~disproject-magit-todos-list~ if the magit-todos library is available, as
  opposed to only showing it when the library is loaded.  This permits using the
  command as an autoload.
- Set advice slots for relevant transient groups to ~disproject-with-env-apply~.
  This makes it no longer necessary to use project environment functions for
  project-aware commands when adding to those transient groups.
- Rename ~disproject-commands~ customization group to
  ~disproject-swappable-commands~.
- Set the last transient group class for ~disproject-dispatch~ to
  ~transient-row~.

*** Deprecated

- Deprecate ~disproject-scope-prefer-other-window?~ method.
- Deprecate ~disproject-dir-locals~.

** [[https://github.com/aurtzy/disproject/tree/v2.1.0][2.1.0]] - 2025-05-29

In addition to a few new commands, +this version notably adds support for
Transient version 0.9.0++ (the breaking change was found to be [[https://github.com/magit/transient/discussions/389][an unintentional
bug]]).

*** Added

- Re-add note about reserved keys in ~disproject-custom-suffixes~ documentation,
  which was accidentally removed.  The reserved keys are still the same as
  before.
- Add ~disproject-query-replace-regexp~ suffix command, bound to =r= in main
  menu ([[https://github.com/aurtzy/disproject/pull/7][#7]]).
- Add ~disproject-flymake-diagnostics~ suffix command, bound to =w= in main menu
  ([[https://github.com/aurtzy/disproject/pull/8][#8]]).  This is only present when Flymake is loaded.
- +Support Transient version 0.9.0 (released 2025-06-01), which introduced
  a breaking change to add/improve facilities for defining transient groups.+
- Add ~disproject-custom-prune-allowed-suffixes~ command for cleaning up
  remembered custom suffixes from old projects in
  ~disproject-custom-allowed-suffixes~.  This may be executed manually, but will
  also be appropriately called when executing menu commands that modify the list
  of known projects; e.g. when forgetting projects through
  ~disproject-manage-projects-dispatch~.

** [[https://github.com/aurtzy/disproject/tree/v2.0.0][2.0.0]] - 2025-03-05

The major focus of this update is support for Transient specifications syntax in
~disproject-custom-suffixes~.  The previous custom syntax has been deprecated,
and documentation has been updated to reflect the preference of Transient's
syntax in achieving the same functionality (and more).

Other highlights include improvements for customized commands that rely on
context around point, and the addition of a synchronous shell-command suffix
command.

Deprecated items that have passed their planned removal dates have been removed.

*** Added

- Support specifications using Transient syntax in ~disproject-custom-suffixes~.
- Add the following macros/functions to split up functionality from
  ~disproject-with-environment~ for more environment setup options when defining
  transient suffixes:
  - ~disproject-with-env~ macro, ~disproject-with-env-apply~ function for
    applying transient options (like ~project-current-directory-override~ or
    display buffer overrides).
  - ~disproject-with-root~ macro, ~disproject-with-root-apply~ function for
    setting ~default-directory~ to the current project's root.  When used in
    the context of a ~disproject-with-env~, it is set to the selected project's
    root directory.
  - ~disproject-with-env+root~ macro, ~disproject-with-env+root-apply~ function
    as a shorthand combination of the previous two.  This is equivalent to
    ~disproject-with-environment~.
- Add ~disproject-process-suffix~, ~disproject-shell-command-suffix~, and
  ~disproject-compilation-suffix~ classes for defining customizable transient
  suffixes that spawn processes.  The latter two are used by
  ~disproject-shell-command~ and ~disproject-compile~ (respectively) now.

  See ~disproject-custom-suffixes~ and documentation on the mentioned symbols
  for information on using them in custom suffixes.
- Support Transient group specifications in ~disproject-custom-suffixes~.
- Add ~disproject-synchronous-shell-command~ suffix command for synchronous
  shell commands.  It is bound to =!= in ~disproject-dispatch~.

*** Changed

- Maintain the current buffer context when setting up environment from transient
  state (see ~disproject-with-env-apply~) to provide more usable context to
  commands like ~ffap~ ([[https://github.com/aurtzy/disproject/issues/6][#6]]).
- No longer force the =:pad-keys= setting to =t= in custom suffixes.  Users that
  desire this behavior can now set it via group specifications.
- Revise pretty-printing of custom suffixes when displaying a request to allow
  them.
- Move ~disproject-shell-command~ from =!= to =&= binding in
  ~disproject-dispatch~.

*** Deprecated

- Deprecate custom specifications syntax for custom suffixes in favor of
  the syntax provided by Transient.  Removal is set for at least six months from
  this release.

*** Fixed

- Fix ~disproject-default-find-line~ showing results from hidden/ephemeral
  buffers.

*** Removed

- Remove deprecated ~project~ argument from ~disproject-dispatch~ and
  ~disproject-custom-dispatch~ commands.
- Remove deprecated =o= option key-bind for preferring other window.
- Remove deprecated ~disproject-magit-commands-dispatch~ command.
- Remove deprecated ~disproject-remember-projects-active~ command.
- Remove deprecated ~disproject-magit-status~ command.
- Remove deprecated ~disproject-switch-project-active~ command.
- Remove deprecated ~disproject-vc-dir~ command.

** [[https://github.com/aurtzy/disproject/tree/v1.3.1][1.3.1]] - 2024-12-13

Bugfix release to resolve an issue that could make the menu inaccessible for
some users.

*** Fixed

- Fix issue where fetching the VC backend could fail when the
  ~project-find-functions~ hook was configured with other functions that could
  return project instances in unexpectedly different formats ([[https://github.com/aurtzy/disproject/issues/4][#4]]).

** [[https://github.com/aurtzy/disproject/tree/v1.3.0][1.3.0]] - 2024-12-11

This is a maintenance-heavy release which comes with a fair bit of reworked
internals, particularly with handling of transient scope/state.  Some of these
changes are exposed as stable interfaces, and may provide more options to the
user for extending the menus.

Other highlights include a merging of Magit commands with the main menu to help
with generalizing to other version control systems, and the addition of a
standalone compile command in ~disproject-dispatch~.

*** Added

- Add compilation command ~disproject-compile~ to the main dispatch menu.  This
  provides a more accessible compile command compared to the custom suffixes
  that also matches the default =C-x p c= key-bind for ~project-compile~.
- Support ~project-current-directory-override~, which can be reliably used now
  to e.g. set the initial selected project for dispatch commands.
- Add the ~disproject-prefix~ class, which should make it easier to add new
  transient sub-prefixes to the menu.
- Add the ~disproject-scope~ and ~disproject-project~ classes, which provide
  interfaces for interacting with the transient scope for Disproject prefixes.
  This replaces the previous implementation of passing state around menus, and
  should offer more benefits - like the improved state-tracking noted below -
  moving forward.
- Add new command ~disproject-vc-status~, which replaces ~disproject-vc-dir~ and
  ~disproject-magit-status~ as a more versatile VC status command in the main
  dispatch menu.  This is customizable through ~disproject-vc-status-commands~,
  and is pre-configured to use ~magit-status~ (if available) for git-backed
  projects.
- Include ~disproject-vc-status~ and ~disproject-magit-todos-list~ in the /Main
  commands/ section.

*** Changed

- Bump transient dependency version to 0.8.0.
- Improve state-tracking while navigating through Disproject menus.  This
  notably allows for easier deferring/caching of state, so prompts to e.g. apply
  per-project custom suffixes will show up just once (and only when needed) for
  each transient "session" until the menu closes.
- Automatically use the current project if suffix commands
  (e.g. ~disproject-find-file~; ~disproject-shell~) are called and are unable to
  find a selected project from transient scope.  When there is no current
  project, a prompt to select a project will occur as it has before.
- Allow version control commands to be invoked in the main dispatch menu when no
  project is selected.  This will trigger a prompt to select one, like the other
  commands.
- Apply directory-local variables in ~disproject-with-environment~ so commands
  like ~disproject-compile~ respect ~compile-command~ set from dir-locals, for
  example.
- Use ~disproject-prefix~ as the prefix class for all Disproject menus that make
  use of ~disproject-scope~.

*** Deprecated

- Deprecate the optional ~project~ argument for some dispatch commands as they
  are now redundant with the support for ~project-current-directory-override~.
  Removal is set for at least 1 month after this release.
- Deprecate ~disproject-magit-commands-dispatch~.  Commands from this menu have
  been moved into ~disproject-dispatch~, with the exception of ~magit-dispatch~
  and ~magit-file-dispatch~; these may still be accessed through the
  Magit-provided key-binds =C-x M-g= and =C-c M-g=, respectively.  Removal is
  set for at least 1 month after this release.
- Deprecate ~disproject-vc-dir~ and ~disproject-magit-status~, both of which
  have been replaced by ~disproject-vc-status~.  Removal is set for at least 1
  month after this release.

*** Fixed

- *Breaking:* Prevent situations where the ~disproject-process-buffer-name~
  function can unintentionally cause prompts for a selected project to occur
  more than once.  This changes the function signature to make the project
  directory argument explicit, and is a breaking change.

*** Removed

- Remove redundant ~project~ argument from
  ~disproject-manage-projects-dispatch~.  This didn't actually do anything.

** [[https://github.com/aurtzy/disproject/tree/v1.2.0][1.2.0]] - 2024-11-28

This update consists of mainly quality-of-life / UX changes.  Some changes to
key-binds have also been made, with deprecations and planned removal
time-frames.

*** Added

- Add ~run~ custom suffix command type for general shell commands that don't
  need features from ~compile~.

*** Changed

- Display selected-project header for relevant menus other than the main
  dispatch.
- Display warning to the user when a custom suffix command type is not
  recognized instead of silently doing nothing.
- Change "active projects" references to "open projects" since "active" can be
  somewhat ambiguous.  The latter term is also used by Projectile, so this
  should give some consistency for those who have used it.
  - The key-bind for remembering open projects is also changed from =r a= to
    =r o= (the former is deprecated, but still works as a hidden key-bind).
- Prefix all options (currently, just =--prefer-other-window=) with a comma.

  This will permit eventually showing the options section for all relevant
  menus, since it's not immediately clear to the user that they can in fact
  apply to other sub-prefixes; e.g. custom dispatch and magit commands dispatch.
  Making options available in other menus was not reasonable before as the
  commands would be in the same "namespace" as other commands, making it easy to
  cause key-bind conflicts (especially with custom dispatch, which reserves
  alphanumeric keys for custom suffixes).

*** Deprecated

- Deprecate symbols and key binds related to "active projects" in favor of their
  "open projects" alternatives.  Removal is set for /at least/ 1 month after
  this release.
- Deprecate non-comma-prefixed options.  Removal is set for /at least/ 1 month
  after this release.

*** Fixed

- Fix ~disproject-dispatch~ not being autoloaded as an interactive function.
- Fix case where ~disproject-custom-suffixes~ was not considered safe if
  Disproject hadn't been loaded yet.

** [[https://github.com/aurtzy/disproject/tree/v1.1.1][1.1.1]] - 2024-11-24

This is a fix for an unlikely, but still undesirable bug.

*** Fixed

- Fixed case where if a user tried to remember active projects when there were
  actually none open, the known-projects file could be overwritten with an
  invalid ~unset~ value (value of ~project--list~ when it's not initialized yet)
  that had to be manually removed e.g. by deleting the file.

** [[https://github.com/aurtzy/disproject/tree/v1.1.0][1.1.0]] - 2024-11-21

*** Added

- Added new customizable command ~disproject-find-line~, providing ~multi-occur~
  for project buffers.
- Included fallback commands for creating new git projects when Magit is not
  available.
- Added new command ~disproject-dir-locals~ for opening ~dir-locals-file~, or
  the personal directory-locals file (=.dir-locals-2.el= by default) with a
  universal prefix argument.
- Added custom variable ~disproject-custom-allowed-suffixes~ for
  permanently-allowed custom suffixes.

*** Fixed

- Implemented custom-dispatch-only prompt for allowing a local
  ~disproject-custom-suffixes~ value in the menu to fix a few issues:
  - Emacs kindly remembers potentially-unsafe values marked as permanently safe
    across sessions, but in the case of ~disproject-custom-suffixes~ where it
    may be changed many times to many different values, it can cause the
    ~safe-local-variable-values~ variable to balloon very fast.
    ~disproject-custom-allowed-suffixes~ is now used instead, which only tracks
    currently used suffixes.  Options to e.g. "save N most recent
    configurations" may be added in the future.

    Users who have extensively customized this variable may want to consider
    =M-x customize= to prune the historical values from
    ~safe-local-variable-values~.
  - The method used to obtain local variables caused the "risky variables"
    prompt to not actually allow the user to reject applying
    ~disproject-custom-suffixes~; custom suffixes were always displayed even if
    the user answered "n".
  - ~disproject-custom-suffixes~ was not pretty-printed at all, so it could be
    difficult to properly verify the variable was safe.  There is /some/
    pretty-printing now.

*** Changed

- Shortened "Extended command" to "Extended cmd." to make the column narrower.
- Marked custom variable ~disproject-custom-suffixes~ as safe in order to defer
  the prompt and apply fix with ~disproject-custom-suffixes~.

** [[https://github.com/aurtzy/disproject/tree/v1.0.0][1.0.0]] - 2024-11-17

v1 release.  This CHANGELOG file has been added, which will track changes in
future version releases from this point onward.
