summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-04-22[patch 10/10] The version in Emacs's "master" branchesbuiltinJonas Bernoulli
To update: 0. At times backport changes from Emacs' "emacs-NN" to Transient. 1. Backport changes from Emacs' "master" to Transient's "main", while making them backward compatible with released Emacs versions. Make sure to look at the history of not only "lisp/transient.el", but also "doc/misc/transient.texi". 2. In Transient, rebase "builtin" onto "main". Now we have to DISCARD the changes that revert modifications that have happened in Transient since the last round. Most changes happen in separate commits. Their messages describe the changes that should be preserved. => Look at each of these commits, even if they do not conflict. Some contain additional instructions. In particular, do not forget to fuck up newly added instances of `if-let' et al. 3. In this commit, append "-builtin" to `transient-version'. This is not the version string the will ultimately be used, see (4) and (6). This is the only difference between Transient's "builtin" branch and the actually built-in library. 4. In Transient, sign and update date ("r S"), and run "git describe" to get "DESC", used below. 5. Copy from Transient's "builtin" to Emacs' "master". cp ~/.config/emacs/lib/transient/lisp/transient.el \ ~/src/emacs/emacs/master/lisp/ cp ~/.config/emacs/lib/transient/docs/transient.texi \ ~/src/emacs/emacs/master/doc/misc/ 6. In Emacs, set the value of `transient-version' to "DESC-builtin". 7. In Emacs, stage and commit using "Update to Transient DESC" as message.
2026-04-22[patch 9/10] lisp: Adjust package metadataJonas Bernoulli
- Use my main email address. - Use "URL" instead of "Homepage". I consistently use "Homepage" for all my packages and they consistently use "URL". - Use "Version" instead of "Package-Version" because that's all finder understands, dropping the empty line before it. - Drop "Package-Requires". Do NOT change the value of `transient-version'. That is done in the next commit. I.e., use the same version string as on the "main" branch, onto which we are rebasing.
2026-04-22[patch 8/10] lisp: Remove backward compatibility and external-only kludgesJonas Bernoulli
- Drop require for `compat'. - Drop `seq' kludge. - Drop `pp-default-function' declaration. - Drop `signal' backward compatibility. - Make use of `pcase-setq'. - Drop backward compatibility in `transient--wrap-command'. - Expect `string-edit' to exist. - Expect `string-pixel-width' to exist. - Expect `overriding-text-conversion-style' to exist.
2026-04-22[patch 7/10] lisp: Stop using and-let, if-let, when-let and while-let*Jonas Bernoulli
This ports the unfortunate Emacs commit [1: 4704dd39de0], but I refuse to damage the stand-alone version the same way. [TODO] After every rebase, check for new instances of `and-let', `if-let', `when-let' and `while-let*', and fuck them up too. (occur "(\\(\\(and\\|if\\|when\\)-let\\_>\\|while-let\\*\\)") 1: 2024-10-27 4704dd39de0427466ca3585ab284b7302b0ef2d7 transient.el: Replace use of obsolete if-let and when-let
2026-04-22[patch 6/10] lisp: Stop using cond-let and cond-let*Jonas Bernoulli
No comment. [TODO] After every rebase, check for new instances of `cond-let' and `cond-let*', and fuck them up too. (occur "(cond-let")
2026-04-22[patch 5/10] lisp: Stop using and$ and when$Jonas Bernoulli
That's fair. [TODO] After every rebase, check for new instances of `and$' and `when$', and replace them too. (occur "(\\(and\\|when\\)\\$")
2026-04-22[patch 4/10] lisp: Add inconvenient outline section nestingJonas Bernoulli
2026-04-22[patch 3/10] texi: Add more whitespace in @direntryJonas Bernoulli
I'm not sure whether whitespace in this location is actually significant, but ox-texinfo does not put it there, while Eli does.
2026-04-22[patch 2/10] texi: Use @var in two code snippetsJonas Bernoulli
2026-04-22[patch 1/10] texi: Use @xref and @pxref instead of @refJonas Bernoulli
Ox-Texinfo uses @ref, but other link types are preferred in Emacs.
2026-04-22Release version 0.13.0HEADv0.13.0mainJonas Bernoulli
2026-04-22Add kludge for mystery issue involving static-if and defaliasJonas Bernoulli
It appears that for some users `static-if' expands to nothing if the THEN or ELSE part is a `defalias' form (whichever is used in their case). I got similar reports when using `static-if' more than once, last in https://github.com/magit/magit/issues/5557, and while I was never able to reproduce, I concluded that these report are credible.
2026-04-15Tweak changelogJonas Bernoulli
2026-04-15Restore compatibility with emoji.el from Emacs 29.4Jonas Bernoulli
Closes #417
2026-04-14Remove internal--build-binding backportJonas Bernoulli
The built-in `if-let' et al. implementations are no longer used.
2026-04-13Use string-pixel-width if definedJonas Bernoulli
2026-04-13transient--string-pixel-width: Renamed functionJonas Bernoulli
Shortly after this was added to Transient, `string-pixel-width' was added to Emacs. Also rearrange a bit to use same nesting as was originally used in that function.
2026-04-09Update changelogJonas Bernoulli
2026-04-01transient--delete-window: Recover from more window misconfigurationsJonas Bernoulli
Make sure transient state is exited properly (except that the window may remain visible of course). We already demoted such errors, in one place in this function, where we expected such misconfigurations could cause an error, but the problem may not show up until these later steps, so wrap those too. Re #429.
2026-04-01transient-describe: Fix docstring typoJonas Bernoulli
2026-03-31Use Cond-Let's and-let moreJonas Bernoulli
2026-03-27transient--advise-this-command: New functionJonas Bernoulli
Removing the duplication gives us a place and some space to add documentation.
2026-03-27transient-suffix-object: Peal advice for primitive commandsJonas Bernoulli
For comparison we need `this-command' to be a symbol, but when that is a primitive or anonymous function, then `transient--wrap-command' adds an advice to `this-command', which we have to peal off here.
2026-03-27transient--wrap-command: Fix advising of native-compiled LispJonas Bernoulli
Unlike its docstring, the info manual is outdated and falsely claims that `subrp' only returns t for built-in functions, but it also does so for native-compiled Lisp functions. Having looked only at the info manual, I ended up using `subrp' in the previous commit, [1: 63f90723], to test whether the command is a "built-in function". What I was looking for is now called a primitive and the respective predicate is called `subr-primitive-p'. Closes #435.
2026-03-24transient--wrap-command: Advise built-in commands via this-commandJonas Bernoulli
The advise is ineffective otherwise, as can be observed using (transient-define-prefix demo () [("g" "goto" goto-char :transient t)])
2026-03-23Revert "Use single-arg form of signal to re-throw starting with Emacs 30"Jonas Bernoulli
Turns out `signal' does not accept a single argument in Emacs 30. This reverts commit 61ed3651df360e1a0c36ff70afbb9ee0f947252a.
2026-03-22Use single-arg form of signal to re-throw starting with Emacs 30Jonas Bernoulli
Stefan informed me that this is supported since at least that version.
2026-03-21Use single-arg form of signal to re-throw an errorJonas Bernoulli
Emacs 31.0.t0 supports this since [1: a1358530f53], which also adds `error-type-p'. So we check whether that exists to determine which form we can use. 1: 2026-03-10 a1358530f533a1151c7207e1ad634b1b9fae5a91 Improve the error API
2026-03-21transient-infix-read: Avoid turning nil into "" if multi-value is non-nilJonas Bernoulli
If STRINGS is nil, `string-join' returns the empty string, not nil. Closes #434.
2026-03-17transient-init-value: Handle multiline valuesZoey Hewll
Allow `transient-init-value' to respect multiline string values, rather than truncating them to the first line. As a regex pattern, ".*" does not match multiline strings because the "." pattern matches any character besides a line terminator. Emacs regex syntax uses the "[^z-a]" pattern to match any character including line terminators. This distinction is represented by `(rx (* nonl))' vs`(rx (* anychar))' in the `rx' macro syntax, and the expression implemented here is as produced by `(rx string-start (literal "%s") (group (* anychar)) string-end)'. Fixes #432
2026-03-16ci: Reduce permissions and add zizmor settingJonas Bernoulli
2026-03-10transient--suffixes: No longer populate by side-effectJonas Bernoulli
This is cleaner but less efficient than the previous approach. We now have to flatten the tree of suffixes when initially displaying the menu. Previously we only had to do so when refreshing the menu. If flattening is fast enough when refreshing, then it should to be fast enough for initial display as well.
2026-03-10transient--suffixes: Safely populate by side-effectJonas Bernoulli
`transient--suffixes' is populated by side-effect. `transient--init-suffix' pushes elements onto that list. `transient--init-suffix' is called indirectly via `transient--init-suffixes'. `transient--init-objects', one of the two callers of the latter dealt with this properly, but the other, `transient-suffixes' did not. The latter is called indirectly by `transient-args', which happens when no prefix is active and `transient--suffixes' should therefore remain nil. In most cases it did not matter that it ended up non-nil anyway, but it broke `transient-suffix-object', which ended up preferring the invalid non-nil value of `transient--suffixes' in situations where it should have fallen back to `transient-current-suffixes'. This caused https://github.com/magit/magit/issues/5528. Fix containing the side-effect within `transient--init-suffixes'. The value is still created incrementally by side-effect, but that value is captured in `transient--init-suffixes' and added to its return value. Callers can then either use the returned value to set the global value of `transient--suffixes', or discard it.
2026-03-10transient--describe-function: Handle describe-function overridesPablo Stafforini
`transient--describe-function' captures the help buffer via `temp-buffer-window-setup-hook'. This works with the built-in `describe-function', which displays its output via `with-help-window' and therefore triggers the hook. However, a common pattern in the Emacs community is to override `describe-function' with a function provided by a packages like `helpful'. `helpful-function' creates and displays its buffer via `pop-to-buffer' rather than `with-help-window', so `temp-buffer-window-setup-hook' never fires and `buffer' stays nil, causing (set-buffer nil) to signal `wrong-type-argument'. See #431.
2026-03-07make: Use portable sed argumentJonas Bernoulli
Closes #428.
2026-03-07make: CosmeticsJonas Bernoulli
2026-03-05transient--quit-kludge: Add commentJonas Bernoulli
2026-03-05transient--display-action: Tweak a commentJonas Bernoulli
For consistency with similar comments elsewhere in this library.
2026-03-05transient-read-string-from-buffer: New functionJonas Bernoulli
2026-03-05transient--recursive-edit: Actually handle aborts as intendedJonas Bernoulli
For context, read the docstring of `recursive-edit'. In our case it is most suitable if the recursive edit is exited using the "any other value" variant, but that isn't guaranteed, so we have to handle the other exit variants as well. Wrap the call to `recursive-edit' with `unwind-protect' to ensure we regain control, when `recursive-edit' returns to the command loop one level up (i.e., our level). We use this to either completely exit or completely restore the menu. If (throw 'exit t) is used to abort the recursive edit, then we also exit the menu. (This is a design decision.) We can only detect this if it was done by invoking `abort-recursive-edit' as a command. If this form was evaluated through other means, we end up restoring the menu. However this also causes "C-g" to be immediately unread, which results in `transient-quit-one' being invoked, so the menu is exited anyway. Needlessly restoring the menu first is unfortunate, but not a big deal (users won't notice). Additionally wrap the `unwind-protect' with `condition-case'. This is needed to deal with the (throw 'exit "'error' message") variant. This variant is commonly used to print an abort message, which isn't really an error as far as we are concerned. We want to demote "abort errors" to messages. Unfortunately "abort errors" do not use a dedicated error type (see `recursive_edit_1'), and `condition-case' can only match against error types (symbols), meaning that it cannot distinguish an abort from a genuine error. As a consequence we are stuck demoting both abort messages and genuine error messages. Closes #425. Closes #426.
2026-03-05transient-infix-read: Use current value as initial inputJonas Bernoulli
Usually the infix is unset if invoked while it has value. It then has to be invoked a second time to set another value. During that second value the previous value is used as initial-input because it was previously added to the history and we already explicitly use that here. However when `always-read' is non-nil, the infix isn't toggled off like this and we have to pass along the current value as initial- input on the first and only invocation.
2026-03-03manual: Update recommendation for visually impaired usersJonas Bernoulli
2026-03-03transient-use-accessible-values: New optionJonas Bernoulli
2026-03-03transient-{argument,value}-face: New functionsJonas Bernoulli
2026-03-03transient-use-accessible-formats: New optionJonas Bernoulli
2026-03-03transient-prefer-reading-value: New optionJonas Bernoulli
2026-03-03manual: Use term visually impaired where appropriateJonas Bernoulli
2026-03-03manual: Fix typoJonas Bernoulli
2026-02-28Revert "Use functions as format-spec substitutions when supported"Jonas Bernoulli
This reverts commit 77e8aa64e800327b523f0eb675223f63dce62fe5. `format-spec' makes a temporary buffer current for internal purposes. Sadly does not undo that, while evaluating the substitution functions. Our substitution functions expect to be called in the buffer, which was current before this function is called.
2026-02-27manual: Update some FAQJonas Bernoulli