Subject: Re: bug#63648: 29.0.90; project.el: with switch-use-entire-map, switch-project errors on non-project commands

From: Stefan Monnier <[email-masked]>
Date: Fri, 02 Jun 2023 13:07:28 -0400

> And indeed with the following patch replacing the current definition of
> 'project-switch-project' with just:
>
>   (defun project-switch-project (dir)
>     (interactive (list (funcall project-prompter)))
>     (setq next-default-directory dir))

This would be a new "prefix command", like the `universal-argument`,
`C-x RET c`, the `ofw-other-window`, vc-edit-next-command,
`ofw-other-frame` from the `other-frame-window` package, and a few more.

In order for this new prefix to interact correctly with those other
ones, it should probably use `prefix-command-preserve-state` and it
would be good to make it show some visual feedback via
`prefix-command-echo-keystrokes-functions`.

[ Side note: take my opinion with a grain of salt, because I can't
  understand why the above would Do The Right Thing wrt the command's
  docstring.  ]

        Stefan