Skip to content

Commit

Permalink
replace elpaca-update/-update-all with elpaca-merge/-merge-all
Browse files Browse the repository at this point in the history
The update/update-all commands are now merge/merge-all commands.
They can be passed a prefix argument to get the "git pull" behavior the
previous commands had.
The UI will also now record any prefix arg when a package is marked.

This change decouples fetching, and merging, which was not possible before.
(update/update-all would always fetch, which could pull in new changes)

docs: mention new commands, recommend fetch + merge workflow

elpaca-log-command-queries, elpaca-ui-marked-merge, elpaca-ui-mode-map:
update references to commands

elpaca-ui-marks: update command name, docstring, add :args
elpaca-ui--apply-face: add prefix-arg indicator
elpaca-ui--mark: record current-prefix-arg
elpaca-ui-execute-marks: pass current-prefix-arg to command

related: #195
  • Loading branch information
progfolio committed Nov 10, 2023
1 parent a788378 commit 039ae35
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 74 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,22 @@ And remove anything related to package.el in your init file. e.g. calls to `(pac

## Quick Start

| Operation | UI (keys apply in elpaca-ui-mode) | completing-read interface commands |
|------------------------------------- |---------------------------------- |-------------------------------------------- |
| Finding Packages | `M-x elpaca-manager` | `elpaca-try` |
| Trying Packages (for current session) | `i` `x` | `elpaca-try` |
| Updating Packages | `u` `x` | `elpaca-update` or `M-x` `elpaca-update-all` |
| Rebuilding Packages | `r` `x` | `elpaca-rebuild` |
| Deleting Packages | `d` `x` | `elpaca-delete` |
| View Package Logs | `l` filters log to current package | `elpaca-log` |
| View Package Statuses | `t` show most recent log entries | `elpaca-status` |
| Visit Package Repository Directory | `v` | `elpaca-visit` |
| Visit Package Build Directory | `C-u` `v` | `C-u` `elpaca-visit` |
| Browse Package Website | `b` | `elpaca-browse` |
| Operation | UI (keys apply in elpaca-ui-mode) | completing-read interface commands |
|------------------------------------- |---------------------------------- |-------------------------------------------------------- |
| Finding Packages | `M-x elpaca-manager` | `elpaca-try` |
| Trying Packages (for current session) | `i` `x` | `elpaca-try` |
| Fetching Package Updates | `f` `x` | `elpaca-fetch` or `elpaca-fetch-all` |
| Merging Updates | `u` `x` | `elpaca-merge` or `elpaca-merge-all` |
| Pulling Updates<sup>\*</sup> | `C-u u` `x` | `C-u M-x` `elpaca-merge` or `C-u M-x` `elpaca-merge-all` |
| Rebuilding Packages | `r` `x` | `elpaca-rebuild` |
| Deleting Packages | `d` `x` | `elpaca-delete` |
| View Package Logs | `l` filters log to current package | `elpaca-log` |
| View Package Statuses | `t` show most recent log entries | `elpaca-status` |
| Visit Package Repository Directory | `v` | `elpaca-visit` |
| Visit Package Build Directory | `C-u` `v` | `C-u M-x` `elpaca-visit` |
| Browse Package Website | `b` | `elpaca-browse` |

\* It's encouraged to fetch, review, and **then** merge package updates rather than pulling.

Packages installed via the above commands are not loaded on subsequent Emacs sessions (after restarting). To install and load packages persistently (across Emacs restarts), use the `elpaca` macro in your init file after the installer. ([installer](#installer))

Expand Down
29 changes: 17 additions & 12 deletions doc/common.org
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,23 @@ And remove anything related to package.el in your init file. e.g. calls to ~(pac
:CUSTOM_ID: quick-start
:END:

| Operation | UI (keys apply in elpaca-ui-mode) | completing-read interface commands |
|---------------------------------------+-----------------------------------+----------------------------------------|
| Finding Packages | ~M-x elpaca-manager~ | ~elpaca-try~ |
| Trying Packages (for current session) | ~i~ ~x~ | ~elpaca-try~ |
| Updating Packages | ~u~ ~x~ | ~elpaca-update~ or ~M-x~ ~elpaca-update-all~ |
| Rebuilding Packages | ~r~ ~x~ | ~elpaca-rebuild~ |
| Deleting Packages | ~d~ ~x~ | ~elpaca-delete~ |
| View Package Logs | ~l~ filters log to current package | ~elpaca-log~ |
| View Package Statuses | ~t~ show most recent log entries | ~elpaca-status~ |
| Visit Package Repository Directory | ~v~ | ~elpaca-visit~ |
| Visit Package Build Directory | ~C-u~ ~v~ | ~C-u~ ~elpaca-visit~ |
| Browse Package Website | ~b~ | ~elpaca-browse~ |
| Operation | UI (keys apply in elpaca-ui-mode) | completing-read interface commands |
|---------------------------------------+-----------------------------------+--------------------------------------------------|
| Finding Packages | ~M-x elpaca-manager~ | ~elpaca-try~ |
| Trying Packages (for current session) | ~i~ ~x~ | ~elpaca-try~ |
| Fetching Package Updates | ~f~ ~x~ | ~elpaca-fetch~ or ~elpaca-fetch-all~ |
| Merging Updates | ~u~ ~x~ | ~elpaca-merge~ or ~elpaca-merge-all~ |
| Pulling Updates^* | ~C-u u~ ~x~ | ~C-u M-x~ ~elpaca-merge~ or ~C-u M-x~ ~elpaca-merge-all~ |
| Rebuilding Packages | ~r~ ~x~ | ~elpaca-rebuild~ |
| Deleting Packages | ~d~ ~x~ | ~elpaca-delete~ |
| View Package Logs | ~l~ filters log to current package | ~elpaca-log~ |
| View Package Statuses | ~t~ show most recent log entries | ~elpaca-status~ |
| Visit Package Repository Directory | ~v~ | ~elpaca-visit~ |
| Visit Package Build Directory | ~C-u~ ~v~ | ~C-u M-x~ ~elpaca-visit~ |
| Browse Package Website | ~b~ | ~elpaca-browse~ |
|---------------------------------------+-----------------------------------+--------------------------------------------------|
​* It's encouraged to fetch, review, and *then* merge package updates rather than pulling.


Packages installed via the above commands are not loaded on subsequent Emacs sessions (after restarting).
To install and load packages persistently (across Emacs restarts), use the =elpaca= macro in your init file after the installer. ([[#installer][installer]])
Expand Down
20 changes: 14 additions & 6 deletions doc/elpaca.texi
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ And remove anything related to package.el in your init file. e.g. calls to @code
@node Quick Start
@section Quick Start

@multitable {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@multitable {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@headitem Operation
@tab UI (keys apply in elpaca-ui-mode)
@tab completing-read interface commands
Expand All @@ -215,9 +215,15 @@ And remove anything related to package.el in your init file. e.g. calls to @code
@item Trying Packages (for current session)
@tab @code{i} @code{x}
@tab @code{elpaca-try}
@item Updating Packages
@item Fetching Package Updates
@tab @code{f} @code{x}
@tab @code{elpaca-fetch} or @code{elpaca-fetch-all}
@item Merging Updates
@tab @code{u} @code{x}
@tab @code{elpaca-update} or @code{M-x} @code{elpaca-update-all}
@tab @code{elpaca-merge} or @code{elpaca-merge-all}
@item Pulling Updates@math{^*}
@tab @code{C-u u} @code{x}
@tab @code{C-u M-x} @code{elpaca-merge} or @code{C-u M-x} @code{elpaca-merge-all}
@item Rebuilding Packages
@tab @code{r} @code{x}
@tab @code{elpaca-rebuild}
Expand All @@ -235,11 +241,13 @@ And remove anything related to package.el in your init file. e.g. calls to @code
@tab @code{elpaca-visit}
@item Visit Package Build Directory
@tab @code{C-u} @code{v}
@tab @code{C-u} @code{elpaca-visit}
@tab @code{C-u M-x} @code{elpaca-visit}
@item Browse Package Website
@tab @code{b}
@tab @code{elpaca-browse}
@end multitable
​* It's encouraged to fetch, review, and @strong{then} merge package updates rather than pulling.


Packages installed via the above commands are not loaded on subsequent Emacs sessions (after restarting).
To install and load packages persistently (across Emacs restarts), use the @samp{elpaca} macro in your init file after the installer. (@ref{Installer, , installer})
Expand Down Expand Up @@ -999,9 +1007,9 @@ The following commands are available in the @samp{elpaca-ui-mode}:
@item elpaca-status
@tab t
@tab Log most recent events for packages.
@item elpaca-ui-mark-update
@item elpaca-ui-mark-merge
@tab u
@tab Mark package at point for ‘elpaca-update’.
@tab Mark package at point for ‘elpaca-merge’.
@item elpaca-ui-visit
@tab v
@tab Visit current package’s repo or BUILD directory.
Expand Down
30 changes: 17 additions & 13 deletions doc/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,22 @@ And remove anything related to package.el in your init file. e.g. calls to `(pac

## Quick Start

| Operation | UI (keys apply in elpaca-ui-mode) | completing-read interface commands |
|------------------------------------- |---------------------------------- |-------------------------------------------- |
| Finding Packages | `M-x elpaca-manager` | `elpaca-try` |
| Trying Packages (for current session) | `i` `x` | `elpaca-try` |
| Updating Packages | `u` `x` | `elpaca-update` or `M-x` `elpaca-update-all` |
| Rebuilding Packages | `r` `x` | `elpaca-rebuild` |
| Deleting Packages | `d` `x` | `elpaca-delete` |
| View Package Logs | `l` filters log to current package | `elpaca-log` |
| View Package Statuses | `t` show most recent log entries | `elpaca-status` |
| Visit Package Repository Directory | `v` | `elpaca-visit` |
| Visit Package Build Directory | `C-u` `v` | `C-u` `elpaca-visit` |
| Browse Package Website | `b` | `elpaca-browse` |
| Operation | UI (keys apply in elpaca-ui-mode) | completing-read interface commands |
|------------------------------------- |---------------------------------- |-------------------------------------------------------- |
| Finding Packages | `M-x elpaca-manager` | `elpaca-try` |
| Trying Packages (for current session) | `i` `x` | `elpaca-try` |
| Fetching Package Updates | `f` `x` | `elpaca-fetch` or `elpaca-fetch-all` |
| Merging Updates | `u` `x` | `elpaca-merge` or `elpaca-merge-all` |
| Pulling Updates<sup>\*</sup> | `C-u u` `x` | `C-u M-x` `elpaca-merge` or `C-u M-x` `elpaca-merge-all` |
| Rebuilding Packages | `r` `x` | `elpaca-rebuild` |
| Deleting Packages | `d` `x` | `elpaca-delete` |
| View Package Logs | `l` filters log to current package | `elpaca-log` |
| View Package Statuses | `t` show most recent log entries | `elpaca-status` |
| Visit Package Repository Directory | `v` | `elpaca-visit` |
| Visit Package Build Directory | `C-u` `v` | `C-u M-x` `elpaca-visit` |
| Browse Package Website | `b` | `elpaca-browse` |

\* It&rsquo;s encouraged to fetch, review, and **then** merge package updates rather than pulling.

Packages installed via the above commands are not loaded on subsequent Emacs sessions (after restarting). To install and load packages persistently (across Emacs restarts), use the `elpaca` macro in your init file after the installer. ([installer](#installer))

Expand Down Expand Up @@ -797,7 +801,7 @@ The following commands are available in the `elpaca-ui-mode`:
| elpaca-ui-mark-rebuild | r | Mark package at point for ‘elpaca-rebuild’. |
| elpaca-ui-search | s | Filter current buffer by QUERY. If QUERY is nil, prompt for it. |
| elpaca-status | t | Log most recent events for packages. |
| elpaca-ui-mark-update | u | Mark package at point for ‘elpaca-update’. |
| elpaca-ui-mark-merge | u | Mark package at point for ‘elpaca-merge’. |
| elpaca-ui-visit | v | Visit current package’s repo or BUILD directory. |
| elpaca-ui-execute-marks | x | Execute each mark in ‘elpaca-ui-marked-packages’. |

Expand Down
2 changes: 1 addition & 1 deletion doc/manual.org
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ The following commands are available in the =elpaca-ui-mode=:
| elpaca-ui-mark-rebuild | r | Mark package at point for ‘elpaca-rebuild’. |
| elpaca-ui-search | s | Filter current buffer by QUERY. If QUERY is nil, prompt for it. |
| elpaca-status | t | Log most recent events for packages. |
| elpaca-ui-mark-update | u | Mark package at point for ‘elpaca-update’. |
| elpaca-ui-mark-merge | u | Mark package at point for ‘elpaca-merge’. |
| elpaca-ui-visit | v | Visit current package’s repo or BUILD directory. |
| elpaca-ui-execute-marks | x | Execute each mark in ‘elpaca-ui-marked-packages’. |

Expand Down
2 changes: 1 addition & 1 deletion elpaca-log.el
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
(defcustom elpaca-log-command-queries
'(((elpaca-fetch elpaca-fetch-all) . "#latest #update-log")
((elpaca-try elpaca-rebuild) . "#latest #linked-errors")
((elpaca-update elpaca-update-all) . "#unique | !finished")
((elpaca-merge elpaca-merge-all) . "#unique | !finished")
((eval-buffer eval-region eval-defun eval-last-sexp org-ctrl-c-ctrl-c) . silent)
(elpaca-delete . (lambda () (if (equal (buffer-name) elpaca-log-buffer)
elpaca-ui-search-query 'silent)))
Expand Down
Loading

0 comments on commit 039ae35

Please sign in to comment.