From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Opening org-cite links with different application
Date: Wed, 25 May 2022 23:46:39 +0700 [thread overview]
Message-ID: <t6lmhg$auv$1@ciao.gmane.io> (raw)
In-Reply-To: <CAF-FPGOxK2Asa2dHOmS87F2=z84_d4-1pRcy1PEcGSUT2ruZ=Q@mail.gmail.com>
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 settings
>> obtained through mailcap.el? While `mailcap-view-file' is quite new
>> addition, the function was inspired by `org-open-file' and the latter
>> queries mailcap settings.
>
> No reason, other than that nobody suggested it.
>
> It could be, however, that when using citar, some users may have more
> specialized needs. For example, maybe Alessandro wants to use Sioyek
> when reading PDFs of scholarly articles and such, but the standard
> system PDF viewer otherwise.
>
> But I suppose these aren't mutually exclusive; citar could always,
> notwithstanding the bug you note below, fallback to making use of
> mailcap?
Disclaimer: I am not a citar user, so be skeptic concerning my
suggestions. I suppose `mailcap-view-file' (when available) and
`org-open-file' are at least reasonable defaults when a user has
expressed their wishes by configuring citar.
It would be great to open the cited document at the particular page
(e.g. from the locator), but there are a lot of complications on this
way. The file may contain only a range of pages, every PDF viewer has
its own way to specify a page or a string to search for. `org-file-apps'
might be tuned for such purpose (modulo a bug in handling of additional
arguments).
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'.
On 25/05/2022 23:24, Alessandro Bertulli wrote:
> I can't use browse-url-xdg-open because the PDF viewer I want to use
> it's not the system default one: when opening PDFs from Org-cite I
> expect to open academic documents, so I use Sioyek for them.
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 will loose ability
to check command output for errors, it is shoot and forget method
suitable for most of viewers however.
next prev parent reply other threads:[~2022-05-25 16:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 14:10 Opening org-cite links with different application Alessandro Bertulli
2022-05-25 14:49 ` Bruce D'Arcus
2022-05-25 15:21 ` Max Nikulin
2022-05-25 16:00 ` Bruce D'Arcus
2022-05-25 16:46 ` Max Nikulin [this message]
2022-05-26 18:45 ` Bruce D'Arcus
2022-05-26 22:17 ` Tim Cross
-- strict thread matches above, loose matches on Subject: below --
2022-05-27 11:15 Alessandro Bertulli
2022-05-25 16:24 Alessandro Bertulli
2022-05-31 14:53 ` Max Nikulin
2022-06-01 10:33 ` Alessandro Bertulli
2022-06-02 15:53 ` Max Nikulin
2022-05-25 16:16 Alessandro Bertulli
2022-05-25 10:52 Alessandro Bertulli
2022-05-25 11:00 ` Bruce D'Arcus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='t6lmhg$auv$1@ciao.gmane.io' \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).