emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Bruce D'Arcus" <bdarcus@gmail.com>
To: "Bruce D'Arcus" <bdarcus@gmail.com>,
	org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [org-cite, oc-basic] configurable open-at-point, font-locking when json?
Date: Tue, 8 Jun 2021 07:36:12 -0400	[thread overview]
Message-ID: <CAF-FPGMO62DBY4cqFz27T-5i95QgAd5pEHErP1GGx6OnATUzrA@mail.gmail.com> (raw)
In-Reply-To: <87y2bkitus.fsf@nicolasgoaziou.fr>

On Tue, Jun 8, 2021 at 5:33 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > So would it be so simple as doing something like this, to use the
> > bibtex-completion-open function instead?
> >
> > (org-cite-register-processor 'basic
> >   :follow #'bibtex-completion-open)
> >
> > As in, that just tells what function to use for at-point?
> >
> > If yes, that definitely works!
>
> It does, but you're overriding `basic' processor. You could as well
> define your own processor
>
>   (org-cite-register-processor 'bibtex
>     :follow #'bibtex-completion-open)
>
> and use it with
>
>   (setq org-cite-follow-processor 'bibtex)
>
> > I've been a bit slow wrapping my head around the difference between
> > follow and activate, but I think it's starting to become more clear.
>
> Follow is what happens when you use C-o on a citation. Activate is run
> in the background during font-lock.

That's a very clear explanation!

So I'm trying to get this working now.

Here's what I want:

- "basic" font-locking
- bibtex-completion-open-any for C-o

If I understand correctly, the below minimal config should work, but
does not; as in, no font-locking, and C-o returns a "no link found".

What am I doing wrong?

(require 'oc-basic)
(require 'bibtex-completion)

(org-cite-register-processor 'bibtex
    :follow #'bibtex-completion-open-any)

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

Bruce


  reply	other threads:[~2021-06-08 11:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 16:53 [org-cite, oc-basic] configurable open-at-point, font-locking when json? Bruce D'Arcus
2021-06-07 18:46 ` Bruce D'Arcus
2021-06-07 21:14 ` Nicolas Goaziou
2021-06-07 21:27   ` Bruce D'Arcus
2021-06-07 21:57     ` Bruce D'Arcus
2021-06-08  9:33     ` Nicolas Goaziou
2021-06-08 11:36       ` Bruce D'Arcus [this message]
2021-06-08 13:07         ` Bruce D'Arcus
2021-06-08 20:25           ` Nicolas Goaziou
2021-06-08 21:02             ` Bruce D'Arcus
2021-06-09 11:32             ` Bruce D'Arcus
2021-06-09 15:46               ` Nicolas Goaziou
2021-06-08  2:20   ` Matt Price
2021-06-08  9:29     ` Nicolas Goaziou
2021-06-08 21:03       ` Matt Price

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=CAF-FPGMO62DBY4cqFz27T-5i95QgAd5pEHErP1GGx6OnATUzrA@mail.gmail.com \
    --to=bdarcus@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).