Skip to content

Commit 1fb77da

Browse files
committed
Merge branch 'next'
2 parents 4551667 + e548c6c commit 1fb77da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4012
-4125
lines changed

Diff for: .github/workflows/test.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on: push
2+
jobs:
3+
test:
4+
strategy:
5+
matrix:
6+
os: [ubuntu-latest, macos-latest, windows-latest]
7+
emacs-version: [26.3, 27.2, 28.2, snapshot]
8+
defaults:
9+
run:
10+
shell: bash -el {0}
11+
runs-on: ${{ matrix.os }}
12+
continue-on-error: true
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: purcell/setup-emacs@master
16+
with:
17+
version: ${{ matrix.emacs-version }}
18+
if: ${{ matrix.os != 'windows-latest' }}
19+
- uses: jcs090218/setup-emacs-windows@master
20+
with:
21+
version: ${{ matrix.emacs-version }}
22+
if: ${{ matrix.os == 'windows-latest' }}
23+
- uses: conda-incubator/setup-miniconda@v2
24+
with:
25+
python-version: 3.9
26+
- name: Install requirements
27+
run: |
28+
conda install -c conda-forge pandoc
29+
conda install -c anaconda jupyter
30+
curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev | sh
31+
32+
# Make eldev available to all future actions
33+
echo "$HOME/.local/bin" >> $GITHUB_PATH
34+
- name: Check Jupyter version
35+
run: |
36+
mkdir -p $(jupyter --runtime-dir)
37+
jupyter --paths
38+
jupyter --version
39+
jupyter kernelspec list
40+
- name: Byte compilation
41+
run: |
42+
make compile
43+
- name: Run tests
44+
run: |
45+
make test

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ node_modules/
55
*lock*
66
built/
77
.cask/
8+
.eldev/
9+
Eldev-local

Diff for: Cask

-14
This file was deleted.

Diff for: Eldev

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
; -*- mode: emacs-lisp; lexical-binding: t -*-
2+
3+
(eldev-require-version "1.2")
4+
(eldev-use-package-archive 'melpa)
5+
(eldev-add-extra-dependencies 'test 'org)
6+
(setq eldev-standard-excludes `(:or ,eldev-standard-excludes "./js"))

Diff for: Makefile

+21-32
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,50 @@
11
EMACS ?= emacs
2-
SHELL = bash
3-
CASK ?= $(shell command -v cask)
2+
ELDEV ?= $(shell command -v eldev)
43

54
FILES = $(wildcard *.el)
65
ELCFILES = $(FILES:.el=.elc)
6+
TESTFILES = $(foreach file,$(wildcard test/*.el),-l $(file))
7+
TESTSELECTORS =
78

89
ifneq ($(TAGS),)
9-
override TAGS := -t $(TAGS)
10+
comma := ,
11+
TESTSELECTORS := $(foreach tag,$(subst $(comma), ,$(TAGS)),\"(tag $(tag))\")
1012
endif
1113

1214
ifneq ($(PATTERN),)
13-
override PATTERN := -p $(PATTERN)
15+
TESTSELECTORS := $(TESTSELECTORS) \"$(PATTERN)\"
1416
endif
1517

18+
# ifneq ($(TESTSELECTORS),)
19+
# TESTSELECTORS := (quote (or $(TESTSELECTORS)))
20+
# endif
21+
1622
.PHONY: all
1723
all: compile
1824

19-
.PHONY: cask
20-
cask:
21-
ifeq ($(CASK),)
22-
$(error "Install cask (https://github.com/cask/cask)")
23-
endif
24-
25-
# Build the zmq module.
26-
.PHONY: zmq
27-
ifneq ($(APPVEYOR),)
28-
# There are issues with string quoting in Appveyor which causes the normal
29-
# evaluated command to give a parsing error so we just make this a no-op in
30-
# Appveyor. The pre-built binaries are used when building in Appveyor anyways.
31-
zmq:
32-
else
33-
zmq: cask
34-
$(CASK) emacs -Q -batch --eval "(progn (fset 'read-string (lambda (&rest _) \"y\")) (require 'zmq))"
25+
.PHONY: eldev
26+
eldev:
27+
ifeq ($(ELDEV),)
28+
$(error "Install eldev (https://github.com/doublep/eldev)")
3529
endif
3630

37-
.PHONY: dev
38-
dev: cask
39-
$(CASK) install
40-
$(CASK) update
41-
4231
.PHONY: test
43-
test: zmq
44-
$(CASK) exec ert-runner --script $(TAGS) $(PATTERN)
32+
test:
33+
$(ELDEV) test $(TESTSELECTORS)
4534

4635
.PHONY: clean
4736
clean:
4837
make -C js clean
4938
@rm $(ELCFILES) 2>/dev/null || true
5039

51-
.PHONY: clean-cask
52-
clean-cask:
53-
@rm -rf .cask/ 2>/dev/null || true
40+
.PHONY: clean-eldev
41+
clean-eldev:
42+
@rm -rf .eldev/ 2>/dev/null || true
5443

5544
.PHONY: widgets
5645
widgets:
5746
make -C js
5847

5948
.PHONY: compile
60-
compile: zmq
61-
$(CASK) build
49+
compile:
50+
$(ELDEV) compile

Diff for: README.org

+14-18
Original file line numberDiff line numberDiff line change
@@ -527,24 +527,20 @@ the =:kernel= header argument must match the name of the kernel's kernelspec.
527527
To connect to a kernel behind an =HTTPS= connection, use a TRAMP file name that
528528
looks like =/jpys:...= instead.
529529

530-
*** TODO Standard output, displayed data, and code block results
531-
532-
One significant difference between Jupyter code blocks and regular =org-mode=
533-
code blocks is that the underlying Jupyter kernel can request that the client
534-
display extra data in addition to output or the result of a code block. See
535-
[[https://jupyter-client.readthedocs.io/en/stable/messaging.html#display-data][display_data messages]].
536-
537-
To account for this, Jupyter code blocks do not go through the normal
538-
=org-mode= result insertion mechanism (see =org-babel-insert-result=). The
539-
downside of this is that, compared to normal code blocks, only a small subset
540-
of the header arguments common to all code blocks are supported. The upside is
541-
that all forms of results produced by a kernel can be inserted into the buffer
542-
similar to a Jupyter notebook.
543-
544-
The implementation of =org-mode= code blocks is really meant to handle either
545-
capturing the standard output /or/ the result of a code block. When using
546-
Jupyter code blocks, if the kernel produces output or asks to display extra
547-
information, the results are appended to a =:RESULTS:= drawer.
530+
*** Standard output, displayed data, and code block results
531+
532+
In contrast to non-Jupyter code blocks, the kernel of Jupyter code
533+
block can request extra data, other than stdout or a code block's
534+
result, be displayed (see [[https://jupyter-client.readthedocs.io/en/stable/messaging.html#display-data][display_data messages]]).
535+
536+
To account for this, Jupyter code blocks do not go through the
537+
normal =org-mode= result insertion mechanism
538+
(see =org-babel-insert-result=), instead providing its own result
539+
insertion. The downside is that, compared to normal =org-mode= code
540+
blocks, only a small subset of the header arguments are supported.
541+
The upside is that all forms of results produced by a kernel can be
542+
inserted into the buffer similar to a Jupyter notebook.
543+
548544
*** =jupyter-org-interaction-mode=
549545

550546
A minor mode that enables completion and custom keybindings when =point= is

0 commit comments

Comments
 (0)