bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix


From: Juri Linkov
Subject: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command
Date: Wed, 06 Dec 2023 19:10:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> So... something like this?
>
> @@ -1861,9 +1861,10 @@ project-any-command
>      (when command
>        ;; We could also check the command name against "\\`project-",
>        ;; and/or (get command 'project-command).
> -      (map-keymap
> -       (lambda (_evt cmd) (if (eq cmd command) (setq found t)))
> -       project-prefix-map)
> +      (unless (get command 'project-switch-with-default-directory)
> +        (map-keymap
> +         (lambda (_evt cmd) (if (eq cmd command) (setq found t)))
> +         project-prefix-map))
>        (if found
>            (let ((project-current-directory-override root))
>              (call-interactively command))

Why not let-bind both variables for all commands:
'project-current-directory-override' and 'default-directory'?

Then project commands will pick up the first:

  (or project-current-directory-override default-directory)

And non-project commands will just ignore
'project-current-directory-override'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]