Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not auto selecting current project #67

Open
rileyrg opened this issue Jan 20, 2025 · 3 comments
Open

not auto selecting current project #67

rileyrg opened this issue Jan 20, 2025 · 3 comments

Comments

@rileyrg
Copy link

rileyrg commented Jan 20, 2025

I was expecting this to detect the .project in my current directory and default to the TODO there. It doesnt. Instead, I get a completing read of all projects project is aware of. Is there something I'm missing?

  (use-package org-project-capture
    :custom
    (org-project-capture-default-backend  (make-instance 'org-project-capture-project-backend))
    :config
    (org-project-capture-per-project)
    :bind  (:map project-prefix-map ("t" . org-project-capture-project-todo-completing-read)))
@colonelpanic8
Copy link
Owner

Yes. There is a function that generates a capture template for you. If you want to capture to the current project, you should use org-capture with that capture template.

@colonelpanic8
Copy link
Owner

There is also org-project-capture-capture-for-current-project

@rileyrg
Copy link
Author

rileyrg commented Jan 21, 2025

Yes. There is a function that generates a capture template for you. If you want to capture to the current project, you should use org-capture with that capture template.

Sorry, but I'm not sure what you mean there. A function that generates a capture template? What function? If you have an example that would be super.

There is also org-project-capture-capture-for-current-project

If I bind that to project's map it says "Wrong type argument: stringp, nil" when I launch it.

apply: Wrong type argument: stringp, (vc Git "~/development/projects/cmake/cmake-3.31.3-tutorial-source/Step4/")

Note that this directory has a ".project" file but the git root is further up the chain.

Apologies if this is all simple, but I'm not getting it all and am not really familiar with the make-instance approach.

  (use-package org-project-capture
    :demand t
    :config
    (setq org-project-capture-default-backend (make-instance 'org-project-capture-project-backend))
    (setq org-project-capture-strategy (make-instance 'org-project-capture-per-project-strategy))
    :bind  (:map project-prefix-map ("t" .  org-project-capture-capture-for-current-project)))


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants