[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient dd9c40adc3 180/366: transient-setup: Handle e
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient dd9c40adc3 180/366: transient-setup: Handle edge-case |
Date: |
Tue, 25 Jan 2022 18:54:39 -0500 (EST) |
branch: externals/transient
commit dd9c40adc3eb7f8656c8a17c3c450388610b7986
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-setup: Handle edge-case
When the minibuffer is active on behalf of a suffix command, then we
cannot completely prevent the user from invoking commands that they
should not invoke at this time (i.e. they can use recursive editing,
which does not play well with transient prefixes) because we have to
allow arbitrary commands as we cannot know whether any such command
is something that aids during minibuffer completion.
When the user takes the opportunity to invoke another prefix at this
time, then this leads to events from our minibuffer and setup hooks
being firing in an unintended order and that leads to Emacs entering
an inconsistent transient state.
Since we wouldn't want the user to move away from the minibuffer even
if doing so did not lead to this issue, we simply detect and disallow
entering a transient prefix after having done that.
Closes the variant of #64 that was reported by @bricewge.
---
lisp/transient.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/transient.el b/lisp/transient.el
index 950822b917..f5cd8386d3 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1571,6 +1571,9 @@ be nil and PARAMS may be (but usually is not) used to set
e.g. the
This function is also called internally in which case LAYOUT and
EDIT may be non-nil."
(transient--debug 'setup)
+ (when (and (>= (minibuffer-depth) 1) transient--prefix)
+ (error "Cannot invoke %s while minibuffer is active %s"
+ this-command "on behalf of another prefix command"))
(cond
((not name)
;; Switching between regular and edit mode.
- [elpa] externals/transient a269614c69 151/366: Release version 0.2.0, (continued)
- [elpa] externals/transient a269614c69 151/366: Release version 0.2.0, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient c94cff7474 159/366: Fix typo, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient dd0c44cb2d 160/366: Use the package prefix for everything, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 30387690fd 161/366: Autoload functions that users might use without requiring transient, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 4f0bd45d88 166/366: transient--make-predicate-map: Cosmetics, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 9b777fa120 167/366: transient--invalid: New function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 38fd406eac 168/366: transient--invalid: Emphasize command name, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 769fa4380a 169/366: transient-set-level: Fix edge-case, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient b52c623217 177/366: transient--colorize-key: New function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 248862c58e 178/366: Add experimental support for semantic coloring, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient dd9c40adc3 180/366: transient-setup: Handle edge-case,
Jonas Bernoulli <=
- [elpa] externals/transient 4d44d08e90 181/366: Tell package.el to compile this library properly, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 53d3885371 182/366: transient--emergency-exit: Show debug message, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 879f45f0c9 184/366: transient--with-emergency-exit: Define earlier, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient a7f6c3c23d 191/366: transient-plist-to-alist: New utility function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient cb740f5a4e 203/366: transient-lisp-variable: Add new set-value slot, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient afdf1f0050 066/366: Clean echo-area when the timer shows the popup, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient e7a16d2006 076/366: Bring back isearch in transient popups, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 17ad01e0c7 079/366: Don't explicitly require isearch, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 1e090b0cd4 240/366: Fixup changelog, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient d5476e1d9f 266/366: Update changelog, Jonas Bernoulli, 2022/01/25