emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: [PATCH] oc-bibtex.el: add :follow property from oc-basic
Date: Thu, 21 Oct 2021 15:28:59 +0100	[thread overview]
Message-ID: <87pmrysb84.fsf@ucl.ac.uk> (raw)

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

Hello all,

I may be violating some coding convention but the attached patch re-uses
the org-cite-basic-goto function from the basic org-cite processor to
implement the follow directive for the bibtex processor.  Seemed like an
obvious win...

Seems to work just fine for me.  I do wonder: should I somehow declare
the function that is being used in oc-bibtex.el given that it is defined
in oc-basic.el?  (my lack of elisp-foo showing here)

Thank you,
eric

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-149-g781080
: Latest paper written in org: https://arxiv.org/abs/2106.05096

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-oc-bibtex.el-add-follow-property-from-oc-basic.patch --]
[-- Type: text/x-diff, Size: 860 bytes --]

From 297213bcff8f7f743ab0ce36f940d28385e6eb0f Mon Sep 17 00:00:00 2001
From: Eric S Fraga <e.fraga@ucl.ac.uk>
Date: Thu, 21 Oct 2021 15:20:43 +0100
Subject: [PATCH] oc-bibtex.el: add :follow property from oc-basic

* oc-bibtex.el (org-cite-register-processor): Specify the function for
the follow directive as the function defined for the basic org-cite
processor.
---
 lisp/oc-bibtex.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/oc-bibtex.el b/lisp/oc-bibtex.el
index 52dfa0fca..866c51c15 100644
--- a/lisp/oc-bibtex.el
+++ b/lisp/oc-bibtex.el
@@ -79,6 +79,7 @@ state, as a property list."
 (org-cite-register-processor 'bibtex
   :export-bibliography #'org-cite-bibtex-export-bibliography
   :export-citation #'org-cite-bibtex-export-citation
+  :follow #'org-cite-basic-goto
   :cite-styles
   '((("nocite" "n"))
     (("nil"))))
-- 
2.30.2


             reply	other threads:[~2021-10-21 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 14:28 Eric S Fraga [this message]
2021-10-21 15:27 ` [PATCH] oc-bibtex.el: add :follow property from oc-basic Bruce D'Arcus
2021-10-21 15:58   ` Eric S Fraga
2021-10-21 16:18     ` Bruce D'Arcus
2021-10-21 16:27       ` Eric S Fraga
2021-10-21 16:50       ` Eric S Fraga

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=87pmrysb84.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --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).