doomemacs / doomemacs/core

def-project-mode! :files does not work as documented

Open
#5,781 0 comments 0 reactions 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

When using def-project-mode! i expected that files starting with "." or ".." are treated as relative to buffer/default-directory as documented.
The macro is defined in core/autoload/projects.el.

### What actually happened?

Files are always treated as relative to project root (more specific doom-project-root)

### Describe your attempts to resolve the issue

Checked the implementation and it is based on project-file-exists-p!, that also claims to respect "." and ".." but is implemented as
`(file-exists-p! ,files (doom-project-root))`
and always treating files as project relative when inside a project.

### Steps to reproduce

Check output of e.g. `(project-file-exists-p! "../") from a buffer not directly in project root.

### System Information

https://pastebin.com/7rC05fjE

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.