Skip to content

Commit b9d58d9

Browse files
committed
Remove no longer necessary function
The minimum supported version is now Emacs 27 * jupyter-org-client.el (jupyter-org--search-for-text-property): Remove it. (jupyter-org-pandoc-placeholder-element): Use `text-property-search-forward`.
1 parent 75a32e3 commit b9d58d9

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

jupyter-org-client.el

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,25 +1691,6 @@ Assumes `point' is on the #+RESULTS keyword line."
16911691
(org-element-property :value el)
16921692
cb))
16931693

1694-
;; A simplification of `text-property-search-forward' in Emacs >= 27
1695-
;; used for our purposes.
1696-
(defun jupyter-org--search-for-text-property (property value)
1697-
(let ((origin (point))
1698-
(ended nil)
1699-
pos)
1700-
;; Fix the next candidate.
1701-
(while (not ended)
1702-
(setq pos (next-single-property-change (point) property))
1703-
(if (not pos)
1704-
(progn
1705-
(goto-char origin)
1706-
(setq ended t))
1707-
(goto-char pos)
1708-
(when (eq value (get-text-property (point) property))
1709-
(setq ended 'found))))
1710-
(and (not (eq ended t))
1711-
ended)))
1712-
17131694
(defun jupyter-org-pandoc-placeholder-element (req el)
17141695
"Launch a Pandoc conversion process of EL, return a placeholder string.
17151696
REQ is the `jupyter-org-request' which generated EL as a result.
@@ -1730,7 +1711,7 @@ EL is an Org element with the properties
17301711
(save-excursion
17311712
(goto-char src-pos)
17321713
(set-marker src-pos nil)
1733-
(when (jupyter-org--search-for-text-property 'jupyter-pandoc proc)
1714+
(when (text-property-search-forward 'jupyter-pandoc proc)
17341715
(delete-region (point)
17351716
(let ((pos (next-single-property-change
17361717
(point) 'jupyter-pandoc)))

0 commit comments

Comments
 (0)