Re: Opening org-cite links with different application

2022-06-02 Thread Max Nikulin
On 01/06/2022 17:33, Alessandro Bertulli wrote: > P.S. Alessandro, could you, please, response to mails using "reply" > button. You messages lack of In-Reply-To and References headers, so at > least thunderbird does not group messages into a thread. Sure, no problem. I usually use vanilla com

Re: Opening org-cite links with different application

2022-06-01 Thread Alessandro Bertulli
> P.S. Alessandro, could you, please, response to mails using "reply" > button. You messages lack of In-Reply-To and References headers, so at > least thunderbird does not group messages into a thread. Sure, no problem. I usually use vanilla compose-mail to answer, probably that's the problem. I a

Re: Opening org-cite links with different application

2022-05-31 Thread Max Nikulin
On 25/05/2022 23:24, Alessandro Bertulli wrote: P.S. I'm afraid I can't follow you: what's the point with mailcap? The idea is to keep associations between file types and handlers in a single place. Emacs does not have support of XDG handlers (at least out of the box) but pretends to have su

Re: Opening org-cite links with different application

2022-05-27 Thread Alessandro Bertulli
Thanks to all for your answers! Max wrote: > I mean >(call-process "xdg-open" nil 0 nil url) > with "sioyek" instead of "xdg-open" if you do not like to set the > application as the default handler for PDF files. It will allow to avoid > additional settings for shell buffers. Of course, you

Re: Opening org-cite links with different application

2022-05-26 Thread Tim Cross
"Bruce D'Arcus" writes: > On Wed, May 25, 2022 at 12:47 PM Max Nikulin wrote: > >> I have had a quick glance into the code I have an additional question >> why `browse-url' is not used for `citar-file-open-external'. > > The "external" here means opening files external to emacs. > > The typica

Re: Opening org-cite links with different application

2022-05-26 Thread Bruce D'Arcus
On Wed, May 25, 2022 at 12:47 PM Max Nikulin wrote: > I have had a quick glance into the code I have an additional question > why `browse-url' is not used for `citar-file-open-external'. The "external" here means opening files external to emacs. The typical use case is someone wanting to use a

Re: Opening org-cite links with different application

2022-05-25 Thread Alessandro Bertulli
Thanks for the suggestion! I wasn't aware of shell-quote-argument, now it seems much more robust: (setq citar-file-open-function '(lambda (file) (async-shell-command (format-message "sioyek %s" (shell-quote-argument

Re: Opening org-cite links with different application

2022-05-25 Thread Max Nikulin
On 25/05/2022 23:00, Bruce D'Arcus wrote: On Wed, May 25, 2022 at 11:26 AM Max Nikulin wrote: On 25/05/2022 18:00, Bruce D'Arcus wrote: You just need to set `citar-file-open-function` to your preferred function; say xdg-open. Is there a reason to avoid emacs global or even system global setti

Re: Opening org-cite links with different application

2022-05-25 Thread Alessandro Bertulli
It's a PDF viewer that tries to display scientific and academic writings at his best. It's actually still experimental, in a way, but it looks promising and, for now, I don't have big problems. Unfortunately, it has vi-style keybindings :-) Anyway, I think I need a lambda because there's not a sin

Re: Opening org-cite links with different application

2022-05-25 Thread Bruce D'Arcus
On Wed, May 25, 2022 at 11:26 AM Max Nikulin wrote: > > On 25/05/2022 21:10, Alessandro Bertulli wrote: > > > > I'm not sure if it's the best way to do so, but it worked for me by > > using a lambda: > > > > (setq citar-file-open-function '(lambda (file) > > (async-shell-command (format-me

Re: Opening org-cite links with different application

2022-05-25 Thread Max Nikulin
On 25/05/2022 21:10, Alessandro Bertulli wrote: I'm not sure if it's the best way to do so, but it worked for me by using a lambda: (setq citar-file-open-function '(lambda (file) (async-shell-command (format-message "sioyek \"%s\"" file First of all, it is unsafe. File names for

Re: Opening org-cite links with different application

2022-05-25 Thread Bruce D'Arcus
Just curious: I'm not familiar with Sioyek (though it looks cool!); why do you need a lambda there? On Wed, May 25, 2022 at 10:10 AM Alessandro Bertulli wrote: > > Thanks! Precise as always. > > I'm not sure if it's the best way to do so, but it worked for me by > using a lambda: > > (setq citar

Re: Opening org-cite links with different application

2022-05-25 Thread Alessandro Bertulli
Thanks! Precise as always. I'm not sure if it's the best way to do so, but it worked for me by using a lambda: (setq citar-file-open-function '(lambda (file) (async-shell-command (format-message "sioyek \"%s\"" file Moreover, since I don't really care about the terminal output of t

Re: Opening org-cite links with different application

2022-05-25 Thread Bruce D'Arcus
On Wed, May 25, 2022 at 6:53 AM Alessandro Bertulli wrote: > How can I make Org open the PDF file of a resource, using an external > application? > > Let me explain: with the point on a org-cite link, pressing C-c C-o asks > me for the resource to open. Selecting the PDF file opens it with > DocV

Opening org-cite links with different application

2022-05-25 Thread Alessandro Bertulli
Hi all! I'm keeping a journal of my research activity with org-cite, and together with citar and vertico, it works great. I have a question though. How can I make Org open the PDF file of a resource, using an external application? Let me explain: with the point on a org-cite link, pressing C-c C