emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [org-cite, oc-csl] citation fontification and previews?
@ 2021-05-28 12:17 Bruce D'Arcus
  2021-05-28 12:27 ` Bruce D'Arcus
  2021-05-28 17:43 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Bruce D'Arcus @ 2021-05-28 12:17 UTC (permalink / raw)
  To: org-mode-email

In an earlier discussion, people raised the issue of fontification and previews.

But I'm wondering what Nicolas has already implemented, and what he or
others might still add.

Details:

John Kitchin (based on his experience with org-ref):

https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00438.html

He suggested a green face for known references, and red for unknown.

I think Nicolas implemented this basic idea somewhere, but I am not
noticing it; I don't see any difference with incorrect keys.

John also suggested a tooltip preview of the roughly formatted reference.

Again, I thought Nicolas had earlier implemented this, but I don't see
it ATM; hovering over keys doesn't do anything.

András Simyoni:

https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00289.html

He was thinking about using citeproc-el to attach some kind of preview as well.

"I'm thinking about implementing a "fontification" solution which would
use citeproc-el with a standard style to produce nice preview-like
representations of the citations in the buffer. This would require
basically the same pieces of information as citation export I think,
although it might be made strictly  local, working only with the
single citation object plus the bibliography information."

Timothy:

https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00456.html

He was thinking about previews as well, with overlays:

"I think what would be ideal, would be if common citation styles could
define a method which produces a display string, like "Goaziou et al.
(2021)". If nothing is defined, then no overlay should be produced."

And my reply to him, based on the example of Zettlr:

https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00462.html

I think that example would imply overlays as well, though I don't
really understand all the technical details or org-specific pros and
cons (tooltips vs overlays and such), but am just wondering:

1. what is already included, and what should ship default? Perhaps
Andras' idea would fit for oc-csl, since it already depends on
citeproc-el?
2. if some is not included, say preview, how would one add that? I
assume the API supports it; so one would just install, say, a little
package and add that as a "follow" processor? And one could add
multiple such processors?

Bruce


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [org-cite, oc-csl] citation fontification and previews?
  2021-05-28 12:17 [org-cite, oc-csl] citation fontification and previews? Bruce D'Arcus
@ 2021-05-28 12:27 ` Bruce D'Arcus
  2021-05-28 17:43 ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Bruce D'Arcus @ 2021-05-28 12:27 UTC (permalink / raw)
  To: org-mode-email

On Fri, May 28, 2021 at 8:17 AM Bruce D'Arcus <bdarcus@gmail.com> wrote:

> I think that example would imply overlays as well, though I don't
> really understand all the technical details or org-specific pros and
> cons (tooltips vs overlays and such) ...

I guess one could combine approaches; a compact display inline, and
the full bibliographic entry accessed by hovering over a key?

Bruce


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [org-cite, oc-csl] citation fontification and previews?
  2021-05-28 12:17 [org-cite, oc-csl] citation fontification and previews? Bruce D'Arcus
  2021-05-28 12:27 ` Bruce D'Arcus
@ 2021-05-28 17:43 ` Nicolas Goaziou
  2021-05-28 17:55   ` Bruce D'Arcus
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2021-05-28 17:43 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email

"Bruce D'Arcus" <bdarcus@gmail.com> writes:

> In an earlier discussion, people raised the issue of fontification and previews.
>
> But I'm wondering what Nicolas has already implemented, and what he or
> others might still add.
>
> Details:
>
> John Kitchin (based on his experience with org-ref):
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00438.html
>
> He suggested a green face for known references, and red for unknown.
>
> I think Nicolas implemented this basic idea somewhere, but I am not
> noticing it; I don't see any difference with incorrect keys.

You need to use "basic" processor for activation. It only supports
".bib" files.

> John also suggested a tooltip preview of the roughly formatted reference.
>
> Again, I thought Nicolas had earlier implemented this, but I don't see
> it ATM; hovering over keys doesn't do anything.

I sent a POC, but I didn't implement it in "oc-basic", tho.

> András Simyoni:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00289.html
>
> He was thinking about using citeproc-el to attach some kind of preview as well.
>
> "I'm thinking about implementing a "fontification" solution which would
> use citeproc-el with a standard style to produce nice preview-like
> representations of the citations in the buffer. This would require
> basically the same pieces of information as citation export I think,
> although it might be made strictly  local, working only with the
> single citation object plus the bibliography information."
>
> Timothy:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00456.html
>
> He was thinking about previews as well, with overlays:
>
> "I think what would be ideal, would be if common citation styles could
> define a method which produces a display string, like "Goaziou et al.
> (2021)". If nothing is defined, then no overlay should be produced."
>
> And my reply to him, based on the example of Zettlr:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00462.html
>
> I think that example would imply overlays as well, though I don't
> really understand all the technical details or org-specific pros and
> cons (tooltips vs overlays and such), but am just wondering:
>
> 1. what is already included, and what should ship default? Perhaps
> Andras' idea would fit for oc-csl, since it already depends on
> citeproc-el?

"oc-csl" could also handle the "activate" capacity. So could Org Ref.

> 2. if some is not included, say preview, how would one add that? I
> assume the API supports it; so one would just install, say, a little
> package and add that as a "follow" processor? And one could add
> multiple such processors?

You can only have one "activate" processor at a time. However, that
processor may itself be extensible.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [org-cite, oc-csl] citation fontification and previews?
  2021-05-28 17:43 ` Nicolas Goaziou
