CHANGELOG (22490B)
1 # -*- mode: org -*- 2 * v0.4.0 2023-05-10 3 4 - Transient has to update state after every suffix command. If that 5 fails for some reason, then Emacs ends up in an badly broken state. 6 It was rare, but in the worst case scenario, that meant that Emacs 7 refused to call any more commands and had to be killed. 8 9 Naturally ~post-command-hook~ is the first choice to run something 10 after commands, but unfortunately that hook is not guaranteed to run 11 only once, and worse it is not guaranteed run /after/ the command. 12 Working around this limitation made an essential part of Transient 13 much more complex and fragile. As new edge-cases were discovered, 14 new and increasingly desperate heuristics had to be added, until I 15 finally decided that relying solely on hooks was just not feasible. 16 17 Now ~pre-command-hook~ is used to advice ~this-command~, to add an 18 around advice, which ensures that the state update takes place, even 19 when ~post-command-hook~ is run prematurely. The advice wraps both 20 the function body and the interactive spec with ~unwind-protect~, so 21 we can finally be sure that the state change is always performed, 22 and that the advice is removed again. 23 24 It has been an interesting journey, and I have documented it in long 25 commit messages. If you are interested in the details, see 7b8a7d71 26 (which still tries to avoid using any advice), 51c68c87, 52cac9c0, 27 bug#61179 and bug#61176. 28 29 - The ~transient-define-prefix~ now expands to code instead of data, 30 meaning that lambda expressions are finally properly evaluated and 31 byte-compiled. ea851f3b e88f51d6 277e5f2d a1774182 32 33 - Popup navigation is no longer considered a second-class feature and 34 is enabled by default. Some transients allow arbitrary non-suffixes 35 to be invoked, so some key bindings, which were previously used for 36 popup navigation, had to be removed, to avoid conflicts. 98d50202 ff 37 38 - Each prefix and suffix can now have its own help function. This is 39 configured using the new ~show-help~ slot. ea5ac99f 40 41 - The ~transient-options~ class now supports two types of options that 42 can have multiple values: repeated option-value pairs and a final 43 option that takes all remaining arguments as value. #154 44 45 - Added support for the use of non-proportional text in the transient 46 popup. 7f5520b3 47 48 - Imenu was taught about Transient's definition macros. #178 49 50 - It is now possible to return to the parent prefix from a sub-prefix. 51 e90f7a16 52 53 - Boolean values of the ~transient~ slot of sub-prefixes are now 54 interpreted correctly. 4a36b1d9 55 56 - Added new option ~transient-hide-during-minibuffer-read~. 5762bd9a 57 58 - Added new option ~transient-align-variable-pitch~. cda6a120 59 60 - Added new command ~transient-reset~, which clears the set and saved 61 value of the active transient. 51585b8d 62 63 - When using Emacs 28, ~execute-extended-command~ can be told to ignore 64 transient infix commands. Even when using that Emacs version, that 65 command does not ignore any commands by default, but this behavior 66 can be easily be enabled using: 67 68 (setq read-extended-command-predicate 69 'command-completion-default-include-p) 70 71 Infix arguments are implemented as commands, so they by default show 72 up as completion candidates of ~execute-extended-command~, which is 73 useless because they are only intended to be invoked from transient 74 prefix commands. Enable this feature to prevent that. 75 76 - Added new command ~transient-toggle-debug~. b466cd9a 77 78 - Depend on the Compat package, allowing me to use convenient features 79 that were added to Emacs over the last few years, without having to 80 wait another few years until everybody has updated to a reasonably 81 recent Emacs release. 5ae3c401 82 83 - Added basic support for suffixes that span multiple lines (multi-row 84 cells). #193 85 86 - Infix arguments can now be invoked following a prefix argument. To 87 use a negative prefix argument use "C--". "-" cannot be used anymore 88 because it conflicts with the most common prefix key used for infix 89 arguments. ed2febd0 90 91 - Removed obsolete aliases for functions deprecated in v0.3.0. #192 92 93 - Duplicated suffix commands are now disambiguated, making it possible 94 to bind a command multiple times as a suffix of a transient command, 95 but still have it do different things depending on what binding is 96 used, based on the value of some slot of the corresponding suffix 97 object, similar to how ~self-insert-command~ inserts the pressed key. 98 f27c840a 99 100 - ~recursive-edit~ and ~top-level~ can now be used while a transient is 101 active. fcdeadc1 5a1b2bac 102 103 - Switched to Emacs 29's new keymap functions, which are also supported 104 in newer releases, thanks to the Compat package. 87f70af5 5a966aa8 105 106 Bug fixes: 107 108 - 938b0591 #173 transient--show: Set point after displaying window again 109 - 202271f7 Resurrect transient-files class 110 - c26cbac5 #181 transient-{init,set}-value: Use case-sensitive matching 111 - 28491e1f Properly deal with stealth undefined command 112 - 143a1393 transient-infix-read: Always enable-recursive-minibuffers 113 - 76b77e01 magit--{pre,post}-command: Add emergency exits 114 - 09b436fa transient--debug: Ignore error in transient--suffix-symbol 115 - f2e0dfcc transient--get-predicate-for: Ignore error in transient--suffix-symbol 116 - bf29731a transient--post-command: Don't pop and push equal redisplay maps 117 - 3c78b10f transient--redisplay: Don't redisplay during mouse-drag-region 118 - 714e3482 No longer always suspend when handle-switch-frame is called 119 - ecb815bc transient--abort-commands: Add keyboard-escape-quit 120 - 8b1f8dcc transient--minibuffer-depth: Must always be a number 121 - 686b7ebc Fix handling of sub-prefix command that use the minibuffer 122 - a19faa1c Return to outer prefix when minibuffer is aborted for sub-prefix 123 - 4477555b transient--post-exit: Deal with unbound transient slot properly 124 - 0f39af0e #188 transient-format-description: Use cl-call-next-method 125 - 1fd1cf51 When highlighting suffixes not normally displayed consider group level 126 - 7c771c94 Do not let-bind overriding-terminal-local-map to nil 127 - 31d355b5 transient-set-level: Refresh shown levels after setting one 128 - bb056e71 Invoke suffix commands directly when a button is pushed 129 - 270eff1c Fix redisplay when popup navigation is enabled 130 - 81b2b912 Use this-original-command again 131 - d4fb853d #198 transient--show: Also hide the header-line 132 - 7467a79c transient--suspend-override: Cancel display timer 133 - 5686a792 transient--suspend-override: Cancel prefix key display 134 - 1c84d7ad Remap kp-subtract, kp-equal and kp-add 135 - 5302db18 Once popup is showing keep doing so until full exit 136 - cc887ebe transient--delay-post-command: Fix execute-extended-command handling 137 - 3b267425 transient--fit-window-to-buffer: Use correct package prefix 138 - 9d4fabc3 #208 transient--describe-function: Handle renamed help buffer 139 - 555792f7 #209 Fix setting level of anonymous infixes 140 - 0a3b22f1 #215 transient--delay-post-command: Account for events returned as vector 141 - ad953cc3 #204 transient--insert-group: Add fallback for failed alignment calculation 142 - 5337e5eb #230 transient-define-{*}: Error if ARGLIST is missing 143 - d800ce01 Use equal to compare with empty vector 144 - 3657117b #234 transient--parse-suffix: Detect when mandatory command is missing 145 - f88cbbc5 #234 transient--parse-suffix: Differentiate command and desc lambda 146 - 0204a243 #234 transient--parse-suffix: Define suffix aliases at load-time 147 - 0ae0de43 #241 transient--invalid: Add special-case for anonymous inapt commands 148 - af7fe42b #244 transient--parse-suffix: Don't try to evaluate closures again 149 - 6ff5c51f transient-isearch-abort: Fix partial match case 150 151 Also contains various documentation updates, code clean-ups and 152 build improvements. 153 154 * v0.3.7 2021-10-25 155 156 - Added an additional safety hatch to prevent Emacs from entering an 157 inconsistent state when an unexpected error occurs. 99e48369 158 159 - Added support for implementing section movement commands in 160 third-party packages. This was requested by the maintainer of 161 Emacspeak. Because they would be of very limited use to sighted 162 users no such commands are added to Transient itself. 769219b5 163 164 - ~transient-read-number-{N0,N+,N}~ now support infix arguments that 165 have three different states: disabled, enabled without an empty 166 value, and enabled with a non-empty value. 626d105e 167 168 - If a command is called as a suffix of itself, then the help command 169 shows the function definition instead of the man-page as it usually 170 does for prefixes. e17e2b2f 171 172 - Give users more control over how the transient buffer is displayed. 173 Various aspects that were previously hardcoded can now be changed 174 using the ~transient-display-buffer-action~ option. 7c677737 175 176 - Added support for adding suffixes that might be neither defined nor 177 autoloaded when the prefix is invoked. This usually results in an 178 error and while it is now possible to override that using an extra 179 step, it is still discouraged. 6842305e 180 181 Bug fixes: 182 183 - 1e740608 transient-map: Bind C-u to universal-argument 184 - e9048100 Explicitly call transient--pre-command in button action 185 - be119ee4 Export variables for transient non-infix suffixes 186 - b526b9c7 transient-infix-set: Consider all incompatibility rules 187 - 7126d6aa Fix hydra-inspired colors 188 - 0c2255a2 transient-get-value: Add an emergency exit 189 190 Also contains various documentation updates and code clean-ups. 191 192 * v0.3.6 2021-07-01 193 194 - Added new option ~transient-force-single-column~, which may be useful 195 for low vision. #122 196 197 - Added new option ~transient-highlight-higher-levels~, which is 198 intended for package authors. 90a05622 199 200 * v0.3.5 2021-06-16 201 202 - Added a kludge to work around some unexpected Emacs behavior. 203 ef921d30 204 205 - When showing help for a suffix that is also a subprefix, then also 206 consider the manpage that is set for the prefix, if any. a9bdd013 207 208 * v0.3.4 2021-05-25 209 210 - Very minor changes. 211 212 * v0.3.3 2021-05-24 213 214 - Added SPDX-License-Identifier library header. 7d3d8d79 215 216 * v0.3.2 2021-04-20 217 218 - Fixed an error message. c145229a 219 220 * v0.3.1 2021-04-19 221 222 - Changed ~transient-prefix~'s ~suffix-description~ slot to be initially 223 unbound, as was always intended. c28b8a4 224 225 - Added new functions ~transient-read-file~ and 226 ~transient-read-existing-file~. a3b44224 227 228 * v0.3.0 2021-02-21 229 230 - Added a temporary kludge to prevent a transient from being invoked 231 while the minibuffer is active. A future release will enable 232 this again, once we are sure that cannot cause Emacs to enter an 233 inconsistent state, that causes most events to be ignored. #112 234 235 - Improved the backtrace that is shown when a fatal error occured in a 236 critical context. This involved some back and forth. See commits 237 mentioning the "emergency exit". 238 239 - Added support for defining a per-prefix fallback suffix description 240 function, which is used for suffixes that do not explicitly provide 241 a description. The new ~suffix-description~ slot is used to specify 242 that function. The new ~transient-command-summary-or-name~ function 243 is useful, not just as an example. 8b22b52b 244 245 - Added ~transient-arg-value~, which can be used to extract the values 246 of individual arguments in the output of ~transient-args~. d76f73f8 247 248 - Added support for using variables in group and suffix definitions 249 of a prefix. Such indirect specifications are resolved when the 250 transient prefix is being defined. #101 251 252 - No longer bind ~M-<key>~ to any common suffix commands; freeing this 253 namespace for a variety of uses in individual transient. A few 254 existing bindings had to be changed because of this. 990eb0a2 255 256 - Added ~transient-suffixes~ function, which is useful when 257 ~transient-args~ is not sufficient because one needs the suffix 258 objects, not just their values. #98 259 260 - Added ~init-value~ slot for infix and prefix objects. If this value 261 bound then it is called with the object as only argument instead of 262 the primary ~transient-init-value~ method of the object class. #96, 263 3284f6a0 264 265 - Added ~unsavable~ slot for infix objects. If this is non-nil, then 266 the value of the infix is removed from the prefix value before 267 saving, setting and adding to history. #96 268 269 - Added support for right padding the keys of all suffixes in a group. 270 This is controlled using the new ~pad-keys~ slot of group objects. 271 7502390b, 293a437d 272 273 - Added support for delaying setup of the suffixes of a prefix until 274 that is invoked. Also added support for using unnamed functions as 275 suffix commands. Taken together these changes make it possible to 276 dynamically create the list of suffixed. See the ~notmuch-transient~ 277 package for two examples: ~notmuch-search-transient~ and 278 ~notmuch-tag-transient~. f2252d53, a3e53633 279 280 - Added the infix class ~transient-lisp-variable~. 2d8ceff4 281 282 - Added ~transient-infix-read~, which allows arbitrary commands to read 283 a value the same way as would the infix command that is provided as 284 an argument to this function. 73694be4 285 286 - Added support for coloring suffixes in a Hydra-like fashion. 287 To enable this, customize option ~transient-semantic-coloring~. 288 248862c5 289 290 - Added support for disabling and dimming suffix commands that are 291 currently not suitable, instead of completely hidding them. #80 292 293 - Autoload functions that serve a purpose similar to that of 294 ~define-key~. #85 295 296 - Consistently use ~transient-~ as the prefix of all symbols. 297 The old names remain available as obsolete aliases. dd0c44cb 298 299 - Added support for scrolling the transient popup buffer using the 300 scroll bar. #84 301 302 - Various bug fixes. 303 48238bf5 Allow invoking arbitrary prefixes as non-suffixes 304 d85eb790 transient-read-directory: Pass read value through file-local-name 305 f086cb62 transient--insert-suffix: Allow same key with different predicates 306 d555d260 transient-format-description(lisp-variable): Return string 307 0d79ccfa transient--parse-suffix: Don't fallback to read-string for options 308 f88dbc43 transient-suffix-object: Support all suffixes 309 b343e2a3 transient-infix-read: Fix ivy specific kludge 310 55bad195 transient--pp-to-file: Bugfix 311 c1df3b21 Ensure we use symbols in a few more places 312 769fa438 transient-set-level: Fix edge-case 313 88d935c7 transient-display-buffer-action: inhibit-same-window by default 314 315 * v0.2.0 2020-02-26 316 317 - ~transient-args~ must now be called with a transient prefix command 318 as argument. It is now the only argument and its value must be a 319 symbol now, an object is no longer supported. When this command 320 does not match ~current-transient-command~, then this function now 321 returns the set, saved or default value. 0312b93, 7d0db28, 322 d33fe5a, a6ce195 323 324 - No longer use the last history element as initial minibuffer input 325 by default. Added new option ~transient-read-with-initial-input~ to 326 allow users to restore the old default. dcf7a4d, 5decc6e 327 328 - The set and saved values were not always used. #68 329 330 - Added support for inserting and removing groups. #36 331 332 - Added support for specifying where to insert elements and groups 333 using coordinates. #26 334 335 - Added support for moving the cursor inside the transient popup 336 buffer using the arrow keys or Isearch, and for invoke suffix 337 commands using RET or mouse clicks. Unlike Magit-Popup, Transient 338 doesn't make the transient popup buffer the current buffer. This 339 is important when invoking suffix commands that take the current 340 position into account, but it has the drawback that we do not get 341 these features for free. Because I also consider them unnecessary 342 I did not implement them initially. Turns out quite a few users 343 strongly disagree. Set ~transient-enable-popup-navigation~ to ~t~ to 344 enable these features. #42 345 346 - Explicitly support Edebug. Previously when Edebug was triggered 347 while a transient was active, then Emacs entered an unrecoverable 348 state. #19 349 350 - No longer attempt to display a thin line in termcap frames. 0a96a57 351 352 - Work around some Ivy bugs/incompatibilities. af243d5, fed7ab1 353 354 - The new option ~transient-force-fixed-pitch~ allows users to use a 355 monospaced font in transient's popup buffer even if they use a 356 proportional font for the rest of Emacs. #25, #67 357 358 - Adapted to backward incompatible changes in Emacs 27 that prevented 359 faces from extending to the edge of the window as expected. c1ae1ee 360 361 - No longer depend on dash (or any other third-party package). #66 362 363 - When a transient has conflicting key bindings and Transient is 364 configure to warn about that, then Emacs entered an unrecoverable 365 state instead. 75de1f0 366 367 - ~transient-format-value~ now supports options with multiple values. 368 #65 369 370 - Removing a suffix based on its position was broken. 41cbf49 371 372 - In our popup buffers disable the tab feature that Emacs 27 373 introduces. #62 374 375 - Inserting a new suffix next to another ended up replacing the latter 376 instead if its key binding was defined in the suffix object. #58 377 378 - ~transient-undefined~ learned to make some noise. #57 379 380 - Fix replacing a suffix with another suffix bound to the same key. 381 5a360bb, 4ce1868 382 383 - Characters are no longer allowed as pseudo suffixes. To insert a 384 an empty cell into a table use the empty string instead. 71687ba 385 386 - Added new variable ~transient--buffer-name~. #45 387 388 - Some misconfiguration that affects how the transient popup buffer 389 is displayed could lead to Emacs entering an unrecoverable state. 390 #34, #44 391 392 - The echo area is now cleared when the transient popup buffer is 393 shown. afdf1f0 394 395 - If ~transient-show-popup~ is 0 or a negative number, then not even 396 a one-line summary is shown initially. #41 397 398 - Added new function ~transient-read-directory~. a87cb2c 399 400 - ~define-transient-command~ now supports specifying the level of a 401 suffix using the ~:level~ keyword argument. 6506cfd 402 403 - The mode-related suffix predicates now also support a list of modes 404 as argument in addition to a single mode as before. 1c6afb8 405 406 - The new ~incompatible~ slot of prefix objects makes it possible to 407 specify which arguments should be autoatically disabled when the 408 user enables certain other arguments. 544b3bb 409 410 - ~transient--history-push~ is now defined as generic function. 47b7975 411 412 - The a new ~history-key~ slot and ~transient--history-key~ generic 413 function for prefix objects. 3668aeb, e627d45 414 415 - Disallow setting the level of essential suffixes that are shared 416 between all transients. #29 417 418 - The active infix is now highlight while reading its value from the 419 user. #30 420 421 - The commands ~transient-set~ and ~transient-save~ can now be configured 422 to exit the transient, though by default they still don't. a47ae94 423 424 - Always respect the ~transient~ slot of a suffix, even if that suffix 425 has a binding in ~transient-predicate-map~. 919fc66 426 427 - Added new generic functions ~transient-set-value~ and 428 ~transient-save-value~ intended for prefix commands. ebe9d9d 429 430 - It is no longer possible to set a prefix level to 0, which is an 431 invalid value. #28 432 433 - All transient prefix and suffix commands are now automatically 434 declared to be for interactive use only. a6295fa 435 436 - Infix arguments are no longer added to ~command-history~ because 437 these entries were both useless and extremely noisy. #23 438 439 - ~digit-argument~ no longer exits the transient. 5f0ec7d 440 441 - A new keymap, ~transient-base-map~ was added to make it easier to 442 change key bindings that are shared between all transients. This 443 new keymap is used as the parent of all the other keymaps that are 444 shared between all transients. 445 446 - Added new commands ~transient-scroll-up~ and ~transient-scroll-down~, 447 which scroll the transient window. ~C-v~ and ~M-v~ (and ~<next>~ and 448 ~<prior>~) are bound to these commands. These keys were chosen they 449 are bound to scrolling commands in the global map too. This made 450 it necessary to find a new binding for ~transient-show~, which ~C-t~ is 451 bound to now. #17 452 453 - The new option ~transient-mode-line-format~ allows users to use 454 a mode-line for the transient popup buffer instead of just a 455 thin line that separates it from the echo area. When using a 456 non-standard value for ~transient-display-buffer-action~ it may 457 be necessary to do that. #17 458 459 - The new option ~transient-display-buffer-action~ allows users to 460 specify how a window is selected to display the transient popup 461 buffer. The ~lv~ library is no longer used. #17 462 463 - The window that was selected before the transient window was shown 464 is no longer re-selected before calling a suffix that exits the 465 transient. If a suffix changes the selected window unintentionally, 466 then that is a bug. This makes it possible to intentionally change 467 the window layout using transients. 468 469 - An infix is a special kind of suffix. Depending on context 470 "suffixes" means "suffixes (including infixes)" or "non-infix 471 suffixes". This is now mention in a few places where users might 472 otherwise get confused. 473 474 - Stopped claiming that the transient is shown in the "echo area", 475 because technically that is not correct. Instead talk about the 476 "popup buffer". 477 478 - Fixed handling of suffix commands that are undefined at the time the 479 prefix is invoked. This is still an error, but the error message 480 now explains what is wrong. a729bbb 481 482 - Fixed saving values/history/levels, making sure that the printed 483 expression is never abbreviated. #15 484 485 - Fixed jumping to the correct place in a manpage when showing the 486 documentation for an infix argument. c4bf4af 487 488 - Bound ~ESC ESC ESC~ to ~transient-quit-all~ because the convention is 489 that it should be possible to exit any temporary state using this 490 binding. #12 491 492 - Fixed referencing suffix bindings by their key when the key binding 493 is defined in the suffix object instead of in the suffix spec. 494 e4ffb97 495 496 - Remove trailing whitespace from popup text for the benefit of users 497 who have set enabled ~show-trailing-whitespace~ globally. 0758efa 498 499 - Fixed showing available bindings on a single line instead of using 500 the usual popup buffer. 2f011c9, 99d3bf6 501 502 - Added a line between the ~lv~ window and the echo area. ca18bb6 503 504 - Fixed adding a new suffix at the end of a group and removing a 505 group's last suffix. #20, #6 506 507 - No longer use ~cl-typep~, which appears to have a bug on Emacs 25. 508 9183fe1 509 510 - Fixed ~lisp~ make target. 170a3fd 511 512 - Fixed reading a number as the value of an infix. 8219c0b 513 514 - Various bug fixes to 515 ~transient--goto-argument-description~ (4f80a89), 516 ~transient-show-help~ (ccac95e), 517 ~transient-infix-read~ (7bf9759). 518 519 * v0.1.0 2019-01-14 520 521 - First release.