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

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Mon, 22 May 2023 16:29:02 UTC

Severity: normal

Found in version 29.0.90

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> linkov.net>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 63648 <at> debbugs.gnu.org, Spencer Baugh <sbaugh <at> janestreet.com>
Subject: bug#63648: 29.0.90; project.el: with switch-use-entire-map, switch-project errors on non-project commands
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





This bug report was last modified 1 year and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.