@ 2021-05-28 17:55   ` Bruce D'Arcus
  2021-05-28 19:59     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce D'Arcus @ 2021-05-28 17:55 UTC (permalink / raw)
  To: Bruce D'Arcus, org-mode-email

On Fri, May 28, 2021 at 1:43 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > In an earlier discussion, people raised the issue of fontification and previews.
> >
> > But I'm wondering what Nicolas has already implemented, and what he or
> > others might still add.
> >
> > Details:
> >
> > John Kitchin (based on his experience with org-ref):
> >
> > https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00438.html
> >
> > He suggested a green face for known references, and red for unknown.
> >
> > I think Nicolas implemented this basic idea somewhere, but I am not
> > noticing it; I don't see any difference with incorrect keys.
>
> You need to use "basic" processor for activation. It only supports
> ".bib" files.

Beyond requiring oc-basic (or any other "activate" processor), do I
need to do anything more to "use" it?

...

> > I think that example would imply overlays as well, though I don't
> > really understand all the technical details or org-specific pros and
> > cons (tooltips vs overlays and such), but am just wondering:
> >
> > 1. what is already included, and what should ship default? Perhaps
> > Andras' idea would fit for oc-csl, since it already depends on
> > citeproc-el?
>
> "oc-csl" could also handle the "activate" capacity. So could Org Ref.
>
> > 2. if some is not included, say preview, how would one add that? I
> > assume the API supports it; so one would just install, say, a little
> > package and add that as a "follow" processor? And one could add
> > multiple such processors?
>
> You can only have one "activate" processor at a time. However, that
> processor may itself be extensible.

So then it might be ideal to have oc-csl be such an extensible
"activate" processor then?

From what John has said here, it's likely to be quite awhile before we
see an org-ref rewritten for org-cite.

Bruce


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [org-cite, oc-csl] citation fontification and previews?
  2021-05-28 17:55   ` Bruce D'Arcus
@ 2021-05-28 19:59     ` Nicolas Goaziou
  2021-05-28 20:40       ` Bruce D'Arcus
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2021-05-28 19:59 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email

"Bruce D'Arcus" <bdarcus@gmail.com> writes:

> Beyond requiring oc-basic (or any other "activate" processor), do I
> need to do anything more to "use" it?

You need to associate it to the "active" capability:

  (setq org-cite-activate-processor 'basic)

(or with a file-local variable).

> So then it might be ideal to have oc-csl be such an extensible
> "activate" processor then?

It could be a good basis.

> From what John has said here, it's likely to be quite awhile before we
> see an org-ref rewritten for org-cite.

Maybe it provides interface we could write a thin wrapper with, and plug
it into the activate function.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [org-cite, oc-csl] citation fontification and previews?
  2021-05-28 19:59     ` Nicolas Goaziou
@ 2021-05-28 20:40       ` Bruce D'Arcus
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce D'Arcus @ 2021-05-28 20:40 UTC (permalink / raw)
  To: Bruce D'Arcus, org-mode-email

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

On Fri, May 28, 2021 at 3:59 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > Beyond requiring oc-basic (or any other "activate" processor), do I
> > need to do anything more to "use" it?
>
> You need to associate it to the "active" capability:
>
>   (setq org-cite-activate-processor 'basic)
>
> (or with a file-local variable).
>
> > So then it might be ideal to have oc-csl be such an extensible
> > "activate" processor then?
>
> It could be a good basis.
>
> > From what John has said here, it's likely to be quite awhile before we
> > see an org-ref rewritten for org-cite.
>
> Maybe it provides interface we could write a thin wrapper with, and plug
> it into the activate function.

What would "it" be here?

Org-ref, or pieces of it?

In any case, I was thinking previewing of some sort would be valuable
initially, and as Andras noted, citeproc-el is well-positioned to provide
that.

But it would be natural to potentially want to enhance that functionality
later, as your mention of "extensibility" suggests.

I do in general imagine that org-cite will provide a foundation for smaller
packages that can enhance the functionality in flexible ways; not so much
large monolithic packages, even if those are also possible.

[-- Attachment #2: Type: text/html, Size: 1812 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-28 20:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 12:17 [org-cite, oc-csl] citation fontification and previews? Bruce D'Arcus
2021-05-28 12:27 ` Bruce D'Arcus
2021-05-28 17:43 ` Nicolas Goaziou
2021-05-28 17:55   ` Bruce D'Arcus
2021-05-28 19:59     ` Nicolas Goaziou
2021-05-28 20:40       ` Bruce D'Arcus

Code repositories for project(s) associated with this 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).