embark
embark copied to clipboard
Actions on file selected relative to project path is attempted on a path relative to the file of the open buffer
I observe some unexpected behaviour when trying to embark-act on files found using consult-projectile-find-file. Is the following a bug, something I've missed in my configuration? (I'm hoping it's not an unreasonable expectation.)
Steps
- Open a file in a project (I'm using
projectile), e.g.<proj root>/.github/workflows/test.yaml. - Run
consult-projectile-find-fileand find a file in another part of the project, e.g.<proj root>/tests/e2e-tests/runtest.sh. - Run
embark-acton the file, and choose to delete it, i.e. pressingd(in my setup at least). - Answer the question
Run delete-file on tests/e2e-tests/runtest.sh? (y or n)with 'y'.
Expected behaviour
The file <proj root>/tests/e2e-tests/runtest.sh is deleted from the filesystem.
Observed behaviour
What I get is a the following in the *Messages* buffer:
embark PCH: (error "Cannot <proj root>/.github/workflows/tests/e2e-tests/viswiz.sh to trash: Permission denied")
I thought embark had some fancy footwork with default-directory to avoid this problem. I'll look into it. I have a vague recollection of testing this with project.el, maybe projectile does something different (or maybe I'm wrong about this working with project.el).