[elpa] externals/transient 08ebdbc85d 02/17: manual: Mention more additions since last release

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 08ebdbc85d8733bec30ec9b2152358be213f4dde
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

manual: Mention more additions since last release
---
 docs/transient.org  | 16 
 docs/transient.texi | 18 ++
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/docs/transient.org b/docs/transient.org
index 722b817187..27b2505866 100644
--- a/docs/transient.org
+++ b/docs/transient.org
@@ -316,6 +316,10 @@ but it is easily accessible (see [[*Using History]]).
   Save the value of the active transient persistently across Emacs
   sessions.
 
+- Key: C-x C-k (transient-save) ::
+
+  Clear the set and saved value of the active transient.
+
 - User Option: transient-values-file ::
 
   This option names the file that is used to persist the values of
@@ -1673,10 +1677,10 @@ functions use ~describe-function~.
 
 ** Prefix Slots
 
-- ~man-page~ or ~info-manual~ can be used to specify the documentation for
-  the prefix and its suffixes.  The command ~transient-help~ uses the
-  method ~transient-show-help~ (which see) to lookup and use these
-  values.
+- ~show-help~, ~man-page~ or ~info-manual~ can be used to specify the
+  documentation for the prefix and its suffixes.  The command
+  ~transient-help~ uses the method ~transient-show-help~ (which see) to
+  lookup and use these values.
 
 - ~history-key~ If multiple prefix commands should share a single value,
   then this slot has to be set to the same value for all of them.  You
@@ -1753,6 +1757,10 @@ Also see [[*Suffix Classes]].
 - ~description~ The description, either a string or a function that is
   called with no argument and returns a string.
 
+- ~show-help~ A function used to display help for the suffix.  If
+  unspecified, the prefix controls how hlep is displayed for its
+  suffixes.
+
 *** Slots of ~transient-infix~
 :PROPERTIES:
 :UNNUMBERED: notoc
diff --git a/docs/transient.texi b/docs/transient.texi
index 776da46c6b..d263178e37 100644
--- a/docs/transient.texi
+++ b/docs/transient.texi
@@ -458,6 +458,11 @@ session.
 @findex transient-save
 Save the value of the active transient persistently across Emacs
 sessions.
+
+@item @kbd{C-x C-k} (@code{transient-save})
+@kindex C-x C-k
+@findex transient-save
+Clear the set and saved value of the active transient.
 @end table
 
 @defopt transient-values-file
@@ -1931,10 +1936,10 @@ the command's doc string.
 
 @itemize
 @item
-@code{man-page} or @code{info-manual} can be used to specify the documentation 
for
-the prefix and its suffixes.  The command @code{transient-help} uses the
-method @code{transient-show-help} (which see) to lookup and use these
-values.
+@code{show-help}, @code{man-page} or @code{info-manual} can be used to specify 
the
+documentation for the prefix and its suffixes.  The command
+@code{transient-help} uses the method @code{transient-show-help} (which see) to
+lookup and use these values.
 
 @item
 @code{history-key} If multiple prefix commands should share a single value,
@@ -2029,6 +2034,11 @@ It must contain the following %-placeholders:
 @item
 @code{description} The description, either a string or a function that is
 called with no argument and returns a string.
+
+@item
+@code{show-help} A function used to display help for the suffix.  If
+unspecified, the prefix controls how hlep is displayed for its
+suffixes.
 @end itemize
 
 @anchor{Slots of @code{transient-infix}}



[elpa] externals/transient 45ef6df3fb 03/17: Update changelog

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 45ef6df3fbc7f4fc87fd0db20b48334f61b521e0
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Update changelog
---
 CHANGELOG | 56 
 1 file changed, 56 insertions(+)

diff --git a/CHANGELOG b/CHANGELOG
index 61e01b27f8..2484e88fe2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,60 @@
 # -*- mode: org -*-
+* v0.4.0UNRELEASED
+
+- Compatibility of transient with various uses of the minibuffer has
+  been greatly improved, addressing several edge-cases and making it
+  possible to invoke a transient prefix command when the minibuffer
+  is active.  7b8a7d71 et al.
+
+- Each prefix and suffix can now have its own help function.  This is
+  configured using the new ~show-help~ slot.  ea5ac99f
+
+- The ~transient-options~ now supports two types of options that can
+  have multiple values: repeated option-value pairs and a final option
+  that takes all remaining arguments as value.  #154
+
+- Added support for the use of non-proportional text in the transient
+  popup.  7f5520b3
+
+- Imenu was taught about Transient's definition macros.  #178
+
+- It is now possible to return to the parent prefix from a sub-prefix.
+  e90f7a16
+
+- Boolean values of the ~transient~ slot of sub-prefixes are now
+  interpreted correctly.  4a36b1d9
+
+- Added new option ~transient-hide-during-minibuffer-read~.  5762bd9a
+
+- Added new option ~transient-align-variable-pitch~.  cda6a120
+
+- Added new command ~transient-reset~, which clears the set and saved
+  value of the active transient.  51585b8d
+
+- When using Emacs 28, ~execute-extended-command~ can be told to ignore
+  transient infix commands.  Even when using that Emacs version that
+  command does not ignore any commands by default, but this behaviour
+  can be easily be enabled using:
+
+(setq read-extended-command-predicate
+  'command-completion-default-include-p)
+
+- Added new command ~transient-toggle-debug~.  b466cd9a
+
+- Expressions inside the group vectors that are prefixed with a comma
+  are now evaluated when the ~transient-define-prefix~ macro is expanded.
+  99943f73
+
+Bug fixes:
+
+- 938b0591 #173 transient--show: Set point after displaying window again
+- c26cbac5 #181 transient-{init,set}-value: Use case-sensitive matching
+- 28491e1f Properly deal with stealth undefined command
+- 714e3482 No longer always suspend when handle-switch-frame is called
+- 0f39af0e #188 transient-format-description: Use cl-call-next-method
+
+Also contains various documentation updates and code clean-ups.
+
 * v0.3.72021-10-25
 
 - Added an additional safety hatch to prevent Emacs from entering an



[elpa] externals/transient 8d28d6ca5c 01/17: transient-reset: Fix docstring typo

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 8d28d6ca5c34f1543aee47a5314a84e725cbe146
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient-reset: Fix docstring typo
---
 lisp/transient.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index d5bc08b584..4bf3dd093f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2522,7 +2522,7 @@ transient is active."
   (transient-save-value (or transient--prefix transient-current-prefix)))
 
 (defun transient-reset ()
-  "Clear the set and save value of the active transient."
+  "Clear the set and saved value of the active transient."
   (interactive)
   (transient-reset-value (or transient--prefix transient-current-prefix)))
 



[elpa] externals/transient updated (7c771c94c8 -> 132090a4b6)

2022-03-25 Thread Jonas Bernoulli
tarsius pushed a change to branch externals/transient.

  from  7c771c94c8 Do not let-bind overriding-terminal-local-map to nil
   new  8d28d6ca5c transient-reset: Fix docstring typo
   new  08ebdbc85d manual: Mention more additions since last release
   new  45ef6df3fb Update changelog
   new  af49fd9447 Use more function quotes
   new  8bd182c2de Add ignore rules for ELPA
   new  da97c6d18a Revert most of "Use more function quotes"
   new  017eb7b3cb Explicitly define generic functions
   new  0619c7ef19 Automatically publish statistics
   new  ecf340cbff make: Set GITSTATS
   new  31d355b596 transient-set-level: Refresh shown levels after setting 
one
   new  06697f75ac Only use this-original-command when necessary
   new  dd67ff9061 transient--do-pre-command: New function
   new  bb056e7156 Invoke suffix commands directly when a button is pushed
   new  98d5020238 transient-popup-navigation-map: No longer bind C-p and 
C-n
   new  5c746f3146 No longer consider popup navigation a secondary feature
   new  75a44f5058 transient-enable-popup-navigation: Improve docstring
   new  132090a4b6 transient-enable-popup-navigation: Enable by default


Summary of changes:
 .github/workflows/stats.yml |  18 ++
 .gitignore  |   4 ++
 CHANGELOG   |  56 +
 Makefile|  10 ++-
 default.mk  |   1 +
 docs/Makefile   |  18 --
 docs/transient.org  |  16 +++--
 docs/transient.texi |  18 --
 lisp/transient.el   | 150 +---
 9 files changed, 210 insertions(+), 81 deletions(-)
 create mode 100644 .github/workflows/stats.yml



[elpa] externals/transient 8bd182c2de 05/17: Add ignore rules for ELPA

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 8bd182c2de7c34734bdb685065e6161e2d128064
Author: Stefan Monnier 
Commit: Jonas Bernoulli 

