Skip to content

Commit 7a426ea

Browse files
committed
Use pcase in one place
* jupyter-org-client.el (jupyter-org--first-result-context-p): Do it.
1 parent 8439d2c commit 7a426ea

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

jupyter-org-client.el

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,18 +1455,18 @@ appear after the element."
14551455
(org-element-put-property element :post-blank nil))
14561456

14571457
(defun jupyter-org--first-result-context-p (context)
1458-
(cl-case (org-element-type context)
1459-
(drawer (not (equal "RESULTS"
1460-
(upcase (org-element-property :drawer-name context)))))
1461-
(t (not (or (jupyter-org-babel-result-p element)
1462-
(let ((type (org-element-type element)))
1463-
(or (memq type '(latex-fragment latex-environment))
1464-
;; TODO: Figure out a better way. I predict there will be more
1465-
;; situations where a comment would be useful to add. That means
1466-
;; we would have to verify each one.
1467-
(and (eq type 'comment)
1468-
(equal jupyter-org--goto-error-string
1469-
(org-element-property :value element))))))))))
1458+
(not
1459+
(pcase (org-element-type context)
1460+
(`drawer (equal "RESULTS"
1461+
(upcase (org-element-property :drawer-name context))))
1462+
(`,type (or (jupyter-org-babel-result-p context)
1463+
(or (memq type '(latex-fragment latex-environment))
1464+
;; TODO: Figure out a better way. I predict there will be more
1465+
;; situations where a comment would be useful to add. That means
1466+
;; we would have to verify each one.
1467+
(and (eq type 'comment)
1468+
(equal jupyter-org--goto-error-string
1469+
(org-element-property :value context)))))))))
14701470

14711471
;;;; Stream results
14721472

0 commit comments

Comments
 (0)