dired-launch icon indicating copy to clipboard operation
dired-launch copied to clipboard

Supply absolute path to file instead of relative

Open dyereh opened this issue 2 years ago • 3 comments

I noticed some programs (for me drawio) may require you to send the absolute path to open the file correctly (for drawio, if you send the relative path it just opens a blank diagram).

I'm thinking we can just add expand-file-name in the correct places in the dired-launch-with-prompt-command and a small change to dired-launch-command. Would this be worthwhile to look into/have any adverse effects I'm not thinking of.

I can submit a PR if this sounds like a useful change

dyereh avatar Oct 06 '22 18:10 dyereh

For some reason, my drawio seems to work fine with relative paths now.. no idea why.. I still wonder if it would be useful to expand to the abs path regardless?

dyereh avatar Oct 06 '22 20:10 dyereh

I don't think the absolute path idea is a bad one -- in the context of dired-launch, removing ambiguity by using absolute paths should result in identical behavior in most cases. I have a hard time imagining a situation in which it would be problematic to provide an absolute path -- and don't recollect the rationale, if any, for invoking DIRED-GET-MARKED-FILES with LOCALP set to T. If you find a few spare minutes to put something together, a PR certainly would be welcome.

thomp avatar Oct 07 '22 04:10 thomp

Apologies for such a delay - I will try to get to this in the next few weeks & submit a PR. Until then, not sure if you want to leave this issue open?

dyereh avatar Nov 01 '22 13:11 dyereh