[LyX/master] New attempt on #9906: allow following hyperlinks via context menu.

Scott Kostyshak skostysh at lyx.org
Mon Aug 17 04:24:07 UTC 2020


On Mon, Aug 17, 2020 at 12:10:24AM +0200, Pavel Sanda wrote:

> Attached is updated patch.
> For a given citation it does:
> 1. check for existence of file= field in bib file, if found launch pdf viewer.
> 2. else check for existence of DOI/URL in bib file. If found launch browser with DOI/URL
> 3. else trigger external scirpt while giving author's name + year.
> 
> 
> There are several issues:
> a) file= field is not standard bibtex, as I understood it's specific for jabref,
>    which I do not use. Currenly it will work if full path is given but I have
>    no clue what to expect from jabref.
> b) currently only bibtex is supported, because I do not have experience with other
>    engines.
> c) external script name is hardcoded. That's not nice, but given that
>    only coders would be able to use this feature I'm not sure about making
>    it new rc value. We could provide example of such script with proper name
>    and distribute it with our sources.
>    Opinions?
>    
> I think a) needs touch from someone who works with jabref, b) needs someone who is
> using different biblio engine(s).
> 
> So except for c) where I would like to get your feedback I suggest to commit
> what I have and let others fill in the bits, it should be fairly easy with the
> infrastructure already in the place.

I tested the patch. I like the idea and the flexibility of being able to
do whatever I want in the script.

The script seems to be called whenever I choose *any* option from the
context menu, not just the "Open citation content" option.

Regarding the hardcoding, it's hard to think of an alternative. If we
stick with the hardcoding, perhaps at least prefix the name with "lyx"?
The only alternative I could think of would be to require the user to
define a new file format "Citation content", where they could then
define their own viewer. But this is just moving the hardcoding from the
binary name to the file format name so that is actually more hackish.

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200817/0327e341/attachment-0001.asc>


More information about the lyx-devel mailing list