Add ignore rules for ELPA
---
 .gitignore | 4 
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index ab2f77e0ef..07644fb0a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,7 @@
 /lisp/*.elc
 
 /docs/transient/
+
+# For ELPA:
+/*-autoloads.el
+/*-pkg.el



[elpa] externals/transient 017eb7b3cb 07/17: Explicitly define generic functions

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 017eb7b3cb631bb432066539c459bfa96afa0543
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Explicitly define generic functions

The byte-compiler of Emacs 29 went completely berserk and so
I learned that it recently stopped being possible to define
a method for a (previously undefined) function without first
explicitly declaring it as a generic function.
---
 lisp/transient.el | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 31b79947de..5aa7b6e6fb 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2522,7 +2522,7 @@ transient is active."
   (transient-save-value (or transient--prefix transient-current-prefix)))
 
 (defun transient-reset ()
-  "Clear the set and saved value of the active transient."
+  "Clear the set and saved values of the active transient."
   (interactive)
   (transient-reset-value (or transient--prefix transient-current-prefix)))
 
@@ -2916,12 +2916,18 @@ prompt."
 (transient-infix-set obj nil)
   (cl-call-next-method obj value
 
+(cl-defgeneric transient-set-value (obj)
+  "Set the value of the transient prefix OBJ.")
+
 (cl-defmethod transient-set-value ((obj transient-prefix))
   (oset (oref obj prototype) value (transient-get-value))
   (transient--history-push obj))
 
  Save
 
+(cl-defgeneric transient-save-value (obj)
+  "Save the value of the transient prefix OBJ.")
+
 (cl-defmethod transient-save-value ((obj transient-prefix))
   (let ((value (transient-get-value)))
 (oset (oref obj prototype) value value)
@@ -2931,6 +2937,9 @@ prompt."
 
  Reset
 
+(cl-defgeneric transient-reset-value (obj)
+  "Clear the set and saved values of the transient prefix OBJ.")
+
 (cl-defmethod transient-reset-value ((obj transient-prefix))
   (let ((value (transient-default-value obj)))
 (oset obj value value)



[elpa] externals/transient af49fd9447 04/17: Use more function quotes

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit af49fd94475ce031b2f08a04d0e3b6a90aba80b6
Author: Stefan Monnier 
Commit: Jonas Bernoulli 

Use more function quotes
---
 lisp/transient.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 4bf3dd093f..5f0d26bb25 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -69,11 +69,11 @@
 (defvar Man-notify-method)
 
 (define-obsolete-function-alias 'define-transient-command
-  'transient-define-prefix "Transient 0.3.0")
+  #'transient-define-prefix "Transient 0.3.0")
 (define-obsolete-function-alias 'define-suffix-command
-  'transient-define-suffix "Transient 0.3.0")
+  #'transient-define-suffix "Transient 0.3.0")
 (define-obsolete-function-alias 'define-infix-command
-  'transient-define-infix "Transient 0.3.0")
+  #'transient-define-infix "Transient 0.3.0")
 (define-obsolete-function-alias 'define-infix-argument
   #'transient-define-argument "Transient 0.3.0")
 
@@ -2105,7 +2105,7 @@ value.  Otherwise return CHILDREN as is."
 (defun transient--post-command-hook ()
   (run-hooks 'transient--post-command-hook))
 
-(add-hook 'post-command-hook 'transient--post-command-hook)
+(add-hook 'post-command-hook #'transient--post-command-hook)
 
 (defun transient--delay-post-command (&optional abort-only)
   (transient--debug 'delay-post-command)



[elpa] externals/transient da97c6d18a 06/17: Revert most of "Use more function quotes"

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit da97c6d18ae78cc5cedb284cd6ee6cef16511e7d
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Revert most of "Use more function quotes"

This reverts most of commit af49fd94475ce031b2f08a04d0e3b6a90aba80b6.

The byte-compiler doesn't like it; and I don't like having
to define variable aliases early and function aliases late.
---
 lisp/transient.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 5f0d26bb25..31b79947de 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -69,11 +69,11 @@
 (defvar Man-notify-method)
 
 (define-obsolete-function-alias 'define-transient-command
-  #'transient-define-prefix "Transient 0.3.0")
+  'transient-define-prefix "Transient 0.3.0")
 (define-obsolete-function-alias 'define-suffix-command
-  #'transient-define-suffix "Transient 0.3.0")
+  'transient-define-suffix "Transient 0.3.0")
 (define-obsolete-function-alias 'define-infix-command
-  #'transient-define-infix "Transient 0.3.0")
+  'transient-define-infix "Transient 0.3.0")
 (define-obsolete-function-alias 'define-infix-argument
   #'transient-define-argument "Transient 0.3.0")
 



[elpa] externals/transient bb056e7156 13/17: Invoke suffix commands directly when a button is pushed

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit bb056e7156b3d88f42770ec55e1a7447a95aca96
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Invoke suffix commands directly when a button is pushed

Using wrapper commands that call `pust-button' messed things up
because the latter selects the window where the user clicked,
which we very much want to avoid doing.
---
 lisp/transient.el | 61 +++
 1 file changed, 35 insertions(+), 26 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 8d8c24413f..6cbb55b63d 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1599,7 +1599,7 @@ to `transient-predicate-map'.  Also see 
`transient-base-map'.")
 (define-key map [scroll-bar-toolkit-scroll]   #'transient--do-stay)
 (define-key map [transient-noop]  #'transient--do-noop)
 (define-key map [transient-mouse-push-button] #'transient--do-move)
-(define-key map [transient-push-button]   #'transient--do-move)
+(define-key map [transient-push-button]   #'transient--do-push-button)
 (define-key map [transient-backward-button]   #'transient--do-move)
 (define-key map [transient-forward-button]#'transient--do-move)
 (define-key map [transient-isearch-backward]  #'transient--do-move)
@@ -2314,6 +2314,21 @@ If there is no parent prefix, then behave like 
`transient--do-exit'."
   (transient--stack-zap)
   transient--exit)
 
+(defun transient--do-push-button ()
+  "Call the command represented by the activated button.
+Use that command's pre-command to determine transient behavior."
+  (if (and (mouse-event-p last-command-event)
+   (not (eq (posn-window (event-start last-command-event))
+transient--window)))
+  transient--stay
+(setq this-command
+  (with-selected-window transient--window
+(get-text-property (if (mouse-event-p last-command-event)
+   (posn-point (event-start 
last-command-event))
+ (point))
+   'command)))
+(transient--do-pre-command)))
+
 (defun transient--do-recurse ()
   "Call the transient prefix command, preparing for return to active transient.
 If there is no parent prefix, then just call the command."
@@ -2568,6 +2583,10 @@ around `scroll-down-command' (which see)."
   (with-selected-window transient--window
 (scroll-down-command arg)))
 
+(defun transient-push-button ()
+  "Invoke the suffix command represented by this button."
+  (interactive))
+
 (defun transient-resume ()
   "Resume a previously suspended stack of transients."
   (interactive)
@@ -3711,37 +3730,27 @@ resumes the suspended transient.")
   (message "This command is only available if `%s' is non-nil"
'transient-enable-popup-navigation))
 
-(define-button-type 'transient-button
-  'face nil
-  'action (lambda (button)
-(let ((command (button-get button 'command)))
-  (setq this-command command)
-  (transient--pre-command)
-  (call-interactively command
-
 (defvar transient-popup-navigation-map
   (let ((map (make-sparse-keymap)))
 (define-key map (kbd "") #'transient-noop)
-(define-key map (kbd "") #'transient-mouse-push-button)
-(define-key map (kbd "RET")   #'transient-push-button)
-(define-key map (kbd "")  #'transient-backward-button)
-(define-key map (kbd "C-p")   #'transient-backward-button)
-(define-key map (kbd "")#'transient-forward-button)
-(define-key map (kbd "C-n")   #'transient-forward-button)
-(define-key map (kbd "C-r")   #'transient-isearch-backward)
-(define-key map (kbd "C-s")   #'transient-isearch-forward)
+(define-key map (kbd "")   #'transient-backward-button)
+(define-key map (kbd "C-p")#'transient-backward-button)
+(define-key map (kbd "") #'transient-forward-button)
+(define-key map (kbd "C-n")#'transient-forward-button)
+(define-key map (kbd "C-r")#'transient-isearch-backward)
+(define-key map (kbd "C-s")#'transient-isearch-forward)
 map))
 
-(defun transient-mouse-push-button (&optional pos)
-  "Invoke the suffix the user clicks on."
-  (interactive (list last-command-event))
-  (push-button pos))
+(defvar transient-button-map
+  (let ((map (make-sparse-keymap)))
+(define-key map (kbd "") #'transient-push-button)
+(define-key map (kbd "") #'transient-push-button)
+(define-key map (kbd "RET")   #'transient-push-button)
+map))
 
-(defun transient-push-button ()
-  "Invoke the selected suffix command."
-  (interactive)
-  (with-selected-window transient--window
-(push-button)))
+(define-button-type 'transient-button
+  'face nil
+  'keymap transient-button-map)
 
 (defun transient-backward-button (n)
   "Move to the previous button in the transient popup buffer.



[elpa] externals/transient 0619c7ef19 08/17: Automatically publish statistics

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 0619c7ef198349c11c8ef598c7caa741b3c4c9b0
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Automatically publish statistics
---
 .github/workflows/stats.yml | 18 ++
 Makefile| 10 +++---
 docs/Makefile   | 18 +-
 3 files changed, 38 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml
new file mode 100644
index 00..96f261b489
--- /dev/null
+++ b/.github/workflows/stats.yml
@@ -0,0 +1,18 @@
+name: stats
+on:
+  push:
+branches: master
+jobs:
+  manual:
+name: "Generate and distribute statistics"
+runs-on: ubuntu-latest
+steps:
+  - name: Install gitstats
+uses: magit/actions/install-gitstats@main
+  - name: Generate statistics
+uses: magit/actions/stats-generate@main
+  - name: Publish statistics
+uses: magit/actions/stats-publish@main
+with:
+  key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
+  secret: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
diff --git a/Makefile b/Makefile
index 623c3486ad..2117e62215 100644
--- a/Makefile
+++ b/Makefile
@@ -14,9 +14,10 @@ help:
$(info make html - generate html manual file)
$(info make html-dir - generate html manual directory)
$(info make pdf  - generate pdf manual)
-   $(info make stats- generate statistics)
$(info make publish  - publish snapshot manuals)
$(info make release  - publish release manuals)
+   $(info make stats- generate statistics)
+   $(info make stats-upload - publish statistics)
$(info make clean- remove most generated files)
@printf "\n"
 
@@ -35,14 +36,17 @@ html-dir:
@$(MAKE) -C docs html-dir
 pdf:
@$(MAKE) -C docs pdf
-stats:
-   @$(MAKE) -C docs stats
 
 publish:
@$(MAKE) -C docs publish
 release:
@$(MAKE) VERSION=$(VERSION) -C docs release
 
+stats:
+   @$(MAKE) -C docs stats
+stats-upload:
+   @$(MAKE) -C docs stats-upload
+
 clean:
@$(MAKE) -C lisp clean
@$(MAKE) -C docs clean
diff --git a/docs/Makefile b/docs/Makefile
index 15c20aa42d..c0b03ded5f 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -52,11 +52,6 @@ html-dir: $(PKG).texi
@printf "Generating $@\n"
@texi2pdf --clean $< > /dev/null
 
-.PHONY: stats
-stats:
-   @printf "Generating statistics\n"
-   @gitstats $(GITSTATS_ARGS) $(TOP) $(GITSTATS_DIR)
-
 PUBLISH_PATH   ?= /manual/
 RELEASE_PATH   ?= /manual/$(VERSION)/
 S3_BUCKET  ?= s3://$(DOMAIN)
@@ -86,6 +81,19 @@ release: html html-dir pdf
@aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST) 
--paths \
"$(subst $(space),$(comma),$(addprefix 
$(RELEASE_PATH),$(CFRONT_PATHS)))" > /dev/null
 
+.PHONY: stats
+stats:
+   @printf "Generating statistics\n"
+   @$(GITSTATS) $(GITSTATS_ARGS) $(TOP) $(GITSTATS_DIR)
+
+stats-upload:
+   @printf "Uploading statistics...\n"
+   @aws s3 sync $(GITSTATS_DIR) $(S3_BUCKET)/stats/$(PKG)
+   @printf "Uploaded to $(S3_BUCKET)/stats/$(PKG)\n"
+   @printf "Generating CDN invalidation\n"
+   @aws cloudfront create-invalidation \
+   --distribution-id $(CFRONT_DIST) --paths "/stats/*" > /dev/null
+
 CLEAN = $(PKG).info dir $(PKG) $(PKG).html $(PKG).pdf
 
 clean:



[elpa] externals/transient 132090a4b6 17/17: transient-enable-popup-navigation: Enable by default

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 132090a4b6d65603a09e33113f6dbd9a1131e38e
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient-enable-popup-navigation: Enable by default
---
 lisp/transient.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 7cb8714107..8017afefce 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -131,7 +131,7 @@
  (const  :tag "on demand (no summary)" 0)
  (number :tag "after delay" 1)))
 
-(defcustom transient-enable-popup-navigation nil
+(defcustom transient-enable-popup-navigation t
   "Whether navigation commands are enabled in the transient popup.
 
 While a transient is active the transient popup buffer is not the
@@ -151,7 +151,7 @@ bindings are available:
 
 Each of these bindings is defined in either `transient-button-map'
 or `transient-popup-navigation-map'."
-  :package-version '(transient . "0.2.0")
+  :package-version '(transient . "0.4.0")
   :group 'transient
   :type 'boolean)
 



[elpa] externals/transient ecf340cbff 09/17: make: Set GITSTATS

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit ecf340cbfff8434ad00a26b408bd3587a10ef59b
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

make: Set GITSTATS
---
 default.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/default.mk b/default.mk
index eb1a74d17c..1a6ad9ee66 100644
--- a/default.mk
+++ b/default.mk
@@ -26,5 +26,6 @@ INSTALL_INFO ?= $(shell command -v ginstall-info || 
printf install-info)
 MAKEINFO ?= makeinfo
 MANUAL_HTML_ARGS ?= --css-ref /assets/page.css
 
+GITSTATS  ?= gitstats
 GITSTATS_DIR  ?= $(TOP)docs/stats
 GITSTATS_ARGS ?= -c style=https://magit.vc/assets/stats.css -c max_authors=999



[elpa] externals/transient dd67ff9061 12/17: transient--do-pre-command: New function

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit dd67ff906198d28439bfec71ecba98edbed55321
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient--do-pre-command: New function
---
 lisp/transient.el | 26 ++
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 059c3af0a3..8d8c24413f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1989,20 +1989,22 @@ value.  Otherwise return CHILDREN as is."
   (setq this-command 'transient-set-level))
  (t
   (setq transient--exitp nil)
-  (when (eq (if-let ((fn (transient--get-predicate-for this-command)))
-(let ((action (funcall fn)))
-  (when (eq action transient--exit)
-(setq transient--exitp (or transient--exitp t)))
-  action)
-  (if (let ((keys (this-command-keys-vector)))
-(eq (aref keys (1- (length keys))) ?\C-g))
-  (setq this-command 'transient-noop)
-(unless (transient--edebug-command-p)
-  (setq this-command 'transient-undefined)))
-  transient--stay)
-transient--exit)
+  (when (eq (transient--do-pre-command) transient--exit)
 (transient--pre-exit))
 
+(defun transient--do-pre-command ()
+  (if-let ((fn (transient--get-predicate-for this-command)))
+  (let ((action (funcall fn)))
+(when (eq action transient--exit)
+  (setq transient--exitp (or transient--exitp t)))
+action)
+(if (let ((keys (this-command-keys-vector)))
+  (eq (aref keys (1- (length keys))) ?\C-g))
+(setq this-command 'transient-noop)
+  (unless (transient--edebug-command-p)
+(setq this-command 'transient-undefined)))
+transient--stay))
+
 (defun transient--get-predicate-for (cmd)
   (or (ignore-errors
 (lookup-key transient--predicate-map



[elpa] externals/transient 31d355b596 10/17: transient-set-level: Refresh shown levels after setting one

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 31d355b5962e22e160617c70cfdde344afb00998
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient-set-level: Refresh shown levels after setting one
---
 lisp/transient.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 5aa7b6e6fb..66a2ac2111 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2507,7 +2507,8 @@ transient is active."
 (oset (transient-suffix-object command) level level))
   (setf (alist-get sym alist) level)
   (setf (alist-get prefix transient-levels) alist))
-(transient-save-levels))
+(transient-save-levels)
+(transient--show))
(t
 (transient-undefined
 



[elpa] externals/transient 06697f75ac 11/17: Only use this-original-command when necessary

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 06697f75ace79936e12709cfbd75547b7016b733
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Only use this-original-command when necessary

It is necessary for `transient-help' and `transient-set-level'.
Invoking one of these commands enters a special mode.  The next
command is always replaced with the command that entered the
special mode, which now behaves differently: it show the help
resp. sets the level for the `this-original-command'.

Other uses of `this-original-command' likely were "inspired" by
these legitimate uses.
---
 lisp/transient.el | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 66a2ac2111..059c3af0a3 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1439,7 +1439,7 @@ probably use this instead:
   transient-current-prefix)
   (cl-find-if (lambda (obj)
 (eq (transient--suffix-command obj)
-(or command this-original-command)))
+(or command this-command)))
   (or transient--suffixes
   transient-current-suffixes))
 (when-let ((obj (get (or command this-command) 'transient--suffix))
@@ -1989,8 +1989,7 @@ value.  Otherwise return CHILDREN as is."
   (setq this-command 'transient-set-level))
  (t
   (setq transient--exitp nil)
-  (when (eq (if-let ((fn (transient--get-predicate-for
-  this-original-command)))
+  (when (eq (if-let ((fn (transient--get-predicate-for this-command)))
 (let ((action (funcall fn)))
   (when (eq action transient--exit)
 (setq transient--exitp (or transient--exitp t)))
@@ -2402,8 +2401,7 @@ to `transient--do-warn'."
'face 'font-lock-warning-face)
(propertize "C-g" 'face 'transient-key)
(propertize "?"   'face 'transient-key)
-   (propertize (symbol-name (transient--suffix-symbol
- this-original-command))
+   (propertize (symbol-name (transient--suffix-symbol this-command))
'face 'font-lock-warning-face))
   (unless (and transient--transient-map
(memq transient--transient-map overriding-terminal-local-map))
@@ -3715,9 +3713,7 @@ resumes the suspended transient.")
   'face nil
   'action (lambda (button)
 (let ((command (button-get button 'command)))
-  ;; Yes, I know that this is wrong(tm).
-  ;; Unfortunately it is also necessary.
-  (setq this-original-command command)
+  (setq this-command command)
   (transient--pre-command)
   (call-interactively command
 



[elpa] externals/transient 5c746f3146 15/17: No longer consider popup navigation a secondary feature

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 5c746f314678117fcb45be7a003cbdc1781b0ea9
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

No longer consider popup navigation a secondary feature

In practical terms that just means moving the definitions of two
keymaps.  Also, just because I now consider this a useful feature
that doesn't mean that it won't need more work.
---
 lisp/transient.el | 38 ++
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 9723c20692..95865a9484 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1572,6 +1572,22 @@ to `transient-predicate-map'.  Also see 
`transient-base-map'.")
  "Show common permanently")))
   ("C-x l" "Show/hide suffixes" transient-set-level)]])))
 
+(defvar transient-popup-navigation-map
+  (let ((map (make-sparse-keymap)))
+(define-key map (kbd "") #'transient-noop)
+(define-key map (kbd "")   #'transient-backward-button)
+(define-key map (kbd "") #'transient-forward-button)
+(define-key map (kbd "C-r")#'transient-isearch-backward)
+(define-key map (kbd "C-s")#'transient-isearch-forward)
+map))
+
+(defvar transient-button-map
+  (let ((map (make-sparse-keymap)))
+(define-key map (kbd "") #'transient-push-button)
+(define-key map (kbd "") #'transient-push-button)
+(define-key map (kbd "RET")   #'transient-push-button)
+map))
+
 (defvar transient-predicate-map
   (let ((map (make-sparse-keymap)))
 (define-key map [transient-suspend]   #'transient--do-suspend)
@@ -1628,8 +1644,6 @@ For transient commands that are bound in individual 
transients,
 the transient behavior is specified using the `:transient' slot
 of the corresponding object.")
 
-(defvar transient-popup-navigation-map)
-
 (defvar transient--transient-map nil)
 (defvar transient--predicate-map nil)
 (defvar transient--redisplay-map nil)
@@ -3721,8 +3735,7 @@ resumes the suspended transient.")
   (message "Debugging transient %s"
(if transient--debug "enabled" "disabled")))
 
-;;; Compatibility
- Popup Navigation
+;;; Popup Navigation
 
 (defun transient-popup-navigation-help ()
   "Inform the user how to enable popup navigation commands."
@@ -3730,22 +3743,6 @@ resumes the suspended transient.")
   (message "This command is only available if `%s' is non-nil"
'transient-enable-popup-navigation))
 
-(defvar transient-popup-navigation-map
-  (let ((map (make-sparse-keymap)))
-(define-key map (kbd "") #'transient-noop)
-(define-key map (kbd "")   #'transient-backward-button)
-(define-key map (kbd "") #'transient-forward-button)
-(define-key map (kbd "C-r")#'transient-isearch-backward)
-(define-key map (kbd "C-s")#'transient-isearch-forward)
-map))
-
-(defvar transient-button-map
-  (let ((map (make-sparse-keymap)))
-(define-key map (kbd "") #'transient-push-button)
-(define-key map (kbd "") #'transient-push-button)
-(define-key map (kbd "RET")   #'transient-push-button)
-map))
-
 (define-button-type 'transient-button
   'face nil
   'keymap transient-button-map)
@@ -3783,6 +3780,7 @@ See `forward-button' for information about N."
   beg (next-single-property-change
beg 'face nil (line-end-position))
 
+;;; Compatibility
  Popup Isearch
 
 (defvar transient--isearch-mode-map



[elpa] externals/transient 75a44f5058 16/17: transient-enable-popup-navigation: Improve docstring

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 75a44f5058221ada3e9b8312248c890ec27ae1d5
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient-enable-popup-navigation: Improve docstring
---
 lisp/transient.el | 23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 95865a9484..7cb8714107 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -136,14 +136,21 @@
 
 While a transient is active the transient popup buffer is not the
 current buffer, making it necessary to use dedicated commands to
-act on that buffer itself.  If this non-nil, then the following
-features are available:
-
-- \"\" moves the cursor to the previous suffix.
-  \"\" moves the cursor to the next suffix.
-  \"RET\" invokes the suffix the cursor is on.
-- \"\" invokes the clicked on suffix.
-- \"C-s\" and \"C-r\" start isearch in the popup buffer."
+act on that buffer itself.  If this is non-nil, then the following
+bindings are available:
+
+\\\
+- \\[transient-backward-button] moves the cursor to the previous suffix.
+- \\[transient-forward-button] moves the cursor to the next suffix.
+\\\
+- \\[transient-push-button] invokes the suffix the cursor is on.
+- \\`' and \\`' invoke the clicked on suffix.
+\\\
+- \\[transient-isearch-backward]\
+ and \\[transient-isearch-forward] start isearch in the popup buffer.
+
+Each of these bindings is defined in either `transient-button-map'
+or `transient-popup-navigation-map'."
   :package-version '(transient . "0.2.0")
   :group 'transient
   :type 'boolean)



[elpa] externals/transient 98d5020238 14/17: transient-popup-navigation-map: No longer bind C-p and C-n

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 98d502023817aa06f3046ba89c7c5a856ed88c35
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient-popup-navigation-map: No longer bind C-p and C-n

If a transient prefix allows the use of non-suffixes, then it is not
appropriate to take over these keys.  This is going to matter more
when we both enable popup navigation by default and more transients
allow the use of non-suffixes.
---
 lisp/transient.el | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 6cbb55b63d..9723c20692 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3734,9 +3734,7 @@ resumes the suspended transient.")
   (let ((map (make-sparse-keymap)))
 (define-key map (kbd "") #'transient-noop)
 (define-key map (kbd "")   #'transient-backward-button)
-(define-key map (kbd "C-p")#'transient-backward-button)
 (define-key map (kbd "") #'transient-forward-button)
-(define-key map (kbd "C-n")#'transient-forward-button)
 (define-key map (kbd "C-r")#'transient-isearch-backward)
 (define-key map (kbd "C-s")#'transient-isearch-forward)
 map))



[elpa] externals/pulsar updated (5ff2b81633 -> d643c28ac7)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch externals/pulsar.

  from  5ff2b81633 Add minor mode lighter
   new  6258c511ee Abstract pulsar-mode lighter
   new  d643c28ac7 Remove isearch from pulsar-pulse-functions


Summary of changes:
 pulsar.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)



[elpa] externals/pulsar d643c28ac7 2/2: Remove isearch from pulsar-pulse-functions

2022-03-25 Thread ELPA Syncer
branch: externals/pulsar
commit d643c28ac7d1ebd8b7fc1e5137b77900572168a5
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Remove isearch from pulsar-pulse-functions

I tried them for a while, but they are too intrusive when there are
multiple matches clustered together.
---
 pulsar.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pulsar.el b/pulsar.el
index 66c745b113..4eb4a47c6a 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -68,9 +68,7 @@ Extension of `pulse.el'."
  User options
 
 (defcustom pulsar-pulse-functions
-  '(isearch-repeat-forward
-isearch-repeat-backward
-recenter-top-bottom
+  '(recenter-top-bottom
 move-to-window-line-top-bottom
 reposition-window
 bookmark-jump



[elpa] externals/pulsar 6258c511ee 1/2: Abstract pulsar-mode lighter

2022-03-25 Thread ELPA Syncer
branch: externals/pulsar
commit 6258c511ee4c27cc1f794224d16f95f396765ec8
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Abstract pulsar-mode lighter

Thanks to Rudolf Adamkovič for the feedback in issue:
.
---
 pulsar.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pulsar.el b/pulsar.el
index 0d09e1fe2c..66c745b113 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -295,11 +295,14 @@ default)."
 
  Mode setup
 
+(defvar pulsar-lighter " -P-"
+  "Mode line lighter used by `pulsar-mode'.")
+
 (define-minor-mode pulsar-mode
   "Set up pulsar for each function in `pulsar-pulse-functions'.
 This is a buffer-local mode.  Also check `pulsar-global-mode'."
   :global nil
-  :lighter " -P-"
+  :lighter pulsar-lighter
   (if pulsar-mode
   (add-hook 'post-command-hook #'pulsar--post-command-pulse nil 'local)
 (remove-hook 'post-command-hook #'pulsar--post-command-pulse 'local)))



[elpa] externals/org-modern f25040df96: Use more restrictive tag regular expression (Fix #32)

2022-03-25 Thread ELPA Syncer
branch: externals/org-modern
commit f25040df96f7c9981872efcebe682419fb919e3b
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use more restrictive tag regular expression (Fix #32)
---
 org-modern.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-modern.el b/org-modern.el
index 094a559f95..8997282d0e 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -510,7 +510,7 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
(1 '(face nil display (space :width (3
(2 'org-modern-block-keyword append
   (when org-modern-tag
-'(("^\\*+.*?\\( \\)\\(:.*:\\)[ \t]*$" (0 (org-modern--tag)
+'(("^\\*+.*?\\( \\)\\(:\\(?:[^ :]+:\\)+\\)[ \t]*$" (0 
(org-modern--tag)
   (when (and org-modern-timestamp (not org-display-custom-times))
 '(("\\(?:<\\|\\[\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: 
[[:word:]]+\\)?\\(?: [.+-]+[0-9ymwdh/]+\\)*\\)\\(\\(?: [0-9:-]+\\)?\\(?: 
[.+-]+[0-9ymwdh/]+\\)*\\)\\(?:>\\|\\]\\)"
(0 (org-modern--timestamp)))



[elpa] externals/org-modern 148d55293f: Improve block fontification

2022-03-25 Thread ELPA Syncer
branch: externals/org-modern
commit 148d55293f9b39f7bfba427effdbafcd872fdb00
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve block fontification
---
 org-modern.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index 8997282d0e..d6ca406968 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -429,7 +429,7 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
 (save-excursion
   (goto-char (match-beginning 0))
   (add-text-properties
-   (point) (min (1+ (line-end-position)) (point-max))
+   (point) (min (line-end-position) (point-max))
'(wrap-prefix
  #(" " 0 1 (display (left-fringe org-modern--block-begin 
org-block-begin-line)))
  line-prefix
@@ -443,7 +443,7 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
 (re-search-forward
  "^[ \t]*#\\+end_" (line-end-position) 'noerror)))
 (add-text-properties
- (point) (min (1+ (line-end-position)) (point-max))
+ (point) (min (line-end-position) (point-max))
  '(wrap-prefix
#(" " 0 1 (display (left-fringe org-modern--block-end 
org-block-begin-line)))
line-prefix



[elpa] externals/pulsar b44af947fe: Clarify docs about duration, iterations, delay

2022-03-25 Thread ELPA Syncer
branch: externals/pulsar
commit b44af947fed73f93d476b994d0d962e6ab6f45fc
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Clarify docs about duration, iterations, delay

Thanks to Rudolf Adamkovič for the feedback in issue 12:
.
---
 README.org |  7 ---
 pulsar.el  | 15 +--
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/README.org b/README.org
index 4583ef8903..49e60cd873 100644
--- a/README.org
+++ b/README.org
@@ -77,9 +77,10 @@ enabled.
 #+vindex: pulsar-delay
 #+vindex: pulsar-iterations
 #+vindex: pulsar-face
-The duration of the highlight is determined by ~pulsar-delay~.  How
-smooth the effect is depends on ~pulsar-iterations~.  While the
-applicable face is specified in ~pulsar-face~.
+The overall duration of the highlight is determined by a combination of
+~pulsar-delay~ and ~pulsar-iterations~.  The latter determines the
+number of blinks in a pulse, while the former sets their interval in
+seconds.  The applicable face is specified in ~pulsar-face~.
 
 #+vindex: pulsar-pulse
 To disable the pulse but keep the temporary highlight, set the user
diff --git a/pulsar.el b/pulsar.el
index 4eb4a47c6a..94529d4fb2 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -31,9 +31,10 @@
 ;; takes place when either `pulsar-mode' (buffer-local) or
 ;; `pulsar-global-mode' is enabled.
 ;;
-;; The duration of the highlight is determined by `pulsar-delay'.  How
-;; smooth the effect is depends on `pulsar-iterations'.  While the
-;; applicable face is specified in `pulsar-face'.
+;; The overall duration of the highlight is determined by a combination
+;; of `pulsar-delay' and `pulsar-iterations'.  The latter determines the
+;; number of blinks in a pulse, while the former sets their interval in
+;; seconds.  The applicable face is specified in `pulsar-face'.
 ;;
 ;; To disable the pulse but keep the temporary highlight, set the user
 ;; option `pulsar-pulse' to nil.  The current line will remain
@@ -143,14 +144,16 @@ command is invoked."
   :group 'pulsar)
 
 (defcustom pulsar-delay 0.05
-  "Duration in seconds of the active pulse highlight.
-Only applies when `pulsar-pulse' is non-nil."
+  "Delay between increments of a pulse.
+Together with `pulsar-iterations' control the overall duration of
+a pulse.  Only applies when `pulsar-pulse' is non-nil."
   :type 'number
   :group 'pulsar)
 
 (defcustom pulsar-iterations pulse-iterations
   "Number of iterations in a pulse highlight.
-Only applies when `pulsar-pulse' is non-nil."
+Together with `pulsar-delay' control the overall duration of a
+pulse.  Only applies when `pulsar-pulse' is non-nil."
   :type 'number
   :group 'pulsar)
 



[elpa] externals/pulsar 4781b67078 1/3: Clarify statement in the documentation

2022-03-25 Thread ELPA Syncer
branch: externals/pulsar
commit 4781b670788329fe9bee8f4cc1f93fb645e89185
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Clarify statement in the documentation
---
 README.org | 5 +++--
 pulsar.el  | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 49e60cd873..3ca154acb1 100644
--- a/README.org
+++ b/README.org
@@ -79,8 +79,9 @@ enabled.
 #+vindex: pulsar-face
 The overall duration of the highlight is determined by a combination of
 ~pulsar-delay~ and ~pulsar-iterations~.  The latter determines the
-number of blinks in a pulse, while the former sets their interval in
-seconds.  The applicable face is specified in ~pulsar-face~.
+number of blinks in a pulse, while the former sets their delay in
+seconds before they fade out.  The applicable face is specified in
+~pulsar-face~.
 
 #+vindex: pulsar-pulse
 To disable the pulse but keep the temporary highlight, set the user
diff --git a/pulsar.el b/pulsar.el
index 94529d4fb2..f447899217 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -33,8 +33,9 @@
 ;;
 ;; The overall duration of the highlight is determined by a combination
 ;; of `pulsar-delay' and `pulsar-iterations'.  The latter determines the
-;; number of blinks in a pulse, while the former sets their interval in
-;; seconds.  The applicable face is specified in `pulsar-face'.
+;; number of blinks in a pulse, while the former sets their delay in
+;; seconds before they fade out.  The applicable face is specified in
+;; `pulsar-face'.
 ;;
 ;; To disable the pulse but keep the temporary highlight, set the user
 ;; option `pulsar-pulse' to nil.  The current line will remain



[elpa] externals/osm 4f1d545456: Indentation

2022-03-25 Thread ELPA Syncer
branch: externals/osm
commit 4f1d545456838fcc2860ae37f2bacf3d9d3d6004
Author: Daniel Mendler 
Commit: Daniel Mendler 

Indentation
---
 osm.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/osm.el b/osm.el
index 891ff05039..35e002042f 100644
--- a/osm.el
+++ b/osm.el
@@ -166,9 +166,9 @@
   (list 0 0 3)))
   "Home coordinates, latitude, longitude and zoom level."
   :type '(list :tag "Coordinates"
-  (number :tag "Latitude  ")
-  (number :tag "Longitude ")
-  (number :tag "Zoom  ")))
+   (number :tag "Latitude  ")
+   (number :tag "Longitude ")
+   (number :tag "Zoom  ")))
 
 (defcustom osm-large-step 256
   "Scroll step in pixel."
@@ -1222,8 +1222,8 @@ Optionally place transient pin with ID and NAME."
  (setq server (car server))
  (unless (and server (symbolp server)) (setq server nil)) ;; Ignore comment
  `(progn
-   (osm--goto ,lat ,lon ,zoom ',server 'osm-link "Elisp Link")
-   '(osm ,lat ,lon ,zoom ,@(and server (list server)
+(osm--goto ,lat ,lon ,zoom ',server 'osm-link "Elisp Link")
+'(osm ,lat ,lon ,zoom ,@(and server (list server)
 ((and `(,search) (guard (stringp search)))
  `(progn
 (osm-search ,search)
@@ -1236,8 +1236,8 @@ Optionally place transient pin with ID and NAME."
   (interactive (list (osm--bookmark-read)))
   (let ((coords (bookmark-prop-get bm 'coordinates)))
 (set-buffer (osm--goto (nth 0 coords) (nth 1 coords) (nth 2 coords)
-   (bookmark-prop-get bm 'server)
-   'osm-selected-bookmark (car bm)
+   (bookmark-prop-get bm 'server)
+   'osm-selected-bookmark (car bm)
 
 ;;;###autoload
 (defun osm-bookmark-delete (bm)
@@ -1347,7 +1347,7 @@ If the prefix argument LUCKY is non-nil take the first 
result and jump there."
   (osm--sorted-table results)
   nil t)
  results)
-   (error "No selection"
+(error "No selection"
 (osm--goto (cadr selected) (caddr selected)
(apply #'osm--boundingbox-to-zoom (cdddr selected))
nil 'osm-transient (car selected



[elpa] externals/pulsar updated (b44af947fe -> 5b72d3db1d)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch externals/pulsar.

  from  b44af947fe Clarify docs about duration, iterations, delay
   new  4781b67078 Clarify statement in the documentation
   new  3745de5151 Remove the minor mode lighter
   new  5b72d3db1d Untabify a function


Summary of changes:
 README.org |  5 +++--
 pulsar.el  | 17 +++--
 2 files changed, 10 insertions(+), 12 deletions(-)



[elpa] externals/pulsar 3745de5151 2/3: Remove the minor mode lighter

2022-03-25 Thread ELPA Syncer
branch: externals/pulsar
commit 3745de51519edd5c18a0bf0f53c1a8c60ae073cf
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Remove the minor mode lighter

There was a misunderstanding.  We do not need one.

Thanks to Rudolf Adamkovič and Daniel Mendler for the feedback in issue
11: .
---
 pulsar.el | 4 
 1 file changed, 4 deletions(-)

diff --git a/pulsar.el b/pulsar.el
index f447899217..10722bc058 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -297,14 +297,10 @@ default)."
 
  Mode setup
 
-(defvar pulsar-lighter " -P-"
-  "Mode line lighter used by `pulsar-mode'.")
-
 (define-minor-mode pulsar-mode
   "Set up pulsar for each function in `pulsar-pulse-functions'.
 This is a buffer-local mode.  Also check `pulsar-global-mode'."
   :global nil
-  :lighter pulsar-lighter
   (if pulsar-mode
   (add-hook 'post-command-hook #'pulsar--post-command-pulse nil 'local)
 (remove-hook 'post-command-hook #'pulsar--post-command-pulse 'local)))



[elpa] externals/org-modern 1605ffc284: Use org-tag-re

2022-03-25 Thread ELPA Syncer
branch: externals/org-modern
commit 1605ffc284421e46598766ded6aad1309987c6ff
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use org-tag-re
---
 org-modern.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/org-modern.el b/org-modern.el
index d6ca406968..ed4a36dc40 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -510,7 +510,8 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
(1 '(face nil display (space :width (3
(2 'org-modern-block-keyword append
   (when org-modern-tag
-'(("^\\*+.*?\\( \\)\\(:\\(?:[^ :]+:\\)+\\)[ \t]*$" (0 
(org-modern--tag)
+`((,(concat "^\\*+.*?\\( \\)\\(:\\(?:" org-tag-re ":\\)+\\)[ \t]*$")
+   (0 (org-modern--tag)
   (when (and org-modern-timestamp (not org-display-custom-times))
 '(("\\(?:<\\|\\[\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: 
[[:word:]]+\\)?\\(?: [.+-]+[0-9ymwdh/]+\\)*\\)\\(\\(?: [0-9:-]+\\)?\\(?: 
[.+-]+[0-9ymwdh/]+\\)*\\)\\(?:>\\|\\]\\)"
(0 (org-modern--timestamp)))



[elpa] externals/pulsar 5b72d3db1d 3/3: Untabify a function

2022-03-25 Thread ELPA Syncer
branch: externals/pulsar
commit 5b72d3db1d49d3cf303226364cfc407dccd11740
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Untabify a function
---
 pulsar.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pulsar.el b/pulsar.el
index 10722bc058..de5514a738 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -264,10 +264,10 @@ is invoked.  Otherwise use whatever `pulsar-pulse' 
entails.
 
 With optional FACE, use it instead of `pulsar-face'."
   (let* ((pulse-flag (if no-pulse nil pulsar-pulse))
-(pulse-delay pulsar-delay)
-(pulse-iterations pulsar-iterations)
-(f (if (facep face) face pulsar-face))
-(o (make-overlay (pulsar--start) (pulsar--end
+ (pulse-delay pulsar-delay)
+ (pulse-iterations pulsar-iterations)
+ (f (if (facep face) face pulsar-face))
+ (o (make-overlay (pulsar--start) (pulsar--end
 (overlay-put o 'pulse-delete t)
 (overlay-put o 'window (frame-selected-window))
 (pulse-momentary-highlight-overlay o f)))



[elpa] externals/org-modern c5fcbf86f2 1/2: Timestamps: Use distant-foreground (Fix #31)

2022-03-25 Thread ELPA Syncer
branch: externals/org-modern
commit c5fcbf86f2db066cdf9d0444eec7d87352c25149
Author: Daniel Mendler 
Commit: Daniel Mendler 

Timestamps: Use distant-foreground (Fix #31)
---
 org-modern.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index ed4a36dc40..e3f83f8089 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -226,8 +226,8 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
 (defface org-modern-time-active
   '((default :inherit org-modern-label :weight semibold)
 (((background light))
- :background "gray35" :foreground "white")
-(t :background "gray75" :foreground "black"))
+ :background "gray35" :foreground "white" :distant-foreground "black")
+(t :background "gray75" :foreground "black" :distant-foreground "white"))
   "Face used for active time labels.")
 
 (defface org-modern-date-inactive
@@ -239,8 +239,8 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
 
 (defface org-modern-time-inactive
   '((default :inherit org-modern-label :background "gray50")
-(((background light)) :foreground "gray95")
-(t :foreground "gray5"))
+(((background light)) :foreground "gray95" :distant-foreground "gray5")
+(t :foreground "gray5" :distant-foreground "gray95"))
   "Face used for inactive time labels.")
 
 (defface org-modern-horizontal-rule



[elpa] externals/org-modern dc19304f40 2/2: Add comments

2022-03-25 Thread ELPA Syncer
branch: externals/org-modern
commit dc19304f409259d1b258c51cedd2d362e0ff9b98
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add comments
---
 org-modern.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/org-modern.el b/org-modern.el
index e3f83f8089..86ed1f97f1 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -206,11 +206,13 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
   "Face used for done labels.")
 
 (defface org-modern-todo
+  ;; `:inverse-video' to use todo foreground as label background
   '((t :inherit (org-todo org-modern-label)
:weight semibold :inverse-video t))
   "Face used for todo labels.")
 
 (defface org-modern-priority
+  ;; `:inverse-video' to use priority foreground as label background
   '((t :inherit (org-priority org-modern-label)
:weight semibold :inverse-video t))
   "Face used for priority labels.")
@@ -224,6 +226,7 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
   "Face used for active date labels.")
 
 (defface org-modern-time-active
+  ;; Use `:distant-foreground' to ensure readability if `hl-line-mode' is used.
   '((default :inherit org-modern-label :weight semibold)
 (((background light))
  :background "gray35" :foreground "white" :distant-foreground "black")
@@ -238,6 +241,7 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
   "Face used for inactive date labels.")
 
 (defface org-modern-time-inactive
+  ;; Use `:distant-foreground' to ensure readability if `hl-line-mode' is used.
   '((default :inherit org-modern-label :background "gray50")
 (((background light)) :foreground "gray95" :distant-foreground "gray5")
 (t :foreground "gray5" :distant-foreground "gray95"))



[elpa] externals/org-modern updated (1605ffc284 -> dc19304f40)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch externals/org-modern.

  from  1605ffc284 Use org-tag-re
   new  c5fcbf86f2 Timestamps: Use distant-foreground (Fix #31)
   new  dc19304f40 Add comments


Summary of changes:
 org-modern.el | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)



[elpa] externals/transient 270eff1c7c: Fix redisplay when popup navigation is enabled

2022-03-25 Thread Jonas Bernoulli
branch: externals/transient
commit 270eff1c7cc910dfe9882e97df608627028eaa40
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Fix redisplay when popup navigation is enabled
---
 lisp/transient.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 8017afefce..6006e1c03d 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1694,8 +1694,12 @@ of the corresponding object.")
  cmd conflict)))
   (define-key map kbd cmd
 (when transient-enable-popup-navigation
-  (setq map
-(make-composed-keymap (list map transient-popup-navigation-map
+  ;; `transient--make-redisplay-map' maps only over bindings that are
+  ;; directly in the base keymap, so that cannot be a composed keymap.
+  (set-keymap-parent
+   map (make-composed-keymap
+(keymap-parent map)
+transient-popup-navigation-map)))
 map))
 
 (defun transient--make-predicate-map ()



[elpa] externals/buffer-env ba1c9d24d3: Bump version

2022-03-25 Thread ELPA Syncer
branch: externals/buffer-env
commit ba1c9d24d3f1ba58445cbf1f762ba6859b66f6bf
Author: Augusto Stoffel 
Commit: Augusto Stoffel 

Bump version
---
 buffer-env.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buffer-env.el b/buffer-env.el
index a833777333..f21a324a2f 100644
--- a/buffer-env.el
+++ b/buffer-env.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/astoff/buffer-env
 ;; Keywords: processes, tools
 ;; Package-Requires: ((emacs "27.1"))
-;; Version: 0.2
+;; Version: 0.3
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by



[elpa] externals/isearch-mb updated (a67f51b723 -> e70ba8f594)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch externals/isearch-mb.

  from  a67f51b723 Define scroll up/down commands
   new  b77762a2f7 Expand README note on lax whitespace
   new  e70ba8f594 Bump version


Summary of changes:
 README.org| 27 +++
 isearch-mb.el |  2 +-
 2 files changed, 16 insertions(+), 13 deletions(-)



[elpa] externals/isearch-mb b77762a2f7 1/2: Expand README note on lax whitespace

2022-03-25 Thread ELPA Syncer
branch: externals/isearch-mb
commit b77762a2f7e58b6270ae4b599590b9302a336ecc
Author: Augusto Stoffel 
Commit: Augusto Stoffel 

Expand README note on lax whitespace
---
 README.org | 27 +++
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/README.org b/README.org
index 62255295b8..e463a8dfad 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,6 @@
 #+title: isearch-mb --- Control isearch from the minibuffer
 
-#+html: http://elpa.gnu.org/packages/isearch-mb.html";>https://elpa.gnu.org/packages/isearch-mb.svg"/>
+#+html: http://elpa.gnu.org/packages/isearch-mb.html";>https://elpa.gnu.org/packages/isearch-mb.svg"/>
 
 This Emacs package provides an alternative isearch UI based on the
 minibuffer. This allows editing the search string in arbitrary ways
@@ -13,7 +13,7 @@ isearch-mb is part of 
[[https://elpa.gnu.org/packages/isearch-mb.html][GNU ELPA]
 package-install RET isearch-mb RET=. To activate it, type =M-x
 isearch-mb-mode RET=.
 
-* Keybindings
+** Keybindings
 
 During a search, =isearch-mb-minibuffer-map= is active. By default, it
 includes the following commands:
@@ -31,7 +31,7 @@ includes the following commands:
 Everything else works as in a plain minibuffer. For instance, =RET=
 ends the search normally and =C-g= cancels it.
 
-* Some customization ideas
+** Some customization ideas
 
 isearch provides a myriad of customization options, and most of them
 make just as much sense when using isearch-mb. The following are some
@@ -58,21 +58,24 @@ Using regexp search by default is a popular option as well:
   (global-set-key (kbd "C-r") 'isearch-backward-regexp)
 #+end_src
 
-For a Swiper-style fuzzy search, where spaces match any sequence of
-characters in a line, use the settings below.  You can still toggle
-strict whitespace matching with =M-s SPC= during a search, or escape a
-space with a backslash to match it literally.
+Another handy option is to enable lax whitespace matching in one of
+the two variations indicated below.  You can still toggle strict
+whitespace matching with =M-s SPC= during a search, or escape a space
+with a backslash to match it literally.
 
 #+begin_src emacs-lisp
   (setq-default
isearch-regexp-lax-whitespace t
-   search-whitespace-regexp ".*?")
+   ;; Swiper style: space matches any sequence of characters in a line.
+   search-whitespace-regexp ".*?"
+   ;; Alternative: space matches whitespace, newlines and punctuation.
+   search-whitespace-regexp "\\W+")
 #+end_src
 
 Finally, you may want to check out the 
[[https://github.com/astoff/isearch-mb/wiki][isearch-mb wiki]] for additional
 tips and tricks.
 
-* Interaction with other isearch extensions
+** Interaction with other isearch extensions
 
 Some third-party isearch extensions require a bit of configuration in
 order to work with isearch-mb. There are three cases to consider:
@@ -130,8 +133,8 @@ order to work with isearch-mb. There are three cases to 
consider:
 (define-key isearch-mb-minibuffer-map (kbd "C-e") 
'move-end-of-line-maybe-ending-isearch)
   #+end_src
 
-* Contributing
+** Contributing
 
 Discussions, suggestions and code contributions are welcome! Since
-this package is part of GNU ELPA, nontrivial contributions (above 15
-lines of code) require a copyright assignment to the FSF.
+this package is part of GNU ELPA, contributions require a copyright
+assignment to the FSF.



[elpa] externals/isearch-mb e70ba8f594 2/2: Bump version

2022-03-25 Thread ELPA Syncer
branch: externals/isearch-mb
commit e70ba8f594afef989006493dd71bd693a29e9f42
Author: Augusto Stoffel 
Commit: Augusto Stoffel 

Bump version
---
 isearch-mb.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/isearch-mb.el b/isearch-mb.el
index 530550beb0..eae2e3d723 100644
--- a/isearch-mb.el
+++ b/isearch-mb.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/astoff/isearch-mb
 ;; Keywords: matching
 ;; Package-Requires: ((emacs "27.1"))
-;; Version: 0.4
+;; Version: 0.5
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by



[nongnu] elpa/git-commit 94aca04dc8 02/18: magit-module-section: Use correct keymap

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 94aca04dc8f938cd1d9b180e3a72700d00f8546c
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-module-section: Use correct keymap
---
 lisp/magit-base.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index e0de9ba37a..78c7ac8030 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -448,7 +448,7 @@ and delay of your graphical environment or operating 
system."
(header :initform nil)))
 
 (defclass magit-module-section (magit-file-section)
-  ((keymap :initform 'magit-hunk-section-map)
+  ((keymap :initform 'magit-module-section-map)
(range  :initform nil)))
 
 (defclass magit-hunk-section (magit-section)



[nongnu] elpa/git-commit 91ef0822d3 04/18: magit-get-section: Compare constant values

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 91ef0822d330d51861e421a4fb2ffe55097c92a8
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-get-section: Compare constant values

Previously only `magit-section-ident' returned a constant value for
sections that need special handling, but we need to use that value
in `magit-get-section' as well.

This commit just implements the most straight forward fix.  The next
commit improves the `magit-section-ident-value', replacing the newly
added secondary function.
---
 lisp/magit-section.el | 37 -
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 526a4b2ab8..7b2fb4d702 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -401,23 +401,25 @@ never modify it.")
   "Return an unique identifier for SECTION.
 The return value has the form ((TYPE . VALUE)...)."
   (with-slots (type value parent) section
-(cons (cons type
-(cond ((eieio-object-p value)
-   (magit-section-ident-value value))
-  ((not (memq type '(unpulled unpushed))) value)
-  ((string-match-p "@{upstream}" value) value)
-  ;; Unfortunately Git chokes on "@{push}" when
-  ;; the value of `push.default' does not allow a
-  ;; 1:1 mapping.  Arbitrary commands may consult
-  ;; the section value so we cannot use "@{push}".
-  ;; But `unpushed' and `unpulled' sections should
-  ;; keep their identity when switching branches
-  ;; so we have to use another value here.
-  ((string-match-p "\\`\\.\\." value) "..@{push}")
-  (t "@{push}..")))
+(cons (cons type (magit-section-ident-value-1 value type))
   (and parent
(magit-section-ident parent)
 
+(defun magit-section-ident-value-1 (value type)
+  (cond ((eieio-object-p value)
+ (magit-section-ident-value value))
+((not (memq type '(unpulled unpushed))) value)
+((string-match-p "@{upstream}" value) value)
+;; Unfortunately Git chokes on "@{push}" when
+;; the value of `push.default' does not allow a
+;; 1:1 mapping.  Arbitrary commands may consult
+;; the section value so we cannot use "@{push}".
+;; But `unpushed' and `unpulled' sections should
+;; keep their identity when switching branches
+;; so we have to use another value here.
+((string-match-p "\\`\\.\\." value) "..@{push}")
+(t "@{push}..")))
+
 (cl-defgeneric magit-section-ident-value (value)
   "Return a constant representation of VALUE.
 VALUE is the value of a `magit-section' object.  If that is an
@@ -441,12 +443,13 @@ instead of in the one whose root `magit-root-section' is."
   (oref section type))
   (while (and ident
   (pcase-let* ((`(,type . ,value) (car ident))
-   (value (magit-section-ident-value value)))
+   (value (magit-section-ident-value-1 value 
type)))
 (setq section
   (cl-find-if (lambda (section)
 (and (eq (oref section type) type)
- (equal (magit-section-ident-value
- (oref section value))
+ (equal 
(magit-section-ident-value-1
+ (oref section value)
+ (oref section type))
 value)))
   (oref section children)
 (pop ident))



[nongnu] elpa/git-commit updated (b32521d543 -> f3afc117c2)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch elpa/git-commit.

  from  b32521d543 magit-ediff-read-files: Handle renames in one-file logs
   new  bc065246b4 Remove duplicated command magit-help
   new  94aca04dc8 magit-module-section: Use correct keymap
   new  70b34f08ab Increase use of section type, keymap and binding 
inheritance
   new  91ef0822d3 magit-get-section: Compare constant values
   new  8c53997121 magit-section-ident-value: Split up into more methods
   new  be371711f5 magit-section-at: New function
   new  4de514b84c magit-section-content-p: New function
   new  5da6122160 magit-section-mode-map: Add docstring
   new  73a2cbe61f magit-section-heading-map: New keymap
   new  949b4a47a4 magit-mouse-toggle-section: New command
   new  7d15b1a041 magit-diff--region-range: New function
   new  5641d3749c Completely rework magit-mode-menu
   new  8eb43f8b23 Store keymap detected based on name in section object
   new  0168be9366 Add basic context-menu
   new  b7294344e3 Add context-menu utilities
   new  95b432530a Do not set point when invoking context-menu
   new  38cb9372dc Add section-specific context-menus
   new  f3afc117c2 Bump dependencies on Melpa


Summary of changes:
 docs/magit-section.org  |  39 +++-
 docs/magit-section.texi |  40 +++-
 docs/magit.org  |  13 ++
 docs/magit.texi |  16 ++
 lisp/magit-base.el  |  23 ++-
 lisp/magit-bisect.el|   2 +-
 lisp/magit-diff.el  | 135 +-
 lisp/magit-git.el   |  10 +-
 lisp/magit-log.el   |  50 -
 lisp/magit-merge.el |   2 +-
 lisp/magit-mode.el  | 105 ++-
 lisp/magit-pkg.el   |   8 +-
 lisp/magit-refs.el  |  20 +-
 lisp/magit-section.el   | 483 +++-
 lisp/magit-stash.el |  12 +-
 lisp/magit-status.el|   7 +-
 lisp/magit-submodule.el |  18 +-
 lisp/magit-worktree.el  |   6 +-
 lisp/magit.el   |   8 +-
 19 files changed, 752 insertions(+), 245 deletions(-)



[nongnu] elpa/git-commit 73a2cbe61f 09/18: magit-section-heading-map: New keymap

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 73a2cbe61f9cac148237e8bd043edc5dfe577fd3
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-section-heading-map: New keymap
---
 lisp/magit-section.el | 33 -
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index b9721996c5..4e28ab0a5f 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -323,6 +323,13 @@ but that ship has sailed, thus this option."
 
 (defvar symbol-overlay-inhibit-map)
 
+(defvar magit-section-heading-map
+  (let ((map (make-sparse-keymap)))
+map)
+  "Keymap used in the heading line of all expandable sections.
+This keymap is used in addition to the section-specifi keymap,
+if any.")
+
 (defvar magit-section-mode-map
   (let ((map (make-keymap)))
 (suppress-keymap map t)
@@ -1132,6 +1139,7 @@ anything this time around.
  (put-text-property (point) next 'magit-section ,s)
  (when map
(put-text-property (point) next 'keymap map)))
+   (magit-section-maybe-add-heading-map ,s)
(goto-char next)
(if (eq ,s magit-root-section)
(let ((magit-section-cache-visibility nil))
@@ -1208,6 +1216,7 @@ is explicitly expanded."
(oset ,s washer
  (lambda ()
(funcall ,f)
+   (magit-section-maybe-remove-heading-map ,s)
(magit-section-maybe-remove-visibility-indicator ,s)))
  (funcall ,f)
 
@@ -1233,7 +1242,29 @@ is explicitly expanded."
   (oset 1st-header content (oref (car header-sections) start))
   (oset 1st-header end (oref (car (last header-sections)) end))
   (dolist (sub-header header-sections)
-(oset sub-header parent 1st-header)))
+(oset sub-header parent 1st-header))
+  (magit-section-maybe-add-heading-map 1st-header))
+
+(defun magit-section-maybe-add-heading-map (section)
+  (when (magit-section-content-p section)
+(let ((start (oref section start))
+  (map (oref section keymap)))
+  (when (symbolp map)
+(setq map (symbol-value map)))
+  (put-text-property
+   start
+   (save-excursion
+ (goto-char start)
+ (line-end-position))
+   'keymap (if map
+   (make-composed-keymap
+(list map magit-section-heading-map))
+ magit-section-heading-map)
+
+(defun magit-section-maybe-remove-heading-map (section)
+  (with-slots (start content end keymap) section
+(when (= content end)
+  (put-text-property start end 'keymap keymap
 
 (defun magit-insert-child-count (section)
   "Modify SECTION's heading to contain number of child sections.



[nongnu] elpa/git-commit 70b34f08ab 03/18: Increase use of section type, keymap and binding inheritance

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 70b34f08ab5dc8bb7a0fb71bbf5d8cab7f8a47c4
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Increase use of section type, keymap and binding inheritance
---
 lisp/magit-base.el   | 21 -
 lisp/magit-diff.el   | 15 +--
 lisp/magit-log.el| 16 
 lisp/magit-merge.el  |  2 +-
 lisp/magit-refs.el   |  4 ++--
 lisp/magit-stash.el  |  4 ++--
 lisp/magit-status.el |  2 +-
 7 files changed, 43 insertions(+), 21 deletions(-)

diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index 78c7ac8030..3ec5afd461 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -439,10 +439,13 @@ and delay of your graphical environment or operating 
system."
 
 ;;; Section Classes
 
-(defclass magit-commit-section (magit-section)
-  ())
+(defclass magit-commit-section (magit-section) ())
 
-(defclass magit-file-section (magit-section)
+(setf (alist-get 'commit magit--section-type-alist) 'magit-commit-section)
+
+(defclass magit-diff-section (magit-section) () :abstract t)
+
+(defclass magit-file-section (magit-diff-section)
   ((keymap :initform 'magit-file-section-map)
(source :initform nil)
(header :initform nil)))
@@ -451,7 +454,7 @@ and delay of your graphical environment or operating 
system."
   ((keymap :initform 'magit-module-section-map)
(range  :initform nil)))
 
-(defclass magit-hunk-section (magit-section)
+(defclass magit-hunk-section (magit-diff-section)
   ((keymap  :initform 'magit-hunk-section-map)
(refined :initform nil)
(combined:initform nil)
@@ -460,11 +463,19 @@ and delay of your graphical environment or operating 
system."
(to-range:initform nil)
(about   :initform nil)))
 
-(setf (alist-get 'commit magit--section-type-alist) 'magit-commit-section)
 (setf (alist-get 'file   magit--section-type-alist) 'magit-file-section)
 (setf (alist-get 'module magit--section-type-alist) 'magit-module-section)
 (setf (alist-get 'hunk   magit--section-type-alist) 'magit-hunk-section)
 
+(defclass magit-log-section (magit-section) () :abstract t)
+(defclass magit-unpulled-section (magit-log-section) ())
+(defclass magit-unpushed-section (magit-log-section) ())
+(defclass magit-unmerged-section (magit-log-section) ())
+
+(setf (alist-get 'unpulled magit--section-type-alist) 'magit-unpulled-section)
+(setf (alist-get 'unpushed magit--section-type-alist) 'magit-unpushed-section)
+(setf (alist-get 'unmerged magit--section-type-alist) 'magit-unmerged-section)
+
 ;;; User Input
 
 (defvar helm-completion-in-region-default-sort-fn)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index dd384e870c..7c78424bff 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1942,7 +1942,9 @@ Staging and applying changes is documented in info node
 (list 'unstaged magit-buffer-typearg)))
  (and magit-buffer-diff-files (cons "--" magit-buffer-diff-files
 
-(defvar magit-diff-section-base-map
+(define-obsolete-variable-alias 'magit-diff-section-base-map
+  'magit-diff-section-map "Magit-Section 3.4.0")
+(defvar magit-diff-section-map
   (let ((map (make-sparse-keymap)))
 (define-key map (kbd "C-j")'magit-diff-visit-worktree-file)
 (define-key map (kbd "C-") 'magit-diff-visit-worktree-file)
@@ -1961,7 +1963,10 @@ Staging and applying changes is documented in info node
 (define-key map (kbd "C-c C-t") 'magit-diff-trace-definition)
 (define-key map (kbd "C-c C-e") 'magit-diff-edit-hunk-commit)
 map)
-  "Parent of `magit-{hunk,file}-section-map'.")
+  "Keymap for diff sections.
+The classes `magit-file-section' and `magit-hunk-section' derive
+from the abstract `magit-diff-section' class.  Accordingly this
+keymap is the parent of their keymaps.")
 
 (defvar magit-file-section-map
   (let ((map (make-sparse-keymap)))
@@ -2814,9 +2819,8 @@ It the SECTION has a different type, then do nothing."
 (defvar magit-unstaged-section-map
   (let ((map (make-sparse-keymap)))
 (define-key map [remap magit-visit-thing]  'magit-diff-unstaged)
+(define-key map [remap magit-stage-file]   'magit-stage)
 (define-key map [remap magit-delete-thing] 'magit-discard)
-(define-key map "s" 'magit-stage)
-(define-key map "u" 'magit-unstage)
 map)
   "Keymap for the `unstaged' section.")
 
@@ -2833,10 +2837,9 @@ It the SECTION has a different type, then do nothing."
 (defvar magit-staged-section-map
   (let ((map (make-sparse-keymap)))
 (define-key map [remap magit-visit-thing]  'magit-diff-staged)
+(define-key map [remap magit-unstage-file] 'magit-unstage)
 (define-key map [remap magit-delete-thing] 'magit-discard)
 (define-key map [remap magit-revert-no-commit] 'magit-reverse)
-(define-key map "s" 'magit-stage)
-(define-key map "u" 'magit-unstage)
 map)
   "Keymap for the `staged' section.")
 
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 32b8e38d92..0558b681a4 100644
--- a/lisp/magit-log.el
+++ 

[nongnu] elpa/git-commit 0168be9366 14/18: Add basic context-menu

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 0168be93666c85caae888c01f91a73488eff1a5b
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Add basic context-menu
---
 docs/magit.org|  13 +++
 docs/magit.texi   |  16 
 lisp/magit-section.el | 101 ++
 3 files changed, 130 insertions(+)

diff --git a/docs/magit.org b/docs/magit.org
index 87e8ad5a36..1a4341faa2 100644
--- a/docs/magit.org
+++ b/docs/magit.org
@@ -368,6 +368,9 @@ In file visiting buffers ~C-c M-g~ brings up a similar menu 
featuring
 commands that act on just the visited file, see [[*Commands for Buffers
 Visiting Files]].
 
+Magit also provides a context menu and other mouse commands, see
+[[*Mouse Support]].
+
 It is not necessary that you do so now, but if you stick with Magit,
 then it is highly recommended that you read the next section too.
 
@@ -1783,6 +1786,16 @@ will also have to install the ~ido-completing-read+~ 
package and use
   for-each-ref~.  By default, refs are sorted alphabetically by their
   full name (e.g., "refs/heads/master").
 
+** Mouse Support
+
+Double clicking on a section heading toggles the visibility of its
+body, if any.  Likewise clicking in the left fringe toggles the
+visibility of the appropriate section.
+
+A context menu is provided but has to be enabled explicitly.  In Emacs
+28 and greater, enable the global mode ~context-menu-mode~.  If you use an
+older Emacs release, set ~magit-section-show-context-menu-for-emacs<28~.
+
 ** Running Git
 *** Viewing Git Output
 
diff --git a/docs/magit.texi b/docs/magit.texi
index 92e3199962..b4a505383d 100644
--- a/docs/magit.texi
+++ b/docs/magit.texi
@@ -104,6 +104,7 @@ Interface Concepts
 * Transient Commands::
 * Transient Arguments and Buffer Variables::
 * Completion, Confirmation and the Selection: Completion Confirmation and the 
Selection. 
+* Mouse Support::
 * Running Git::
 
 Modes and Buffers
@@ -702,6 +703,9 @@ non-Magit buffers.  The global binding is @code{C-x M-g}.
 In file visiting buffers @code{C-c M-g} brings up a similar menu featuring
 commands that act on just the visited file, see @ref{Commands for Buffers 
Visiting Files}.
 
+Magit also provides a context menu and other mouse commands, see
+@ref{Mouse Support}.
+
 It is not necessary that you do so now, but if you stick with Magit,
 then it is highly recommended that you read the next section too.
 
@@ -714,6 +718,7 @@ then it is highly recommended that you read the next 
section too.
 * Transient Commands::
 * Transient Arguments and Buffer Variables::
 * Completion, Confirmation and the Selection: Completion Confirmation and the 
Selection. 
+* Mouse Support::
 * Running Git::
 @end menu
 
@@ -2304,6 +2309,17 @@ values include any key accepted by the @code{--sort} 
flag of @code{git
 full name (e.g., "refs/heads/master").
 @end defopt
 
+@node Mouse Support
+@section Mouse Support
+
+Double clicking on a section heading toggles the visibility of its
+body, if any.  Likewise clicking in the left fringe toggles the
+visibility of the appropriate section.
+
+A context menu is provided but has to be enabled explicitly.  In Emacs
+28 and greater, enable the global mode @code{context-menu-mode}.  If you use an
+older Emacs release, set @code{magit-section-show-context-menu-for-emacs<28}.
+
 @node Running Git
 @section Running Git
 
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 4401280d44..7978d80954 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -248,6 +248,16 @@ but that ship has sailed, thus this option."
   :group 'magit-section
   :type 'boolean)
 
+(defcustom magit-section-show-context-menu-for-emacs<28 nil
+  "Whether `mouse-3' shows a context menu for Emacs < 28.
+
+This has to be set before loading `magit-section' or it has
+no effect.  This also has no effect for Emacs >= 28, where
+`context-menu-mode' should be enabled instead."
+  :package-version '(magit-section . "3.4.0")
+  :group 'magit-section
+  :type 'boolean)
+
 ;;; Faces
 
 (defgroup magit-section-faces nil
@@ -336,6 +346,17 @@ if any.")
 (defvar magit-section-mode-map
   (let ((map (make-keymap)))
 (suppress-keymap map t)
+(when (and magit-section-show-context-menu-for-emacs<28
+   (< emacs-major-version 28))
+  (define-key map [mouse-3] nil)
+  (define-key
+   map [down-mouse-3]
+   `( menu-item "" ,(make-sparse-keymap)
+  :filter ,(lambda (_)
+ (let ((menu (make-sparse-keymap)))
+   (context-menu-local menu last-input-event)
+   (magit-section-context-menu menu last-input-event)
+   menu)
 (define-key map [left-fringe mouse-1] 'magit-mouse-toggle-section)
 (define-key map [left-fringe mouse-2] 'magit-mouse-toggle-section)
 (define-key map (kbd "TAB") 'magit-section-toggle)
@@ -385,6 +406,8 @@ Magit-Section is documented in info node `(magit-section)'."
   'magit-section--highligh

[nongnu] elpa/git-commit 8c53997121 05/18: magit-section-ident-value: Split up into more methods

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 8c53997121ebd83ef19963df0032dbde70bb0be8
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-section-ident-value: Split up into more methods
---
 lisp/magit-log.el | 18 
 lisp/magit-section.el | 77 +--
 2 files changed, 55 insertions(+), 40 deletions(-)

diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 0558b681a4..a3fb5c28bb 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -1760,6 +1760,15 @@ keymap is the parent of their keymaps.")
 map)
   "Keymap for `unpulled' sections.")
 
+(cl-defmethod magit-section-ident-value ((section magit-unpulled-section))
+  "\"..@{push}\" cannot be used as the value because that is
+ambigious if `push.default' does not allow a 1:1 mapping, and
+many commands would fail because of that.  But here that does
+not matter and we need an unique value so we use that string
+in the pushremote case."
+  (let ((value (oref section value)))
+(if (equal value "..@{upstream}") value "..@{push}")))
+
 (magit-define-section-jumper magit-jump-to-unpulled-from-upstream
   "Unpulled from @{upstream}" unpulled "..@{upstream}")
 
@@ -1796,6 +1805,15 @@ keymap is the parent of their keymaps.")
 map)
   "Keymap for `unpushed' sections.")
 
+(cl-defmethod magit-section-ident-value ((section magit-unpushed-section))
+  "\"..@{push}\" cannot be used as the value because that is
+ambigious if `push.default' does not allow a 1:1 mapping, and
+many commands would fail because of that.  But here that does
+not matter and we need an unique value so we use that string
+in the pushremote case."
+  (let ((value (oref section value)))
+(if (equal value "@{upstream}..") value "@{push}..")))
+
 (magit-define-section-jumper magit-jump-to-unpushed-to-upstream
   "Unpushed to @{upstream}" unpushed "@{upstream}..")
 
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 7b2fb4d702..3b4511bcd3 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -400,37 +400,36 @@ never modify it.")
 (defun magit-section-ident (section)
   "Return an unique identifier for SECTION.
 The return value has the form ((TYPE . VALUE)...)."
-  (with-slots (type value parent) section
-(cons (cons type (magit-section-ident-value-1 value type))
-  (and parent
-   (magit-section-ident parent)
-
-(defun magit-section-ident-value-1 (value type)
-  (cond ((eieio-object-p value)
- (magit-section-ident-value value))
-((not (memq type '(unpulled unpushed))) value)
-((string-match-p "@{upstream}" value) value)
-;; Unfortunately Git chokes on "@{push}" when
-;; the value of `push.default' does not allow a
-;; 1:1 mapping.  Arbitrary commands may consult
-;; the section value so we cannot use "@{push}".
-;; But `unpushed' and `unpulled' sections should
-;; keep their identity when switching branches
-;; so we have to use another value here.
-((string-match-p "\\`\\.\\." value) "..@{push}")
-(t "@{push}..")))
-
-(cl-defgeneric magit-section-ident-value (value)
-  "Return a constant representation of VALUE.
-VALUE is the value of a `magit-section' object.  If that is an
-object itself, then that is not suitable to be used to identify
-the section because two objects may represent the same thing but
-not be equal.  If possible a method should be added for such
-objects, which returns a value that is equal.  Otherwise the
-catch-all method is used, which just returns the argument
-itself.")
-
-(cl-defmethod magit-section-ident-value (arg) arg)
+  (cons (cons (oref section type)
+  (magit-section-ident-value section))
+(when-let ((parent (oref section parent)))
+  (magit-section-ident parent
+
+(cl-defgeneric magit-section-ident-value (object)
+  "Return OBJECT's value, making it constant and unique if necessary.
+
+This is used to correlate different incarnations of the same
+section, see `magit-section-ident' and `magit-get-section'.
+
+Sections whose values that are not constant and/or unique should
+implement a method that return a value that can be used for this
+purpose.")
+
+(cl-defmethod magit-section-ident-value ((section magit-section))
+  "Return the value unless it is an object.
+
+Different object incarnations representing the same value then to
+not be equal, so call this generic function on the object itself
+to determine a constant value."
+  (let ((value (oref section value)))
+(if (eieio-object-p value)
+(magit-section-ident-value value)
+  value)))
+
+(cl-defmethod magit-section-ident-value ((object eieio-default-superclass))
+  "Simply return the object itself.  That likely isn't
+good enough, so you need to implement your own method."
+  object)
 
 (defun magit-get-section (ident &optional root)
   "Return the section identified by IDENT.
@@ -442,16 +441,14 @@ instead of in the one whose root `magit-root-secti

[nongnu] elpa/git-commit 4de514b84c 07/18: magit-section-content-p: New function

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 4de514b84cfe45d5847f2b26dae9600bcdfbf63e
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-section-content-p: New function
---
 docs/magit-section.org  |  4 +++
 docs/magit-section.texi |  4 +++
 lisp/magit-section.el   | 81 +
 3 files changed, 50 insertions(+), 39 deletions(-)

diff --git a/docs/magit-section.org b/docs/magit-section.org
index 292512887f..ce8d47b134 100644
--- a/docs/magit-section.org
+++ b/docs/magit-section.org
@@ -184,6 +184,10 @@ source for suitable examples before asking me for help.  
Thanks!
   Return the lineage of SECTION.
   The return value has the form ~(TYPE...)~.
 
+- Function: magit-section-content-p section ::
+
+  Return non-nil if SECTION has content or an unused washer function.
+
 * Matching Functions
 
 - Function: magit-section-match condition &optional (section 
(magit-current-section)) ::
diff --git a/docs/magit-section.texi b/docs/magit-section.texi
index 05d22b1f97..9fb8a09546 100644
--- a/docs/magit-section.texi
+++ b/docs/magit-section.texi
@@ -230,6 +230,10 @@ Return the lineage of SECTION@.
 The return value has the form @code{(TYPE...)}.
 @end defun
 
+@defun magit-section-content-p section
+Return non-nil if SECTION has content or an unused washer function.
+@end defun
+
 @node Matching Functions
 @chapter Matching Functions
 
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 89b75e4eb9..519550928d 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -722,6 +722,11 @@ hidden."
 (and (oref section content)
  (oref section hidden
 
+(defun magit-section-content-p (section)
+  "Return non-nil if SECTION has content or an unused washer function."
+  (with-slots (content end washer) section
+(and content (or (not (= content end)) washer
+
 (defun magit-section-invisible-p (section)
   "Return t if the SECTION's body is invisible.
 When the body of an ancestor of SECTION is collapsed then
@@ -1445,45 +1450,43 @@ invisible."
 (magit-section-cache-visibility section)))
 
 (defun magit-section-maybe-update-visibility-indicator (section)
-  (when magit-section-visibility-indicator
-(let ((beg (oref section start))
-  (cnt (oref section content))
-  (end (oref section end)))
-  (when (and cnt (or (not (= cnt end)) (oref section washer)))
-(let ((eoh (save-excursion
- (goto-char beg)
- (line-end-position
-  (cond
-   ((symbolp (car-safe magit-section-visibility-indicator))
-;; It would make more sense to put the overlay only on the
-;; location we actually don't put it on, but then inserting
-;; before that location (while taking care not to mess with
-;; the overlay) would cause the fringe bitmap to disappear
-;; (but not other effects of the overlay).
-(let ((ov (magit--overlay-at (1+ beg) 'magit-vis-indicator 
'fringe)))
-  (unless ov
-(setq ov (make-overlay (1+ beg) eoh))
-(overlay-put ov 'evaporate t)
-(overlay-put ov 'magit-vis-indicator 'fringe))
-  (overlay-put
-   ov 'before-string
-   (propertize "fringe" 'display
-   (list 'left-fringe
- (if (oref section hidden)
- (car magit-section-visibility-indicator)
-   (cdr magit-section-visibility-indicator))
- 'fringe)
-   ((stringp (car-safe magit-section-visibility-indicator))
-(let ((ov (magit--overlay-at (1- eoh) 'magit-vis-indicator 'eoh)))
-  (cond ((oref section hidden)
- (unless ov
-   (setq ov (make-overlay (1- eoh) eoh))
-   (overlay-put ov 'evaporate t)
-   (overlay-put ov 'magit-vis-indicator 'eoh))
- (overlay-put ov 'after-string
-  (car magit-section-visibility-indicator)))
-(ov
- (delete-overlay ov)))
+  (when (and magit-section-visibility-indicator
+ (magit-section-content-p section))
+(let* ((beg (oref section start))
+   (eoh (save-excursion
+  (goto-char beg)
+  (line-end-position
+  (cond
+   ((symbolp (car-safe magit-section-visibility-indicator))
+;; It would make more sense to put the overlay only on the
+;; location we actually don't put it on, but then inserting
+;; before that location (while taking care not to mess with
+;; the overlay) would cause the fringe bitmap to disappear
+;; (but not other effects of the overlay).
+(let ((ov (magit--overlay-at (1+ beg) 'magit-vis-indicator 'fringe)))
+  (unless ov

[nongnu] elpa/git-commit 5da6122160 08/18: magit-section-mode-map: Add docstring

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 5da612216043ba8fbb2767b19fc968ed319e2f5b
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-section-mode-map: Add docstring
---
 lisp/magit-section.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 519550928d..b9721996c5 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -344,7 +344,8 @@ but that ship has sailed, thus this option."
 (define-key map (kbd "M-2") 'magit-section-show-level-2-all)
 (define-key map (kbd "M-3") 'magit-section-show-level-3-all)
 (define-key map (kbd "M-4") 'magit-section-show-level-4-all)
-map))
+map)
+  "Parent keymap for all keymaps of modes derived from `magit-section-mode'.")
 
 (define-derived-mode magit-section-mode special-mode "Magit-Sections"
   "Parent major mode from which major modes with Magit-like sections inherit.



[nongnu] elpa/git-commit 38cb9372dc 17/18: Add section-specific context-menus

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 38cb9372dc51df4767b30181db93f51f7ac856ab
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Add section-specific context-menus
---
 lisp/magit-diff.el  | 59 -
 lisp/magit-log.el   | 18 +--
 lisp/magit-refs.el  | 20 +
 lisp/magit-stash.el | 12 +-
 lisp/magit-status.el|  7 +++---
 lisp/magit-submodule.el | 18 ++-
 lisp/magit-worktree.el  |  6 +++--
 7 files changed, 97 insertions(+), 43 deletions(-)

diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 793a760527..71532cafd8 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -64,6 +64,14 @@
 (declare-function forge--pullreq-ref "forge-pullreq" (pullreq))
 ;; For `magit-diff-wash-diff'
 (declare-function ansi-color-apply-on-region "ansi-color")
+;; For keymaps and menus
+(declare-function magit-apply "magit-apply" (&rest args))
+(declare-function magit-stage "magit-apply" (&optional indent))
+(declare-function magit-unstage "magit-apply" ())
+(declare-function magit-discard "magit-apply" ())
+(declare-function magit-reverse "magit-apply" (&rest args))
+(declare-function magit-file-rename "magit-files" (file newname))
+(declare-function magit-file-untrack "magit-files" (files &optional force))
 
 (eval-when-compile
   (cl-pushnew 'orig-rev eieio--known-slot-names)
@@ -1947,21 +1955,41 @@ Staging and applying changes is documented in info node
 (list 'unstaged magit-buffer-typearg)))
  (and magit-buffer-diff-files (cons "--" magit-buffer-diff-files
 
+(cl-defmethod magit-menu-common-value ((_section magit-diff-section))
+  (magit-diff-scope))
+
 (define-obsolete-variable-alias 'magit-diff-section-base-map
   'magit-diff-section-map "Magit-Section 3.4.0")
 (defvar magit-diff-section-map
   (let ((map (make-sparse-keymap)))
+(magit-menu-set map [magit-cherry-apply]
+  #'magit-apply "Apply %x"
+  '(:enable (not (memq (magit-diff-type) '(unstaged staged)
+(magit-menu-set map [magit-stage-file]
+  #'magit-stage "Stage %x"
+  '(:enable (eq (magit-diff-type) 'unstaged)))
+(magit-menu-set map [magit-unstage-file]
+  #'magit-unstage "Unstage %x"
+  '(:enable (eq (magit-diff-type) 'staged)))
+(magit-menu-set map [magit-delete-thing]
+  #'magit-discard "Discard %x"
+  '(:enable (not (memq (magit-diff-type) '(committed undefined)
+(magit-menu-set map [magit-revert-no-commit]
+  #'magit-reverse "Reverse %x"
+  '(:enable (not (memq (magit-diff-type) '(untracked unstaged)
+(magit-menu-set map [magit-visit-thing]
+  #'magit-diff-visit-file "Visit file")
+(magit-menu-set map [magit-file-untrack]
+  #'magit-file-untrack "Untrack %x"
+  '(:enable (memq (magit-diff-scope) '(file files
+(magit-menu-set map [magit-file-rename]
+  #'magit-file-rename "Rename file"
+  '(:enable (eq (magit-diff-scope) 'file)))
 (define-key map (kbd "C-j")'magit-diff-visit-worktree-file)
 (define-key map (kbd "C-") 'magit-diff-visit-worktree-file)
 (define-key map (kbd "C-x 4 ") 'magit-diff-visit-file-other-window)
 (define-key map (kbd "C-x 5 ") 'magit-diff-visit-file-other-frame)
-(define-key map [remap magit-visit-thing]  'magit-diff-visit-file)
-(define-key map [remap magit-delete-thing] 'magit-discard)
-(define-key map [remap magit-revert-no-commit] 'magit-reverse)
-(define-key map "a" 'magit-apply)
-(define-key map "s" 'magit-stage)
-(define-key map "u" 'magit-unstage)
-(define-key map "&" 'magit-do-async-shell-command)
+(define-key map "&" 'magit-do-async-shell-command)
 (define-key map "C" 'magit-commit-add-log)
 (define-key map (kbd "C-x a")   'magit-add-change-log-entry)
 (define-key map (kbd "C-x 4 a") 'magit-add-change-log-entry-other-window)
@@ -2519,7 +2547,8 @@ or a ref which is not a branch, then it inserts nothing."
 
 (defvar magit-commit-message-section-map
   (let ((map (make-sparse-keymap)))
-(define-key map [remap magit-visit-thing] 'magit-show-commit)
+(magit-menu-set map [magit-visit-thing] #'magit-show-commit "Visit %t"
+  '(:enable (magit-thing-at-point 'git-revision t)))
 map)
   "Keymap for `commit-message' sections.")
 
@@ -2823,9 +2852,9 @@ It the SECTION has a different type, then do nothing."
 
 (defvar magit-unstaged-section-map
   (let ((map (make-sparse-keymap)))
-(define-key map [remap magit-visit-thing]  'magit-diff-unstaged)
-(define-key map [remap magit-stage-file]   'magit-stage)
-(define-key map [remap magit-delete-thing] 'magit-discard)
+(magit-menu-set map [magit-visit-thing]  #'magit-diff-unstaged "Visit 
diff")
+(magit-menu-set map [magit-stage-file]   #'magit-stage "Stage all")
+(magit-menu-set map [magit-delete-thing] #'magit-discard   "Discard 
all")
 map)
   "Keymap for the `unstaged' section.")
 

[nongnu] elpa/git-commit be371711f5 06/18: magit-section-at: New function

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit be371711f521b95321e34ac59c9f04e86989d069
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-section-at: New function
---
 docs/magit-section.org  |  4 
 docs/magit-section.texi |  5 +
 lisp/magit-bisect.el|  2 +-
 lisp/magit-section.el   | 16 ++--
 4 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/docs/magit-section.org b/docs/magit-section.org
index deb8769f2f..292512887f 100644
--- a/docs/magit-section.org
+++ b/docs/magit-section.org
@@ -151,6 +151,10 @@ source for suitable examples before asking me for help.  
Thanks!
 
   Return the section at point.
 
+- Function magit-section-at &optional position ::
+
+  Return the section at POSITION, defaulting to point.
+
 - Function: magit-section-ident section ::
 
   Return an unique identifier for SECTION. The return value has the
diff --git a/docs/magit-section.texi b/docs/magit-section.texi
index ed865d841f..05d22b1f97 100644
--- a/docs/magit-section.texi
+++ b/docs/magit-section.texi
@@ -196,6 +196,11 @@ buffer is reached.  FUNCTION has to move point forward or 
return
 Return the section at point.
 @end defun
 
+@table @asis
+@item Function magit-section-at &optional position
+Return the section at POSITION, defaulting to point.
+@end table
+
 @defun magit-section-ident section
 Return an unique identifier for SECTION@. The return value has the
 form @code{((TYPE . VALUE)...)}.
diff --git a/lisp/magit-bisect.el b/lisp/magit-bisect.el
index 63de453204..0ddfd39acf 100644
--- a/lisp/magit-bisect.el
+++ b/lisp/magit-bisect.el
@@ -224,7 +224,7 @@ bisect run'."
  (magit-process-sentinel process event)
  (when (buffer-live-p (process-buffer process))
(with-current-buffer (process-buffer process)
- (when-let ((section (get-text-property (point) 'magit-section))
+ (when-let ((section (magit-section-at))
 (output (buffer-substring-no-properties
  (oref section content)
  (oref section end
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 3b4511bcd3..89b75e4eb9 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -395,7 +395,11 @@ never modify it.")
 
 (defun magit-current-section ()
   "Return the section at point."
-  (or (get-text-property (point) 'magit-section) magit-root-section))
+  (or (magit-section-at) magit-root-section))
+
+(defun magit-section-at (&optional position)
+  "Return the section at POSITION, defaulting to point."
+  (get-text-property (or position (point)) 'magit-section))
 
 (defun magit-section-ident (section)
   "Return an unique identifier for SECTION.
@@ -1118,7 +1122,7 @@ anything this time around.
  (let ((next (or (next-single-property-change
   (point) 'magit-section)
  end)))
-   (unless (get-text-property (point) 'magit-section)
+   (unless (magit-section-at)
  (put-text-property (point) next 'magit-section ,s)
  (when map
(put-text-property (point) next 'keymap map)))
@@ -1625,8 +1629,8 @@ forms CONDITION can take."
   (when (region-active-p)
 (let* ((rbeg (region-beginning))
(rend (region-end))
-   (sbeg (get-text-property rbeg 'magit-section))
-   (send (get-text-property rend 'magit-section)))
+   (sbeg (magit-section-at rbeg))
+   (send (magit-section-at rend)))
   (when (and send
  (not (eq send magit-root-section))
  (not (and multiple (eq send sbeg
@@ -1663,8 +1667,8 @@ current section."
 If optional SECTION is nil, use the current section."
   (and (region-active-p)
(or section (setq section (magit-current-section)))
-   (let ((beg (get-text-property (region-beginning) 'magit-section)))
- (and (eq beg (get-text-property   (region-end) 'magit-section))
+   (let ((beg (magit-section-at (region-beginning
+ (and (eq beg (magit-section-at (region-end)))
   (eq beg section)))
(not (or (magit-section-position-in-heading-p section 
(region-beginning))
 (magit-section-position-in-heading-p section (region-end



[nongnu] elpa/git-commit 5641d3749c 12/18: Completely rework magit-mode-menu

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 5641d3749c31201425d5c3a8b425316a589aa3c2
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Completely rework magit-mode-menu
---
 lisp/magit-mode.el | 91 ++
 1 file changed, 50 insertions(+), 41 deletions(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index c1dd4e7b73..54c054ec16 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -462,53 +462,62 @@ which visits the thing at point using `browse-url'."
 
 (easy-menu-define magit-mode-menu magit-mode-map
   "Magit menu"
+  ;; Similar to `magit-dispatch' but exclude:
+  ;; - commands that are available from context menus:
+  ;;   apply, reverse, discard, stage, unstage,
+  ;;   cherry-pick, revert, reset,
+  ;;   describe-section
+  ;; - commands that are available from submenus:
+  ;;   git-command, ediff-dwim
+  ;; - and: refresh-all, status-jump, status-quick.
   '("Magit"
-["Refresh" magit-refresh t]
-["Refresh all" magit-refresh-all t]
+"---" "Inspect"
+[" Bisect..." magit-bisect t]
+[" Cherries..."   magit-cherry t]
+[" Diff..."   magit-diff t]
+[" Ediff..."  magit-ediff t]
+[" Log..."magit-log t]
+[" References..." magit-show-refs t]
+"---" "Manipulate"
+[" Commit..." magit-commit t]
+[" Stash..."  magit-stash t]
+[" Tag..."magit-tag t]
 "---"
-["Stage" magit-stage t]
-["Stage modified" magit-stage-modified t]
-["Unstage" magit-unstage t]
-["Reset index" magit-reset-index t]
-["Commit" magit-commit t]
-["Add log entry" magit-commit-add-log t]
-["Tag" magit-tag-create t]
+[" Branch..." magit-branch t]
+[" Remote..." magit-remote t]
 "---"
-["Diff working tree" magit-diff-working-tree t]
-["Diff" magit-diff t]
-("Log"
- ["Log" magit-log-other t]
- ["Reflog" magit-reflog-other t]
- ["Extended..." magit-log t])
+[" Merge..."  magit-merge t]
+[" Rebase..." magit-rebase t]
+"---" "Transfer"
+[" Fetch..."  magit-fetch t]
+[" Pull..."   magit-pull t]
+[" Push..."   magit-push t]
+"---" "Setup"
+[" Clone..."  magit-clone t]
+[" Ignore..." magit-gitignore t]
+[" Init..."   magit-init t]
 "---"
-["Cherry pick" magit-cherry-pick t]
-["Revert commit" magit-revert t]
+("Advanced"
+ ["Run..."magit-run t]
+ "---"
+ ["Apply patches..."  magit-am t]
+ ["Format patches..." magit-patch t]
+ "---"
+ ["Note..."   magit-notes t]
+ "---"
+ ["Submodule..."  magit-submodule t]
+ ["Subtree..."magit-subtree t]
+ ["Worktree..."   magit-worktree t])
 "---"
-["Ignore at toplevel" magit-gitignore-in-topdir t]
-["Ignore in subdirectory" magit-gitignore-in-subdir t]
-["Discard" magit-discard t]
-["Reset head and index" magit-reset-mixed t]
-["Stash" magit-stash-both t]
-["Snapshot" magit-snapshot-both t]
+["Show command dispatcher..." magit-dispatch t]
+["Show manual"magit-help t]
+["Show another buffer"magit-display-repository-buffer t]
 "---"
-["Branch..." magit-checkout t]
-["Merge" magit-merge t]
-["Ediff resolve" magit-ediff-resolve t]
-["Rebase..." magit-rebase t]
-"---"
-["Push" magit-push t]
-["Pull" magit-pull-branch t]
-["Remote update" magit-fetch-all t]
-("Submodule"
- ["Submodule update" magit-submodule-update t]
- ["Submodule update and init" magit-submodule-setup t]
- ["Submodule init" magit-submodule-init t]
- ["Submodule sync" magit-submodule-sync t])
-"---"
-("Extensions")
-"---"
-["Display Git output" magit-process-buffer t]
-["Quit Magit" magit-mode-bury-buffer t]))
+("Change buffer arguments"
+ ["Diff arguments"magit-diff-refresh t]
+ ["Log arguments" magit-log-refresh t])
+["Refresh buffer" magit-refresh t]
+["Bury buffer"magit-mode-bury-buffer t]))
 
 ;;; Mode
 



[nongnu] elpa/git-commit 7d15b1a041 11/18: magit-diff--region-range: New function

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 7d15b1a0410a435010fa200b66bae46fb89b05b2
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-diff--region-range: New function
---
 lisp/magit-diff.el | 57 +-
 1 file changed, 31 insertions(+), 26 deletions(-)

diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 7c78424bff..d3d1593ac7 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1117,37 +1117,42 @@ If no DWIM context is found, nil is returned."
 ((string-match "\\.\\."range) (replace-match "..." nil nil range))
 (t range)))
 
+(defun magit-diff--region-range (&optional interactive mbase)
+  (when-let ((commits (magit-region-values '(commit branch) t)))
+(let ((revA (car (last commits)))
+  (revB (car commits)))
+  (when interactive
+(deactivate-mark))
+  (if mbase
+  (let ((base (magit-git-string "merge-base" revA revB)))
+(cond
+ ((string= (magit-rev-parse revA) base)
+  (format "%s..%s" revA revB))
+ ((string= (magit-rev-parse revB) base)
+  (format "%s..%s" revB revA))
+ (interactive
+  (let ((main (magit-completing-read "View changes along"
+ (list revA revB)
+ nil t nil nil revB)))
+(format "%s...%s"
+(if (string= main revB) revA revB) main)))
+ (t "%s...%s" revA revB)))
+(format "%s..%s" revA revB)
+
 (defun magit-diff-read-range-or-commit (prompt &optional secondary-default 
mbase)
   "Read range or revision with special diff range treatment.
 If MBASE is non-nil, prompt for which rev to place at the end of
 a \"revA...revB\" range.  Otherwise, always construct
 \"revA..revB\" range."
-  (--if-let (magit-region-values '(commit branch) t)
-  (let ((revA (car (last it)))
-(revB (car it)))
-(deactivate-mark)
-(if mbase
-(let ((base (magit-git-string "merge-base" revA revB)))
-  (cond
-   ((string= (magit-rev-parse revA) base)
-(format "%s..%s" revA revB))
-   ((string= (magit-rev-parse revB) base)
-(format "%s..%s" revB revA))
-   (t
-(let ((main (magit-completing-read "View changes along"
-   (list revA revB)
-   nil t nil nil revB)))
-  (format "%s...%s"
-  (if (string= main revB) revA revB) main)
-  (format "%s..%s" revA revB)))
-(magit-read-range prompt
-  (or (pcase (magit-diff--dwim)
-(`(commit . ,value)
- (format "%s^..%s" value value))
-((and range (pred stringp))
- range))
-  secondary-default
-  (magit-get-current-branch)
+  (or (magit-diff--region-range t mbase)
+  (magit-read-range prompt
+(or (pcase (magit-diff--dwim)
+  (`(commit . ,value)
+   (format "%s^..%s" value value))
+  ((and range (pred stringp))
+   range))
+secondary-default
+(magit-get-current-branch)
 
 ;;;###autoload
 (defun magit-diff-range (rev-or-range &optional args files)



[nongnu] elpa/git-commit 95b432530a 16/18: Do not set point when invoking context-menu

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 95b432530a6b131e63bec7411ee768f1dee9f629
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Do not set point when invoking context-menu
---
 docs/magit-section.org  | 33 -
 docs/magit-section.texi | 33 -
 lisp/magit-diff.el  |  8 ++--
 lisp/magit-git.el   | 10 ++---
 lisp/magit-mode.el  | 11 +++---
 lisp/magit-section.el   | 98 +
 6 files changed, 167 insertions(+), 26 deletions(-)

diff --git a/docs/magit-section.org b/docs/magit-section.org
index ce8d47b134..20397c3883 100644
--- a/docs/magit-section.org
+++ b/docs/magit-section.org
@@ -149,11 +149,15 @@ source for suitable examples before asking me for help.  
Thanks!
 
 - Function: magit-current-section ::
 
-  Return the section at point.
+  Return the section at point or where the context menu was invoked.
+  When using the context menu, return the section that the user
+  clicked on, provided the current buffer is the buffer in which
+  the click occured.  Otherwise return the section at point.
 
 - Function magit-section-at &optional position ::
 
-  Return the section at POSITION, defaulting to point.
+  Return the section at POSITION, defaulting to point.  Default to
+  point even when the context menu is used.
 
 - Function: magit-section-ident section ::
 
@@ -188,6 +192,31 @@ source for suitable examples before asking me for help.  
Thanks!
 
   Return non-nil if SECTION has content or an unused washer function.
 
+The next two functions are replacements for the Emacs functions that
+have the same name except for the ~magit-~ prefix.  Like
+~magit-current-section~ they do not act on point, the cursors position,
+but on the position where the user clicked to invoke the context menu.
+
+If your package provides a context menu and some of its commands act
+on the "thing at point", even if just as a default, then use the
+prefixed functions to teach them to instead use the click location
+when appropriate.
+
+- Function magit-point ::
+
+  Return point or the position where the context menu was invoked.
+  When using the context menu, return the position the user clicked
+  on, provided the current buffer is the buffer in which the click
+  occured.  Otherwise return the same value as ~point~.
+
+- Function magit-thing-at-point thing &optional no-properties ::
+
+  Return the THING at point or where the context menu was invoked.
+  When using the context menu, return the thing the user clicked
+  on, provided the current buffer is the buffer in which the click
+  occured.  Otherwise return the same value as ~thing-at-point~.
+  For the meaning of THING and NO-PROPERTIES see that function.
+
 * Matching Functions
 
 - Function: magit-section-match condition &optional (section 
(magit-current-section)) ::
diff --git a/docs/magit-section.texi b/docs/magit-section.texi
index 9fb8a09546..41fe361d97 100644
--- a/docs/magit-section.texi
+++ b/docs/magit-section.texi
@@ -193,12 +193,16 @@ buffer is reached.  FUNCTION has to move point forward or 
return
 @chapter Core Functions
 
 @defun magit-current-section
-Return the section at point.
+Return the section at point or where the context menu was invoked.
+When using the context menu, return the section that the user
+clicked on, provided the current buffer is the buffer in which
+the click occured.  Otherwise return the section at point.
 @end defun
 
 @table @asis
 @item Function magit-section-at &optional position
-Return the section at POSITION, defaulting to point.
+Return the section at POSITION, defaulting to point.  Default to
+point even when the context menu is used.
 @end table
 
 @defun magit-section-ident section
@@ -234,6 +238,31 @@ The return value has the form @code{(TYPE...)}.
 Return non-nil if SECTION has content or an unused washer function.
 @end defun
 
+The next two functions are replacements for the Emacs functions that
+have the same name except for the @code{magit-} prefix.  Like
+@code{magit-current-section} they do not act on point, the cursors position,
+but on the position where the user clicked to invoke the context menu.
+
+If your package provides a context menu and some of its commands act
+on the "thing at point", even if just as a default, then use the
+prefixed functions to teach them to instead use the click location
+when appropriate.
+
+@table @asis
+@item Function magit-point
+Return point or the position where the context menu was invoked.
+When using the context menu, return the position the user clicked
+on, provided the current buffer is the buffer in which the click
+occured.  Otherwise return the same value as @code{point}.
+
+@item Function magit-thing-at-point thing &optional no-properties
+Return the THING at point or where the context menu was invoked.
+When using the context menu, return the thing the user clicked
+on, provided the current buffer is the buffer in which the click
+occured.  Otherwise return the same value as @code

[nongnu] elpa/git-commit 8eb43f8b23 13/18: Store keymap detected based on name in section object

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 8eb43f8b2373f78d5d07755e52f60fa269c2f2b7
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Store keymap detected based on name in section object
---
 lisp/magit-section.el | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 0f682fd675..4401280d44 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -305,7 +305,7 @@ but that ship has sailed, thus this option."
 (defvar magit--section-type-alist nil)
 
 (defclass magit-section ()
-  ((keymap   :initform nil :allocation :class)
+  ((keymap   :initform nil)
(type :initform nil :initarg :type)
(value:initform nil :initarg :value)
(start:initform nil :initarg :start)
@@ -1142,14 +1142,16 @@ anything this time around.
(magit-insert-child-count ,s)
(set-marker-insertion-type (oref ,s start) t)
(let* ((end (oset ,s end (point-marker)))
-  (class-map (oref-default ,s keymap))
+  (class-map (oref ,s keymap))
   (magit-map (intern (format "magit-%s-section-map"
  (oref ,s type
   (forge-map (intern (format "forge-%s-section-map"
  (oref ,s type
-  (map (or (and class-map  (symbol-value class-map))
-   (and (boundp magit-map) (symbol-value magit-map))
-   (and (boundp forge-map) (symbol-value forge-map)
+  (map (and class-map (symbol-value class-map
+ (unless map
+   (setq map (or (and (boundp magit-map) (symbol-value magit-map))
+ (and (boundp forge-map) (symbol-value 
forge-map
+   (oset ,s keymap map))
  (save-excursion
(goto-char (oref ,s start))
(while (< (point) end)



[nongnu] elpa/git-commit 949b4a47a4 10/18: magit-mouse-toggle-section: New command

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit 949b4a47a4351e22c4faa4bdb5ced4f5cdd03a35
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-mouse-toggle-section: New command
---
 lisp/magit-section.el | 21 +
 1 file changed, 21 insertions(+)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 4e28ab0a5f..0f682fd675 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -325,6 +325,9 @@ but that ship has sailed, thus this option."
 
 (defvar magit-section-heading-map
   (let ((map (make-sparse-keymap)))
+(define-key map [double-down-mouse-1] 'ignore)
+(define-key map [double-mouse-1] 'magit-mouse-toggle-section)
+(define-key map [double-mouse-2] 'magit-mouse-toggle-section)
 map)
   "Keymap used in the heading line of all expandable sections.
 This keymap is used in addition to the section-specifi keymap,
@@ -333,6 +336,8 @@ if any.")
 (defvar magit-section-mode-map
   (let ((map (make-keymap)))
 (suppress-keymap map t)
+(define-key map [left-fringe mouse-1] 'magit-mouse-toggle-section)
+(define-key map [left-fringe mouse-2] 'magit-mouse-toggle-section)
 (define-key map (kbd "TAB") 'magit-section-toggle)
 (define-key map [C-tab] 'magit-section-cycle)
 (define-key map [M-tab] 'magit-section-cycle)
@@ -802,6 +807,22 @@ Sections at higher levels are hidden."
   (interactive)
   (magit-section-show-level -4))
 
+(defun magit-mouse-toggle-section (event)
+  "Toggle visibility of the clicked section.
+Clicks outside either the section heading or the left fringe are
+silently ignored."
+  (interactive "e")
+  (let* ((pos (event-start event))
+ (section (magit-section-at (posn-point pos
+(if (eq (posn-area pos) 'left-fringe)
+(when section
+  (while (not (magit-section-content-p section))
+(setq section (oref section parent)))
+  (unless (eq section magit-root-section)
+(goto-char (oref section start))
+(magit-section-toggle section)))
+  (magit-section-toggle section
+
  Auxiliary
 
 (defun magit-describe-section-briefly (section &optional ident)



[nongnu] elpa/git-commit bc065246b4 01/18: Remove duplicated command magit-help

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit bc065246b48a0e966451bb13954497c36f2d5e96
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Remove duplicated command magit-help

Turns out I twice realized that it would make sense to provide a
command that shows Magit's manual but picked a different name and
added the binding in a different place.
---
 lisp/magit-mode.el | 3 ++-
 lisp/magit.el  | 8 +---
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 5b08d9d8bf..c1dd4e7b73 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -449,7 +449,8 @@ which visits the thing at point using `browse-url'."
   (interactive)
   (user-error "There is no thing at point that could be browsed"))
 
-(defun magit-help ()
+;;;###autoload
+(defun magit-info ()
   "Visit the Magit manual."
   (interactive)
   (info "magit"))
diff --git a/lisp/magit.el b/lisp/magit.el
index e6696d09e2..442aac1b11 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -315,7 +315,7 @@ Also see info node `(magit)Commands for Buffers Visiting 
Files'."
 ("F" "Pull"   magit-pull)
 ;; g  ↓
 ;; G→ magit-refresh-all
-("h" "Help"   magit-help)
+("h" "Help"   magit-info)
 ("H" "Section info"   magit-describe-section :if-derived magit-mode)]
[("i" "Ignore" magit-gitignore)
 ("I" "Init"   magit-init)
@@ -373,12 +373,6 @@ Also see info node `(magit)Commands for Buffers Visiting 
Files'."
[("C-x m""show all key bindings"describe-mode)
 ("C-x i""show Info manual" magit-info)]])
 
-;;;###autoload
-(defun magit-info ()
-  "Show Magit's Info manual."
-  (interactive)
-  (info "magit"))
-
 ;;; Git Popup
 
 (defcustom magit-shell-command-verbose-prompt t



[nongnu] elpa/git-commit b7294344e3 15/18: Add context-menu utilities

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit b7294344e33e029d4ae03eaf670c609c4cd87c65
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Add context-menu utilities
---
 lisp/magit-section.el | 56 ++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 7978d80954..9a2b91e2f2 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -505,6 +505,9 @@ The return value has the form (TYPE...)."
 
 ;;; Menu
 
+(defvar magit-menu-common-value nil "See function `magit-menu-common-value'.")
+(defvar magit-menu--desc-values nil "For internal use only.")
+
 (defun magit-section-context-menu (menu click)
   "Populate MENU with Magit-Section commands at CLICK."
   (mouse-set-point click)
@@ -533,6 +536,8 @@ The return value has the form (TYPE...)."
   (define-key-after menu [separator-magit-2] menu-bar-separator)
   (when (symbolp map)
 (setq map (symbol-value map)))
+  (setq magit-menu-common-value (magit-menu-common-value section))
+  (setq magit-menu--desc-values (magit-menu--desc-values section))
   (map-keymap (lambda (key binding)
 (when (consp binding)
   (define-key-after menu (vector key)
@@ -549,7 +554,11 @@ KEYMAP, or if optional AFTER is non-nil, then after that.
 Because it is so common, and would otherwise result in overlong
 lines or else unsightly line wrapping, a definition [remap CMD]
 can be written as just [CMD].  As a result KEY might have to be
-a string when otherwise a vector would have worked."
+a string when otherwise a vector would have worked.
+
+If DESC is a string that contains a support %-spec, substitute
+the expression (magit-menu-format-desc DESC) for that.  See
+`magit-menu-format-desc'."
   (declare (indent defun))
   (when (vectorp key)
 ;; Expand the short-hand.
@@ -570,10 +579,55 @@ a string when otherwise a vector would have worked."
 (unless (symbolp def)
   (error "When KEY is a remapping, then DEF must be a symbol: %s" def))
 (setq key (vector def)))
+  (when (and (stringp desc) (string-match-p "%[tTvsmMx]" desc))
+(setq desc (list 'magit-menu-format-desc desc)))
   (define-key-after keymap key
 `(menu-item ,desc ,def ,@props)
 after))
 
+(defvar magit--plural-append-es '(branch))
+
+(cl-defgeneric magit-menu-common-value (_section)
+  "Return some value to be used by multiple menu items.
+This function is called by `magit-section-context-menu', which
+stores the value in `magit-menu-common-value'.  Individual menu
+items can use it, e.g., in the expression used to set their
+description."
+  nil)
+
+(defun magit-menu--desc-values (section)
+  (let ((type (oref section type))
+(value (oref section value))
+(multiple (magit-region-sections nil t)))
+(list type
+  value
+  (format "%s %s" type value)
+  (and multiple (length multiple))
+  (if (memq type magit--plural-append-es) "es" "s"
+
+(defun magit-menu-format-desc (format)
+  "Format a string based on FORMAT and menu section or selection.
+The following %-specs are allowed:
+%t means \"TYPE\".
+%T means \"TYPE\", or \"TYPEs\" if multiple sections are selected.
+%v means \"VALUE\".
+%s means \"TYPE VALUE\".
+%m means \"TYPE VALUE\", or \"COUNT TYPEs\" if multiple sections
+   are selected.
+%M means \"VALUE\", or \"COUNT TYPEs\" if multiple sections are
+   selected.
+%x means the value of `magit-menu-common-value'."
+  (pcase-let* ((`(,type ,value ,single ,count ,suffix) magit-menu--desc-values)
+   (multiple (and count (format "%s %s%s" count type suffix
+(format-spec format
+ `((?t . ,type)
+   (?T . ,(format "%s%s" type (if count suffix "")))
+   (?v . ,value)
+   (?s . ,single)
+   (?m . ,(or multiple single))
+   (?M . ,(or multiple value))
+   (?x . ,(format "%s" magit-menu-common-value))
+
 (advice-add 'context-menu-region :around
 (lambda (fn menu click)
   "Disable in `magit-section-mode' buffers."



[nongnu] elpa/git-commit f3afc117c2 18/18: Bump dependencies on Melpa

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit f3afc117c236972901dc46717497b87004a23bbb
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Bump dependencies on Melpa
---
 lisp/magit-pkg.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/magit-pkg.el b/lisp/magit-pkg.el
index 5a69c68784..8cf3f5a33c 100644
--- a/lisp/magit-pkg.el
+++ b/lisp/magit-pkg.el
@@ -2,9 +2,9 @@
   "A Git porcelain inside Emacs."
   '((emacs "25.1")
 (dash "20210826")
-(git-commit "20211004")
-(magit-section "20211004")
-(transient "20210920")
-(with-editor "20211001"))
+    (git-commit "20220222")
+(magit-section "20220325")
+(transient "20220325")
+(with-editor "20220318"))
   :homepage "https://magit.vc";
   :keywords '("git" "tools" "vc"))



[nongnu] elpa/magit updated (b32521d543 -> f3afc117c2)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  b32521d543 magit-ediff-read-files: Handle renames in one-file logs
  adds  bc065246b4 Remove duplicated command magit-help
  adds  94aca04dc8 magit-module-section: Use correct keymap
  adds  70b34f08ab Increase use of section type, keymap and binding 
inheritance
  adds  91ef0822d3 magit-get-section: Compare constant values
  adds  8c53997121 magit-section-ident-value: Split up into more methods
  adds  be371711f5 magit-section-at: New function
  adds  4de514b84c magit-section-content-p: New function
  adds  5da6122160 magit-section-mode-map: Add docstring
  adds  73a2cbe61f magit-section-heading-map: New keymap
  adds  949b4a47a4 magit-mouse-toggle-section: New command
  adds  7d15b1a041 magit-diff--region-range: New function
  adds  5641d3749c Completely rework magit-mode-menu
  adds  8eb43f8b23 Store keymap detected based on name in section object
  adds  0168be9366 Add basic context-menu
  adds  b7294344e3 Add context-menu utilities
  adds  95b432530a Do not set point when invoking context-menu
  adds  38cb9372dc Add section-specific context-menus
  adds  f3afc117c2 Bump dependencies on Melpa

No new revisions were added by this update.

Summary of changes:
 docs/magit-section.org  |  39 +++-
 docs/magit-section.texi |  40 +++-
 docs/magit.org  |  13 ++
 docs/magit.texi |  16 ++
 lisp/magit-base.el  |  23 ++-
 lisp/magit-bisect.el|   2 +-
 lisp/magit-diff.el  | 135 +-
 lisp/magit-git.el   |  10 +-
 lisp/magit-log.el   |  50 -
 lisp/magit-merge.el |   2 +-
 lisp/magit-mode.el  | 105 ++-
 lisp/magit-pkg.el   |   8 +-
 lisp/magit-refs.el  |  20 +-
 lisp/magit-section.el   | 483 +++-
 lisp/magit-stash.el |  12 +-
 lisp/magit-status.el|   7 +-
 lisp/magit-submodule.el |  18 +-
 lisp/magit-worktree.el  |   6 +-
 lisp/magit.el   |   8 +-
 19 files changed, 752 insertions(+), 245 deletions(-)



[nongnu] elpa/magit-section updated (b32521d543 -> f3afc117c2)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  b32521d543 magit-ediff-read-files: Handle renames in one-file logs
  adds  bc065246b4 Remove duplicated command magit-help
  adds  94aca04dc8 magit-module-section: Use correct keymap
  adds  70b34f08ab Increase use of section type, keymap and binding 
inheritance
  adds  91ef0822d3 magit-get-section: Compare constant values
  adds  8c53997121 magit-section-ident-value: Split up into more methods
  adds  be371711f5 magit-section-at: New function
  adds  4de514b84c magit-section-content-p: New function
  adds  5da6122160 magit-section-mode-map: Add docstring
  adds  73a2cbe61f magit-section-heading-map: New keymap
  adds  949b4a47a4 magit-mouse-toggle-section: New command
  adds  7d15b1a041 magit-diff--region-range: New function
  adds  5641d3749c Completely rework magit-mode-menu
  adds  8eb43f8b23 Store keymap detected based on name in section object
  adds  0168be9366 Add basic context-menu
  adds  b7294344e3 Add context-menu utilities
  adds  95b432530a Do not set point when invoking context-menu
  adds  38cb9372dc Add section-specific context-menus
  adds  f3afc117c2 Bump dependencies on Melpa

No new revisions were added by this update.

Summary of changes:
 docs/magit-section.org  |  39 +++-
 docs/magit-section.texi |  40 +++-
 docs/magit.org  |  13 ++
 docs/magit.texi |  16 ++
 lisp/magit-base.el  |  23 ++-
 lisp/magit-bisect.el|   2 +-
 lisp/magit-diff.el  | 135 +-
 lisp/magit-git.el   |  10 +-
 lisp/magit-log.el   |  50 -
 lisp/magit-merge.el |   2 +-
 lisp/magit-mode.el  | 105 ++-
 lisp/magit-pkg.el   |   8 +-
 lisp/magit-refs.el  |  20 +-
 lisp/magit-section.el   | 483 +++-
 lisp/magit-stash.el |  12 +-
 lisp/magit-status.el|   7 +-
 lisp/magit-submodule.el |  18 +-
 lisp/magit-worktree.el  |   6 +-
 lisp/magit.el   |   8 +-
 19 files changed, 752 insertions(+), 245 deletions(-)



[nongnu] elpa/git-commit d134b87a6b: magit-ediff-use-indirect-buffers: Demote to variable

2022-03-25 Thread ELPA Syncer
branch: elpa/git-commit
commit d134b87a6b4b84791e1fca655f5e4feb62580920
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-ediff-use-indirect-buffers: Demote to variable
---
 lisp/magit-ediff.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/magit-ediff.el b/lisp/magit-ediff.el
index 4c5c084580..2fe4ff178b 100644
--- a/lisp/magit-ediff.el
+++ b/lisp/magit-ediff.el
@@ -101,11 +101,10 @@ tree at the time of stashing."
   :group 'magit-ediff
   :type 'boolean)
 
-(defcustom magit-ediff-use-indirect-buffers nil
-  "Whether to use indirect buffers."
-  :package-version '(magit . "3.1.0")
-  :group 'magit-ediff
-  :type 'boolean)
+(defvar magit-ediff-use-indirect-buffers nil
+  "Whether to use indirect buffers.
+Ediff already does a lot of buffer and file shuffling and I
+recommend you do not further complicate that by enabling this.")
 
 ;;; Commands
 



[nongnu] elpa/magit updated (f3afc117c2 -> d134b87a6b)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  f3afc117c2 Bump dependencies on Melpa
  adds  d134b87a6b magit-ediff-use-indirect-buffers: Demote to variable

No new revisions were added by this update.

Summary of changes:
 lisp/magit-ediff.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)



[nongnu] elpa/magit-section updated (f3afc117c2 -> d134b87a6b)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  f3afc117c2 Bump dependencies on Melpa
  adds  d134b87a6b magit-ediff-use-indirect-buffers: Demote to variable

No new revisions were added by this update.

Summary of changes:
 lisp/magit-ediff.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)



[elpa] externals/osm 881b1c969f 2/2: Minor cleanup

2022-03-25 Thread ELPA Syncer
branch: externals/osm
commit 881b1c969fcf3dae5c020ce520e5a16f8f2b6f18
Author: Daniel Mendler 
Commit: Daniel Mendler 

Minor cleanup
---
 osm.el | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/osm.el b/osm.el
index d8291a8995..97e41836cb 100644
--- a/osm.el
+++ b/osm.el
@@ -1011,8 +1011,7 @@ xmlns='http://www.w3.org/2000/svg' 
xmlns:xlink='http://www.w3.org/1999/xlink'>
 (defun osm--update ()
   "Update map display."
   (osm--barf-unless-osm)
-  (rename-buffer (osm--buffer-name) 'unique)
-  (setq list-buffers-directory (osm--location-str))
+  (osm--rename-buffer)
   (osm--update-sizes)
   (osm--update-header)
   (osm--update-buffer)
@@ -1136,11 +1135,16 @@ xmlns='http://www.w3.org/2000/svg' 
xmlns:xlink='http://www.w3.org/1999/xlink'>
   (string-remove-suffix (concat " " (osm--server-property :name)) 
name)
 name
 
-(defun osm--buffer-name ()
-  "Return buffer name."
-  (format "*osm: %.2f° %.2f° Z%s %s*"
-  osm--lat osm--lon osm--zoom
-  (osm--server-property :name)))
+(defun osm--rename-buffer ()
+  "Rename current buffer."
+  (setq list-buffers-directory
+(format "%.6f° %.6f° Z%s %s"
+osm--lat osm--lon osm--zoom
+(osm--server-property :name)))
+  (rename-buffer (format "*osm: %.2f° %.2f° Z%s %s*"
+ osm--lat osm--lon osm--zoom
+ (osm--server-property :name))
+ 'unique))
 
 (defun osm--bookmark-name (&optional loc)
   "Return bookmark name with optional LOC name."



[elpa] externals/osm updated (4f1d545456 -> 881b1c969f)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch externals/osm.

  from  4f1d545456 Indentation
   new  56f3c2b562 Assign list-buffers-directory to the location (#16)
   new  881b1c969f Minor cleanup


Summary of changes:
 osm.el | 21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)



[elpa] externals/osm 56f3c2b562 1/2: Assign list-buffers-directory to the location (#16)

2022-03-25 Thread ELPA Syncer
branch: externals/osm
commit 56f3c2b56241994169361ba1148a03875ef8a749
Author: Daniel Nagy 
Commit: GitHub 

Assign list-buffers-directory to the location (#16)

This displays the location as a string in M-x list-buffers instead of 
showing an
empty path column.
---
 osm.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/osm.el b/osm.el
index 35e002042f..d8291a8995 100644
--- a/osm.el
+++ b/osm.el
@@ -1012,6 +1012,7 @@ xmlns='http://www.w3.org/2000/svg' 
xmlns:xlink='http://www.w3.org/1999/xlink'>
   "Update map display."
   (osm--barf-unless-osm)
   (rename-buffer (osm--buffer-name) 'unique)
+  (setq list-buffers-directory (osm--location-str))
   (osm--update-sizes)
   (osm--update-header)
   (osm--update-buffer)
@@ -1287,6 +1288,10 @@ Optionally place transient pin with ID and NAME."
 (message "Stored bookmark: %s" name))
 (osm--revert)))
 
+(defun osm--location-str ()
+  "Returns the current location as a string."
+  (format "%.2f° %.2f° Z%s" osm--lat osm--lon osm--zoom))
+
 (defun osm--location-data (id name)
   "Fetch location info for ID with NAME."
   (let ((lat (or (car osm--transient-pin) osm--lat))



[elpa] externals/company 783287526a: company-select-next-or-abort: Check the value of company-selection

2022-03-25 Thread ELPA Syncer
branch: externals/company
commit 783287526a791590bea4f9a23992c2bfebdb4c8d
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-select-next-or-abort: Check the value of company-selection

Fixes #1314
---
 company.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index 5e7471d89a..4c58707a48 100644
--- a/company.el
+++ b/company.el
@@ -2527,7 +2527,8 @@ and invoke the normal binding.
 
 With ARG, move by that many elements."
   (interactive "p")
-  (if (> company-candidates-length 1)
+  (if (or (not company-selection)
+  (> company-candidates-length 1))
   (company-select-next arg)
 (company-abort)
 (company--unread-this-command-keys)))



[elpa] externals/embark updated (5bad2fd6b5 -> b80d96ce0a)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark.

  from  5bad2fd6b5 Fix remaining checkdoc complaints (they were silly, but 
whatever)
   new  ea6d4b9707 Simplify // and ~/ in file paths
   new  b80d96ce0a Improve handling of relative paths in export, collect 
and act-all


Summary of changes:
 embark.el | 136 ++
 1 file changed, 75 insertions(+), 61 deletions(-)



[elpa] externals/embark b80d96ce0a 2/2: Improve handling of relative paths in export, collect and act-all

2022-03-25 Thread ELPA Syncer
branch: externals/embark
commit b80d96ce0ab79e73829322e46c6d7493eb2b8c34
Author: Omar Antolín 
Commit: Omar Antolín 

Improve handling of relative paths in export, collect and act-all

Before this change I had some ad hoc handling of converting from
relative to absolute paths (see the two removed TODOs) that failed to
cover some cases where it was needed. For example, I trie attaching
multiple files to an email message by using embark-act-all from
mml-attach-file, and this failed to find the files if they weren't in
the default-directory of the email composition buffer!

The basic source of the problem is that typically file completion
candidates are just the last portion of a file path, and should be
taken relative to the directory specified in the minibuffer input, but
that directory is *not* necessarily the default-directory of the
minibuffer or the buffer current before the minibuffer. Embark has
long had embark--default-directory which has some reasonable
heuristics to figure out the correct directory candidates which are
relative paths can be found in.

With this change all use of candidate collectors (those are used for
all the commands for sets of candidates: export, collect and act-all)
will now add the correct path to file candidates, so that future
actions can safely find them.

Previously dired export would make candidates relative to an
appropriately chosen directory to achieve a less cluttered look, but
collect buffers did not do this. Now collect buffers do so as well.
---
 embark.el | 129 +-
 1 file changed, 69 insertions(+), 60 deletions(-)

diff --git a/embark.el b/embark.el
index 2f67d572b8..9e96162c90 100644
--- a/embark.el
+++ b/embark.el
@@ -943,10 +943,8 @@ their own target finder.  See for example
candidate)
 ,start . ,end
 
-(defun embark-target-completion-at-point (&optional relative)
-  "Return the completion candidate at point in a completions buffer.
-If the completions are file names and RELATIVE is non-nil, return
-relative path."
+(defun embark-target-completion-at-point ()
+  "Return the completion candidate at point in a completions buffer."
   (when (derived-mode-p 'completion-list-mode)
 (if (not (get-text-property (point) 'mouse-face))
 (user-error "No completion here")
@@ -964,7 +962,7 @@ relative path."
   (point-max)))
 (let ((raw (buffer-substring beg end)))
   `(,embark--type
-,(if (and (eq embark--type 'file) (not relative))
+,(if (eq embark--type 'file)
  (abbreviate-file-name (expand-file-name raw))
raw)
 ,beg . ,end))
@@ -2079,26 +2077,32 @@ target."
   "Collect candidates and see if they all transform to the same type.
 Return a plist with keys `:type', `:orig-type', `:candidates', and
 `:orig-candidates'."
- (pcase-let ((`(,type . ,candidates)
-  (run-hook-with-args-until-success 'embark-candidate-collectors)))
-   (append
-(list :orig-type type :orig-candidates candidates)
-(or (unless (null candidates)
-  (when-let ((transformer (alist-get type embark-transformer-alist)))
-(pcase-let* ((`(,new-type . ,first-cand)
-  (funcall transformer type (car candidates
-  (let ((new-candidates (list first-cand)))
-(when (cl-every
-   (lambda (cand)
- (pcase-let ((`(,t-type . ,t-cand)
-  (funcall transformer type cand)))
-   (when (eq t-type new-type)
- (push t-cand new-candidates)
- t)))
-   (cdr candidates))
-  (list :type new-type
-:candidates (nreverse new-candidates)))
-(list :type type :candidates candidates)
+  (pcase-let ((`(,type . ,candidates)
+   (run-hook-with-args-until-success 
'embark-candidate-collectors)))
+(when (eq type 'file)
+  (let ((dir (embark--default-directory)))
+(setq candidates
+  (mapcar (lambda (cand)
+(abbreviate-file-name (expand-file-name cand dir)))
+  candidates
+(append
+ (list :orig-type type :orig-candidates candidates)
+ (or (unless (null candidates)
+   (when-let ((transformer (alist-get type embark-transformer-alist)))
+ (pcase-let* ((`(,new-type . ,first-cand)
+   (funcall transformer type (car candidates
+   (let ((new-candidates (list first-cand)))
+ (when (cl-every
+(lambda (cand)
+  (pcase-let ((`(,t-type . ,t-cand)
+   (funcall transformer 

[elpa] externals/embark-consult updated (5bad2fd6b5 -> b80d96ce0a)

2022-03-25 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark-consult.

  from  5bad2fd6b5 Fix remaining checkdoc complaints (they were silly, but 
whatever)
  adds  ea6d4b9707 Simplify // and ~/ in file paths
  adds  b80d96ce0a Improve handling of relative paths in export, collect 
and act-all

No new revisions were added by this update.

Summary of changes:
 embark.el | 136 ++
 1 file changed, 75 insertions(+), 61 deletions(-)



[elpa] externals/embark ea6d4b9707 1/2: Simplify // and ~/ in file paths

2022-03-25 Thread ELPA Syncer
branch: externals/embark
commit ea6d4b97078c8bc4d4b6ef2eb85f5705de85e377
Author: Omar Antolín 
Commit: Omar Antolín 

Simplify // and ~/ in file paths

This isn't necessary for most Emacs commands used as file actions, but
shell-command definitely needs it.
---
 embark.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index 64f0271ec7..2f67d572b8 100644
--- a/embark.el
+++ b/embark.el
@@ -185,7 +185,8 @@ bounds pair of the target at point for highlighting."
 (embark-keybinding . embark--keybinding-command)
 (project-file . embark--project-file-full-path)
 (package . embark--remove-package-version)
-(multi-category . embark--refine-multi-category))
+(multi-category . embark--refine-multi-category)
+(file . embark--simplify-path))
   "Alist associating type to functions for transforming targets.
 Each function should take a type and a target string and return a
 pair of the form a `cons' of the new type and the new target."
@@ -1850,6 +1851,10 @@ minibuffer before executing the action."
(t 'symbol)))
 target))
 
+(defun embark--simplify-path (_type target)
+  "Simplify and '//' or '~/' in the TARGET file path."
+  (cons 'file (substitute-in-file-name target)))
+
 (defun embark--keybinding-command (_type target)
   "Treat an `embark-keybinding' TARGET as a command."
   (when-let ((cmd (get-text-property 0 'embark-command target)))