|
From: | Dmitry Gutov |
Subject: | bug#63648: 29.0.90; project.el: with switch-use-entire-map, switch-project errors on non-project commands |
Date: | Sun, 5 Nov 2023 02:55:41 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 04/11/2023 19:28, Juri Linkov wrote:
How about this, then? project-switch-use-global-map is obsoleted, all variations are accessible through customizing project-switch-commands. Should have better discoverability for project-prefix-or-any-command than simply having it included.I don't know, it's extra trouble for users to migrate from the obsoleted project-switch-use-entire-map. But maybe ok.I couldn't find a better alternative to keep the behavior compatible. Either we have the user customize an existing var (this was the option where they'd set project-switch-commands to `project-prefix-or-any-command', which you didn't like), or we would add a yet another custom var which would, conceptually, conflict with the two existing ones.I don't dislike it.
Very good.
I proposed a new option project-switch-use-global-map.
I didn't know how the reconcile the existence of both project-switch-use-entire-map and project-switch-use-global-map. Saying in both docstrings that one takes priority over the other (and possibly repeating that in the doc for project-switch-commands) would be awkward.
But when project-switch-commands should be customized instead of new option, then I'd prefer to use function names like `project-prefix-or-any-command' instead of symbols `short-or-any' and `short-keys'.Unifying all three alternatives in one option seems like the logical choice.To avoid obsoleting `project-switch-use-entire-map', `short-keys' could be removed. Then `short-or-any' could be replaced by `project-prefix-or-any-command'. This will introduce minimal changes.
All right, that sounds like a mix between v4 and v5. I've pushed 41e801fea1c to master, please take a look.In the future, perhaps we'd want to obsolete the option project-switch-use-entire-map anyway, replacing it with a separate command to be used in the same way as the newly-added one. But for now the change is maximally backward-compatible.
I'm still not sure personally about the prompt in project-prefix-or-any-command (short and not differentiating from project-any-command), but let's see what others think and propose later.
[Prev in Thread] | Current Thread | [Next in Thread] |