emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix ob-smiles using old org API.
@ 2021-03-18  7:18 Lein Matsumaru
  2021-03-19  4:43 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: Lein Matsumaru @ 2021-03-18  7:18 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bastien

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

As subject says, it does not get updated, so I did.


[-- Attachment #2: 0001-ob-smiles.el-Update-org-babel-API.patch --]
[-- Type: text/x-patch, Size: 1159 bytes --]

From 24fe077429a83c4c4a48d873b03627782de0b883 Mon Sep 17 00:00:00 2001
From: Lein Matsumaru <appleprincess@appleprincess.io>
Date: Tue, 16 Mar 2021 10:52:18 +0000
Subject: [PATCH] ob-smiles.el: Update org babel API

* contrib/lisp/ob-smiles.el (org-link): Fix from org-add-link-type to
org-link-set-parameters

TINYCHANGE
---
 contrib/lisp/ob-smiles.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/contrib/lisp/ob-smiles.el b/contrib/lisp/ob-smiles.el
index 9f4f14080..77d7e11c4 100644
--- a/contrib/lisp/ob-smiles.el
+++ b/contrib/lisp/ob-smiles.el
@@ -14,7 +14,10 @@
 ;; Maintainer: stardiviner [numbchild@gmail.com]
 
 ;;; Code:
-\f
+
+(require 'ob)
+(require 'org-element)
+
 ;; Org-mode Babel
 (defun org-babel-execute:smiles (body params)
   "Execute SMILES babel `BODY' with `PARAMS'."
@@ -36,10 +39,10 @@
      ((eq 'html backend)
       (format "<a href=\"#%s\">%s</a>" name name)))))
 
-(org-add-link-type
+(org-link-set-parameters
  "molecule"
- 'molecule-jump
- 'molecule-export)
+ :follow 'molecule-jump
+ :export 'molecule-export)
 
 ;; org-mode element
 (org-element-map (org-element-parse-buffer)
-- 
2.30.1


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

* Re: [PATCH] Fix ob-smiles using old org API.
  2021-03-18  7:18 [PATCH] Fix ob-smiles using old org API Lein Matsumaru
@ 2021-03-19  4:43 ` Kyle Meyer
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2021-03-19  4:43 UTC (permalink / raw)
  To: Lein Matsumaru; +Cc: Bastien, emacs-orgmode

Lein Matsumaru writes:

> As subject says, it does not get updated, so I did.
[...]
> Subject: [PATCH] ob-smiles.el: Update org babel API

Thanks.  Pushed (1738b455b), along with a follow-up commit that fixes
the free variable reference in molecule-jump.

Note that the plan is to move contrib/ to a separate repo [1], with the
eventual goal of each file being maintained elsewhere, in case you or
others are interested.

  [1] https://orgmode.org/list/87wnzfy60h.fsf@bzg.fr


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

end of thread, other threads:[~2021-03-19  4:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-18  7:18 [PATCH] Fix ob-smiles using old org API Lein Matsumaru
2021-03-19  4:43 ` Kyle Meyer

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