emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] oc-bibtex.el: add :follow property from oc-basic
@ 2021-10-21 14:28 Eric S Fraga
  2021-10-21 15:27 ` Bruce D'Arcus
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2021-10-21 14:28 UTC (permalink / raw)
  To: Emacs Org mode mailing list

[-- 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


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

end of thread, other threads:[~2021-10-21 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 14:28 [PATCH] oc-bibtex.el: add :follow property from oc-basic Eric S Fraga
2021-10-21 15:27 ` 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

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).