Skip to content

code-cells-convert-ipynb not called when executing code-cells-mode command #37

Description

@JuanPabloMF

My config contains the following:

(use-package python
    :ensure nil
    :mode ("\\.py\\'" . python-mode)
              ("\\.ipynb\\'" . python-mode)  ;; Add this line for ipynb files
    :interpreter ("python" . python-mode)
    :config
    ;; Enable syntax highlighting
    (setq python-indent-offset 4)
    (setq font-lock-maximum-decoration t)
    (add-hook 'python-mode-hook
              (lambda ()
                (font-lock-mode 1))))

(use-package code-cells
    :hook (python-mode . code-cells-mode-maybe)
    )

At some point code-cells worked but it stopped working (concerning ipynb conversion).

I'm trying to open (and convert) even a very simple ipynb file as test.ipynb:

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "dc0fcf45",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "this is a test\n"
     ]
    }
   ],
   "source": [
    "print(\"this is a test\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b7a9966f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "/gnu/store/xsflhzksdnlwsigw9iicbg99qmh5hz82-python-3.10.7/bin/python3",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions