GNU bug report logs -
#78099
[PATCH] Make 'project-remember-project' interactive
Previous Next
Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>
Date: Sun, 27 Apr 2025 20:19:02 UTC
Severity: normal
Tags: patch
Fixed in version 31.1
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 78099 <at> debbugs.gnu.org (full text, mbox):
> Sometimes when creating a new project it is not added to project list.
> AFAIK the only way to do it is using `project-remember-projects-under'
> or `project-switch-project' but they are uncomfortable to use when you
> just want to remember the current project you're in.
>
> So I decided to make `project-remember-project' interactive in this
> patch for archive this; this let to users use it in hooks (e.g
> find-file-hook)
For the same purpose I added an advice to functions like
'read-directory-name' and 'vc-dir' with the trick to
call 'project-current' that remembers a new project:
(define-advice vc-dir (:after (dir &optional _backend) add-project)
(when (featurep 'project)
;; Add current vc project dir to project list
(let ((default-directory dir))
(project-current))))
But maybe `project-remember-project' would be more correct to use here.
This bug report was last modified 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.