You are not logged in.

#1 2019-04-29 10:28:34

slamhound
Member
Registered: 2011-07-26
Posts: 44

Problem using mimeo to open files with emacsclient [SOLVED]

I'm trying to get use mimeo to open pdf files in emacsclient (mostly so I can use fzf and fzf-extras to quickly find and open them). The file type is associated correctly, but mimeo seems to pass the whole path to emacsclient, and then emacs seems to assume it is relative and adds the rest of the path to it, resulting in a file that can't be found. More specifically, the command that mimeo runs if, from the "Downloads" directory, I run

mimeo R1.pdf

is

emacsclient file:///home/rich/Downloads/R1.pdf

But the messages buffer from emacs then reports

File mode specification error: (error epdfinfo: Error opening /home/rich/Downloads/file:/home/rich/Downloads/R1.pdf:No such file or directory)

And just to be clear, this happens with any file type that I want to open with emacsclient and, but if, for instance, I want to open pdfs with Zathura, it works correctly. So it seems to be something about how mimeo interacts with emacsclient. Any advice on how to get mimeo working correctly with emacsclient?

Last edited by slamhound (2019-04-29 21:03:52)

Offline

#2 2019-04-29 19:55:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,776

Re: Problem using mimeo to open files with emacsclient [SOLVED]

I know nothing about mimeo, but there's a significant difference between a file and a url. In the desktop files they're referenced as %F and %U, so if you put "emacsclient %U" somewhere, make that "emacsclient %F".

Offline

#3 2019-04-29 21:03:22

slamhound
Member
Registered: 2011-07-26
Posts: 44

Re: Problem using mimeo to open files with emacsclient [SOLVED]

Ah, thanks! I had actually suspected that that was the issue, and I thought I had tried both %F and %U, but I think that I may have been looking at and modifying different desktop files, and probably did not change the one that mimeo was actually using. I just changed the one that it does use, and that works. Will mark this as solved.

Offline

Board footer

Powered by FluxBB