summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-06-01Release version 0.9.0v0.9.0Jonas Bernoulli
2025-05-30Keep inhibiting quitting when entering submenuJonas Bernoulli
Re #388.
2025-05-29Inhibit quitting while a menu is activeJonas Bernoulli
Like the somewhat similar but much less complex `read-key-sequence', for example, Transient menus should inhibit quitting, otherwise C-g might, for example, kill some subprocess, when the user intended to exit the menu. Due to how Transient is implemented, there is nothing around which we could let-bind `inhibit-quit', like that is usually done. Instead we have to set the global value and make sure we reset that when exiting the menu. The resetting has to happen on `post-command-hook' but at that time a let-binding for `inhibit-quit' is in effect, so we have to use `set-default-toplevel-value', instead of `setq'. Closes #388.
2025-05-26manual: Omit LEVEL in transient-information exampleJonas Bernoulli
Positional LEVEL is semi-deprecated.
2025-05-26Provide shorthand to define transient-cons-option suffixesJonas Bernoulli
Command-line switches can be defined inline in a prefix definition like so: ("-s" "My switch" "--switch") ("-o" "My option" "--option=") Support something similar for `transient-cons-option': ("c" "My option" :cons option) ("o" :cons other-option) ("r" :cons number-option :reader read-number)
2025-05-26transient-cons-option: New suffix class for non-cmdline optionsJonas Bernoulli
The existing `transient-option' class is suitable for options passed to commands. A suffix that uses that class may represent an argument such as "--option". In the list returned by `transient-args', that argument and its value, "value", is represented as one element "--option=value". For "options" that are not passed to a command that is not appropriate. A caller that wants to extract the value of such an option would have to parse that string. `transient-arg-value' can help with that, but it always returns a string (or nil). The new `transient-cons-option' class provides a more direct way to deal with "non-command-line options", by representing the key value pair using a cons-cell (ARGUMENT . VALUE), not just internally, but in particular when handing it of to a caller. VALUE can have any printable type and ARGUMENT can have any printable type, expect string. We cannot use the term "key" because that is already used to the key binding for the command. Also avoid using "property" because that implies a property list, while the value returned by `transient-args' is an alist when all infixes use the `transient-cons-options' class. Sticking to "argument" also has the advantage, that we don't have to implement or generalize a dozen methods.
2025-05-26transient-prompt(infix): Support non-string arguments and variablesJonas Bernoulli
2025-05-26transient-echo-arguments: Only prettify if all arguments are stringsJonas Bernoulli
2025-05-26transient--match-child: Use transient--suffix-keyJonas Bernoulli
2025-05-26transient--suffix-key: Renamed functionJonas Bernoulli
Include "suffix" in the name, same as in `transient--suffix-props'. The name of the argument ("spec") should be enough to make it clear what the expected form of the "suffix" is.
2025-05-20transient--init-suffix: Fix regression on Emacs 28Jonas Bernoulli
On newer releases (kbd nil) returns "", but when using Emacs 28 it signals an error. Closes #5376.
2025-05-16Regenerate manualJonas Bernoulli
2025-05-16Update changelogJonas Bernoulli
2025-05-16Update manualJonas Bernoulli
2025-05-16Add testsJonas Bernoulli
2025-05-16Prefer quoting top-level included groupsJonas Bernoulli
That's only natural, given that the group vectors are self-quoting, while the values in the preceding property list are evaluated. For backward compatibility the quoting is optional, for now at least.
2025-05-16Improve format of layout and handling of included groupsJonas Bernoulli
- Improve the internal format used to store layouts. This makes handling easier and results in prettier pretty-printing. - Store the level property in the same plist for all other properties. - Reduce nesting of elements. - Wrap a prefix's top-level groups in a vector, which has the same form the vectors used for actual groups, except that its first element specifies the layout format version (currently 2), instead of the group class. Previously a raw list was used, which had the considerable disadvantage that the top-level required special cases, compared to groups and suffixes found at deeper levels. - When encountering a layout that still used the old format, convert it on the fly and update the store layout. - No longer inline included groups by default. - Store the symbol that identifies the separately defined group in the layout of the prefix (or other group) that includes it. Previously its expansion was immediately inlined. - When modifying an included group, either directly or via a prefix which includes it, then this affects all prefixes that include it. - The new function `transient-inline-group' can be used in the rare case that this is not desirable. - Instead of group vectors that macro also accepts suffix lists as arguments, to maintain the ability to include lists of suffixes, not just individual groups or list of groups. However, this is semi-deprecated and undocumented. - The new function `transient-define-group' can be used to define a group or set of groups, to be included in prefixes. It stores the layout the same way as `transient-define-prefix', in parsed form.
2025-05-16transient--get-children: New aliasJonas Bernoulli
It won't remain an alias for long.
2025-05-16transient--suffix-props: New aliasJonas Bernoulli
That's preferable to hardcoding a magical number in several places, and makes it possible to identify all places where we access suffix property lists.
2025-05-16transient-parse-suffix: Accept object as prefixJonas Bernoulli
And if PREFIX is a symbol, actually assert that it identifies a prefix.
2025-05-16transient-get-suffix: CosmeticsJonas Bernoulli
2025-05-16transient-get-suffix: Move definitionJonas Bernoulli
2025-05-16transient--insert-suffix: CosmeticsJonas Bernoulli
2025-05-16transient-define-prefix: Rename a local variableJonas Bernoulli
2025-05-16transient--group-member: Rename a local variableJonas Bernoulli
2025-05-16transient--layout-member: Rename a local variableJonas Bernoulli
2025-05-16transient--{set,get}-layout: New functionsJonas Bernoulli
2025-05-16Support prefix coordinates specified using vectorsJonas Bernoulli
2025-05-16Require all key bindings to be specified as key descriptionsJonas Bernoulli
No longer support vectors. This change isn't backward compatible but I haven't seen a vector being used even just once. It also makes sense to take inspiration from `keymap-set' et al., which didn't exist when Transient was created. However, we continue to be more permissive than those functions, only insisting on strings understood by `kbd', including strings that do not satisfy `key-valid-p'. Being more permissive makes it possible, for example, to write the key binding, which toggles the "-a" command line argument, as "-a", instead of having to write "- a". Likewise additional spaces can be added, which are not removed when displaying the binding in the menu, which is useful for alignment purposes.
2025-05-16make: CosmeticsJonas Bernoulli
2025-05-11Fix typosJonas Bernoulli
2025-05-09Add .dir-locals.elJonas Bernoulli
2025-05-09make: Do not needlessly quote every comma in generated texi filesJonas Bernoulli
This counters Org commit 39264d3d41213085502dc0c2572f50855ea587a1.
2025-05-01Release version 0.8.8v0.8.8Jonas Bernoulli
2025-05-01Bump compat dependencyJonas Bernoulli
2025-04-30Update changelogJonas Bernoulli
2025-04-29Suspend text-conversion-style earlierJonas Bernoulli
From the docstring of `text-conversion-style', which appears to also apply to `overriding-text-conversion-style': > This variable does not take immediate effect when set; rather, it > takes effect upon the next redisplay after the selected window or > its buffer changes. If we trigger the suspension before we create the transient window and buffer, which causes a redisplay, then our setting has a chance to kick in. Re #376.
2025-04-28Suspend text-conversion-style while transient is activeJonas Bernoulli
It has been reported that this is necessary on Android and the author of the Android port suspends this for Isearch too, see [1: 2dcce30290d]. We set `overriding-text-conversion-style' instead of the buffer-local `text-conversion-style' because some menus allow switching to another buffer while the menu is still active. Closes #376. Closes #377. 1: 2023-02-16 2dcce30290dc7782e9de3b4adf59f38b42408c98 Update Android port
2025-04-28Update changelogJonas Bernoulli
2025-04-23transient--expand-define-args: Advertise calling conventionJonas Bernoulli
2025-04-18Reduce usage of the term "popup"Jonas Bernoulli
2025-04-15transient-common-command-prefix: New optionJonas Bernoulli
2025-04-15transient-common-commands: CosmeticsJonas Bernoulli
2025-04-15manual: Document transient-error-on-insert-failureJonas Bernoulli
2025-04-15transient--insert-suffix: Do not signal error by defaultJonas Bernoulli
In [1: 8daf9890] we started to signal an error instead of merely showing a message on failure. That was a mistake, see #374. Add new option `transient-error-on-insert-failure', so users can opt-in to fatal errors for minor issues. 1: 2025-03-24 8daf9890ee65335a23eebc8919e9cfdd7c7249eb transient--insert-suffix: Signal error if location is invalid
2025-04-01Release version 0.8.7v0.8.7Jonas Bernoulli
2025-04-01Bump compat dependencyJonas Bernoulli
2025-04-01Update changelogJonas Bernoulli
2025-03-28transient--init-suffix: Load autoloaded command earlierJonas Bernoulli
Do so before trying to access the prototype suffix object.
2025-03-24transient--insert-suffix: Signal error if location is invalidJonas Bernoulli
Closes #374.