emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/code-cells 0a0dd96cd2 14/36: Rename package


From: ELPA Syncer
Subject: [elpa] externals/code-cells 0a0dd96cd2 14/36: Rename package
Date: Mon, 28 Feb 2022 15:57:42 -0500 (EST)

branch: externals/code-cells
commit 0a0dd96cd27edbfba4d61c9bc2e65cbf2b6f22c4
Author: Augusto Stoffel <astoff@users.noreply.github.com>
Commit: Augusto Stoffel <astoff@users.noreply.github.com>

    Rename package
---
 README.md                 | 129 +++++++++++++++++++--------------------
 cells.el => code-cells.el | 149 ++++++++++++++++++++++++----------------------
 2 files changed, 142 insertions(+), 136 deletions(-)

diff --git a/README.md b/README.md
index 2921b10a68..2af4ee4782 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-cells.el
-========
+code-cells.el
+=============
 
 This package lets you efficiently navigate, edit and execute code
 split into cells according to certain magic comments.  If you have
@@ -23,7 +23,7 @@ The first is what you get by exporting a notebook to a script 
on
 Jupyter's web interface or with the command `jupyter nbconvert`.  The
 second style is compatible with Jupytext, among several other tools.
 The third is in the spirit of Emacs's outline mode.  Further percent
-signs or asterisks signify nested cells.  In fact, `cells-mode`
+signs or asterisks signify nested cells.  In fact, `code-cells-mode`
 doubles as a general-purpose enhancement of `outline-minor-mode`; see
 below for details.
 
@@ -32,27 +32,28 @@ Editing commands
 
 Instead of defining every conceivable command relevant to code with
 cells, this package provides a simple way to turn ordinary editing
-commands into “cell-aware” ones.  The `cells-command` function takes
-as argument a function that acts on a region, and returns an anonymous
-command that acts on the current cell.  Thus, one can redefine `C-c
-C-r` in Python mode to evaluate the current cell by doing the
-following:
+commands into “cell-aware” ones.  The `code-cells-command` function
+takes as argument a function that acts on a region, and returns an
+anonymous command that acts on the current cell.  Thus, one can
+redefine `C-c C-c` in Python mode to evaluate the current cell by
+doing the following:
 
 ``` elisp
 (define-key python-mode-map
-            (kbd "C-c C-r")
-            (cells-command 'python-shell-send-region))
+            (kbd "C-c C-c")
+            (code-cells-command 'python-shell-send-region))
 ```
 
-There is also a `cells-do` macro, which evaluates its body with the
-current cell bounds accessible as variables.  See the documentation
-for details.
+There is also a `code-cells-do` macro, which evaluates its body with
+the current cell bounds accessible as variables.  See the
+documentation for details.
 
 Besides that, only three editing commands are provided:
 
-- `cells-forward-cell` and `cells-backward-cell` jump to the
+- `code-cells-forward-cell` and `code-cells-backward-cell` jump to the
   next/previous cell header.
-- `cells-mark-cell` marks the current cell and activates the region.
+- `code-cells-mark-cell` marks the current cell and activates the
+  region.
 
 Everything else is left up for the user to define with the mechanism
 explained above.  See below for more substantial configuration
@@ -62,11 +63,11 @@ or language with a REPL in Emacs.
 Minor mode
 ----------
 
-A minor-mode, `cells-mode`, provides the following things:
+A minor-mode, `code-cells-mode`, provides the following things:
 
 - Font locking for cell boundaries.
-- The `cells-mode-map` keymap, a good place for your very own cell
-  commands.
+- The `code-cells-mode-map` keymap, a good place for your very own
+  cell commands.
 - Outline mode integration: cell headers have outline level determined
   by the number of percent signs or asterisks; within a cell, outline
   headings are as determined by the major mode, but they are demoted
@@ -76,9 +77,9 @@ A minor-mode, `cells-mode`, provides the following things:
 
 Many major modes provide an outline hierarchy based on code structure,
 and some people prefer to replace this with a hierarchy based on
-sectioning comments.  With `cells-mode` you get both things at the
-same time.  This may be useful even for code that is not organized as
-a notebook.
+sectioning comments.  With `code-cells-mode` you get both things at
+the same time.  This may be useful even for code that is not organized
+as a notebook.
 
 Handling Jupyter notebook files
 -------------------------------
@@ -99,17 +100,17 @@ an ipynb file clears all cell outputs.
 With a converted ipynb buffer, you can use the regular `write-file`
 command (`C-x C-w`) to save a copy in script format, as displayed on
 the screen.  Moreover, from any script file with cell separators
-understood by Jupytext, you can call `cells-write-ipynb` to save a
-copy in notebook format.
+understood by Jupytext, you can call `code-cells-write-ipynb` to save
+a copy in notebook format.
 
 Configuration examples
 ----------------------
 
-### Keybindings for cells-mode
+### Keybindings for code-cells-mode
 
 The following configuration snippet sets up cell navigation and
-evaluation functions when `cells-mode` is enabled.  Just adapt it to
-your liking.
+evaluation functions when `code-cells-mode` is enabled.  Just adapt it
+to your liking.
 
 - Navigate cells with `M-p` and `M-n`.
 - Mark, copy and kill cells by prefixing the usual command with `C-c`.
@@ -120,18 +121,18 @@ your liking.
 
 ``` elisp
 (require 'cells)
-(let ((map cells-mode-map))
+(let ((map code-cells-mode-map))
   (define-key map (kbd "M-p") 'cells-backward-cell)
   (define-key map (kbd "M-n") 'cells-forward-cell)
   (define-key map (kbd "C-c C-SPC") 'cells-mark-cell)
-  (define-key map (kbd "C-c C-w") (cells-command 'kill-region :use-region))
-  (define-key map (kbd "C-c M-w") (cells-command 'kill-ring-save :use-region))
+  (define-key map (kbd "C-c C-w") (code-cells-command 'kill-region 
:use-region))
+  (define-key map (kbd "C-c M-w") (code-cells-command 'kill-ring-save 
:use-region))
   (define-key map [remap python-shell-send-region]
-                  (cells-command 'python-shell-send-region :use-region :pulse))
+                  (code-cells-command 'python-shell-send-region :use-region 
:pulse))
   (define-key map [remap jupyter-eval-line-or-region]
-                  (cells-command 'jupyter-eval-region :use-region :pulse))
+                  (code-cells-command 'jupyter-eval-region :use-region :pulse))
   (define-key map [remap cider-eval-region]
-                  (cells-command 'cider-eval-region :use-region :pulse)))
+                  (code-cells-command 'cider-eval-region :use-region :pulse)))
 ```
 
 ### A hydra for [emacs-jupyter]
@@ -149,21 +150,21 @@ Kernel: _r_estart, eval _a_bove, _z_: pop to
 "
   ("h" beginning-of-buffer)
   ("l" (progn (end-of-buffer)
-              (cells-backward-cell)))
-  ("j" cells-forward-cell)
-  ("k" cells-backward-cell)
+              (code-cells-backward-cell)))
+  ("j" code-cells-forward-cell)
+  ("k" code-cells-backward-cell)
   ("z" jupyter-repl-pop-to-buffer :color blue)
-  ("x" (progn (cells-mark-cell)
+  ("x" (progn (code-cells-mark-cell)
               (call-interactively 'execute-extended-command)))
-  ("C-SPC" cells-mark-cell)
+  ("C-SPC" code-cells-mark-cell)
   ("r" jupyter-repl-restart-kernel)
-  ("a" (cells-do (pulse-momentary-highlight-region (point-min) start)
-                 (jupyter-eval-region (point-min) start)))
-  ("e" (cells-do (pulse-momentary-highlight-region start end)
-                 (jupyter-eval-region start end)
-                 (cells-forward-cell)))
-  ("M-w" (cells-do (kill-ring-save start end)))
-  ("C-w" (cells-do (kill-region start end)))
+  ("a" (code-cells-do (pulse-momentary-highlight-region (point-min) start)
+                      (jupyter-eval-region (point-min) start)))
+  ("e" (code-cells-do (pulse-momentary-highlight-region start end)
+                      (jupyter-eval-region start end)
+                      (code-cells-forward-cell)))
+  ("M-w" (code-cells-do (kill-ring-save start end)))
+  ("C-w" (code-cells-do (kill-region start end)))
   ("q" nil :exit t))
 ```
 
@@ -173,29 +174,29 @@ comment-dwim RET` in this hydra will comment out the 
current cell.
 
 Note that since `defhydra` is a macro and wraps the definition of a
 key in an interactive lambda when it is a sexp, we need to use
-`cells-do` instead of `cells-command` above.
+`code-cells-do` instead of `code-cells-command` above.
 
 ### Speed keys
 
 Similarly to org-mode's [speed 
keys](https://orgmode.org/manual/Speed-Keys.html),
-the `cells-speed-key` function returns a key definition that only acts
+the `code-cells-speed-key` function returns a key definition that only acts
 when the point is at the beginning of a cell boundary.  Since this is
 usually not an interesting place to insert text, you can assign short
 keybindings there.  A sample configuration is as follows:
 
 ``` elisp
 (require 'cells)
-(let ((map cells-mode-map))
-  (define-key map "n" (cells-speed-key 'cells-forward-cell))
-  (define-key map "p" (cells-speed-key 'cells-backward-cell))
-  (define-key map "e" (cells-speed-key (cells-command 
'your-favorite-eval-region)))
-  (define-key map (kbd "TAB") (cells-speed-key (lambda ()
-                                                 "Show/hide current cell"
-                                                 (interactive)
-                                                 (outline-minor-mode)
-                                                 (if (outline-invisible-p 
(line-end-position))
-                                                     (outline-show-subtree)
-                                                   (outline-hide-subtree))))))
+(let ((map code-cells-mode-map))
+  (define-key map "n" (code-cells-speed-key 'cells-forward-cell))
+  (define-key map "p" (code-cells-speed-key 'cells-backward-cell))
+  (define-key map "e" (code-cells-speed-key (code-cells-command 
'your-favorite-eval-region)))
+  (define-key map (kbd "TAB") (code-cells-speed-key (lambda ()
+                                                      "Show/hide current cell"
+                                                      (interactive)
+                                                      (outline-minor-mode)
+                                                      (if (outline-invisible-p 
(line-end-position))
+                                                          
(outline-show-subtree)
+                                                        
(outline-hide-subtree))))))
 ```
 
 ### Tweaking the ipynb conversion
@@ -215,9 +216,9 @@ It is also possible to convert notebooks to markdown or org 
format.
 For markdown, use the following:
 
 ``` elisp
-(setq cells-convert-ipynb-style '(("jupytext" "--to" "ipynb" "--from" 
"markdown")
-                                  ("jupytext" "--to" "markdown" "--from" 
"ipynb")
-                                  markdown-mode))
+(setq code-cells-convert-ipynb-style '(("jupytext" "--to" "ipynb" "--from" 
"markdown")
+                                       ("jupytext" "--to" "markdown" "--from" 
"ipynb")
+                                       markdown-mode))
 ```
 
 To edit ipynb files as org documents, try using [Pandoc] with the
@@ -225,9 +226,9 @@ configuration below.  In combination with org-babel, this 
can provide
 a true Emacsesque notebook experience.
 
 ```elisp
-(setq cells-convert-ipynb-style '(("pandoc" "--to" "ipynb" "--from" "org")
-                                  ("pandoc" "--to" "org" "--from" "ipynb")
-                                  org-mode))
+(setq code-cells-convert-ipynb-style '(("pandoc" "--to" "ipynb" "--from" "org")
+                                       ("pandoc" "--to" "org" "--from" "ipynb")
+                                       org-mode))
 ```
 
 A good reason to stick with Jupytext, though, is that it offers
@@ -238,7 +239,7 @@ some surprises.
 Alternatives
 ------------
 
-[python-cells.el](https://github.com/thisch/python-cell.el) provides
+[python-cell.el](https://github.com/thisch/python-cell.el) provides
 similar cell editing commands.  It seems to be limited to Python, and
 is perhaps simpler to set up but less flexible.
 
diff --git a/cells.el b/code-cells.el
similarity index 63%
rename from cells.el
rename to code-cells.el
index b5905edd64..61424f5d18 100644
--- a/cells.el
+++ b/code-cells.el
@@ -1,10 +1,10 @@
-;;; cells.el --- Work with code split into cells and Jupyter notebooks -*- 
lexical-binding: t; -*-
+;;; code-cells.el --- Work with code split into cells and Jupyter notebooks 
-*- lexical-binding: t; -*-
 
-;; Copyright (C) 2020 Augusto Stoffel
+;; Copyright (C) 2021 Augusto Stoffel
 
 ;; Author: Augusto Stoffel <arstoffel@gmail.com>
 ;; Keywords: convenience, outlines
-;; URL: https://github.com/astoff/cells.el
+;; URL: https://github.com/astoff/code-cells.el
 ;; Package-Requires: ((emacs "27.1"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -32,9 +32,9 @@
 ;; Out of the box, there are no keybindings and, in fact, only a small
 ;; number of editing commands is provided.  Rather, the idea is that
 ;; you can create your own cell-aware commands from regular ones
-;; through the `cells-command' function and the `cells-do' macro.  See
+;; through the `code-cells-command' function and the `code-cells-do' macro.  
See
 ;; the README for configuration examples.  There is also a
-;; `cells-mode' minor mode, which, among other things, provides
+;; `code-cells-mode' minor mode, which, among other things, provides
 ;; outline support.
 
 ;;; Code:
@@ -43,14 +43,14 @@
 (require 'pulse)
 (require 'rx)
 
-(defgroup cells nil
+(defgroup code-cells nil
   "Utilities for code split into cells."
   :group 'convenience
-  :prefix "cells-")
+  :prefix "code-cells-")
 
 ;;* Cell navigation
 
-(defcustom cells-boundary-markers
+(defcustom code-cells-boundary-markers
   '((seq (* space) "%" (group-n 1 (+ "%")))
     (group-n 1 (+ "*"))
     (seq " In[" (* (any space digit)) "]:"))
@@ -61,32 +61,32 @@ introduces a cell break.
 The length of the first capture determines the outline level."
   :type '(repeat sexp))
 
-(defun cells-boundary-regexp ()
+(defun code-cells-boundary-regexp ()
   "Return a regexp matching comment lines that serve as cell boundary."
   (rx line-start
       (+ (syntax comment-start))
-      (eval (cons 'or cells-boundary-markers))))
+      (eval (cons 'or code-cells-boundary-markers))))
 
 ;;;###autoload
-(defun cells-forward-cell (&optional arg)
+(defun code-cells-forward-cell (&optional arg)
   "Move to the next cell boundary, or end of buffer.
 With ARG, repeat this that many times.  If ARG is negative, move
 backward."
   (interactive "p")
-  (let ((page-delimiter (cells-boundary-regexp)))
+  (let ((page-delimiter (code-cells-boundary-regexp)))
     (forward-page arg)
     (move-beginning-of-line 1)))
 
 ;;;###autoload
-(defun cells-backward-cell (&optional arg)
+(defun code-cells-backward-cell (&optional arg)
   "Move to the previous cell boundary, or beginning of buffer.
 With ARG, repeat this that many times.  If ARG is negative, move
 forward."
   (interactive "p")
-  (cells-forward-cell (- (or arg 1))))
+  (code-cells-forward-cell (- (or arg 1))))
 
 ;;;###autoload
-(defmacro cells-do (&rest body)
+(defmacro code-cells-do (&rest body)
   "Find current cell bounds and evaluate BODY.
 Inside BODY, the variables `start' and `end' are bound to the
 limits of the current cell.
@@ -98,21 +98,21 @@ region is active, use its bounds instead.  In this case,
               (list t (region-end) (region-beginning))
             (save-excursion
               (list nil
-                    (progn (cells-forward-cell) (point))
-                    (progn (cells-backward-cell) (point)))))
+                    (progn (code-cells-forward-cell) (point))
+                    (progn (code-cells-backward-cell) (point)))))
      (`(,using-region ,end ,start)
       ,@body)))
 
 ;;;###autoload
-(defun cells-mark-cell ()
+(defun code-cells-mark-cell ()
   "Put point at the beginning of this cell, mark at end."
   (interactive)
-  (cells-do
+  (code-cells-do
    (goto-char start)
    (push-mark end nil t)))
 
 ;;;###autoload
-(defun cells-command (fun &optional docstring &rest options)
+(defun code-cells-command (fun &optional docstring &rest options)
   "Return an anonymous command that calls FUN on the current cell.
 
 FUN is a function that takes two character positions as argument.
@@ -134,78 +134,83 @@ via `pulse-momentary-highlight-region'."
   (eval `(lambda ()
           ,docstring
           (interactive)
-          (cells-do ,(car (member :use-region options))
-                    ,(when (member :pulse options)
-                       '(pulse-momentary-highlight-region start end))
-                    (funcall ',fun start end)))))
+          (code-cells-do ,(car (member :use-region options))
+                         ,(when (member :pulse options)
+                            '(pulse-momentary-highlight-region start end))
+                         (funcall ',fun start end)))))
 
-(defun cells-speed-key (command)
+(defun code-cells-speed-key (command)
   "Return a speed key definition, suitable for passing to `define-key'.
 The resulting keybinding will only have any effect when the point
 is at the beginning of a cell heading, in which case it executes
 COMMAND."
   (list 'menu-item nil command
         :filter (lambda (d)
-                  (if (and (bolp) (looking-at (cells-boundary-regexp))) d))))
+                  (if (and (bolp)
+                           (looking-at (code-cells-boundary-regexp)))
+                      d))))
 
 ;;* Minor mode
 
-(defvar-local cells--saved-vars nil
-  "A place to save variables before activating `cells-mode'.")
+(defvar-local code-cells--saved-vars nil
+  "A place to save variables before activating `code-cells-mode'.")
 
-(defun cells--outline-level ()
-  "The `outline-level' function used by `cells-mode'.
+(defun code-cells--outline-level ()
+  "The `outline-level' function used by `code-cells-mode'.
 At a cell boundary, returns the cell outline level, as determined
-by `cells-boundary-markers'.  Otherwise, returns the sum of the
+by `code-cells-boundary-markers'.  Otherwise, returns the sum of the
 outline level as determined by the major mode and the current
 cell level."
-  (let* ((at-boundary (looking-at-p (cells-boundary-regexp)))
-         (mm-level (if at-boundary 0 (funcall (car cells--saved-vars))))
+  (let* ((at-boundary (looking-at-p (code-cells-boundary-regexp)))
+         (mm-level (if at-boundary
+                       0
+                     (funcall (car code-cells--saved-vars))))
          (cell-level (if (or at-boundary
                              (save-excursion
-                               (re-search-backward (cells-boundary-regexp) nil 
t)))
+                               (re-search-backward
+                                (code-cells-boundary-regexp) nil t)))
                          (if (match-string 1)
                              (- (match-end 1) (match-beginning 1))
                            1)
                        0)))
     (+ cell-level mm-level)))
 
-(defface cells-header-line '((t :extend t :inherit header-line))
-  "Face used by `cells-mode' to highlight cell boundaries.")
+(defface code-cells-header-line '((t :extend t :inherit header-line))
+  "Face used by `code-cells-mode' to highlight cell boundaries.")
 
-(defun cells--font-lock-keywords ()
+(defun code-cells--font-lock-keywords ()
   "Font lock keywords to highlight cell boundaries."
-  `((,(rx (regexp (cells-boundary-regexp)) (* any) "\n")
-     0 'cells-header-line append)))
+  `((,(rx (regexp (code-cells-boundary-regexp)) (* any) "\n")
+     0 'code-cells-header-line append)))
 
 ;;;###autoload
-(define-minor-mode cells-mode
+(define-minor-mode code-cells-mode
   "Minor mode for cell-oriented code."
   :keymap (make-sparse-keymap)
-  (if cells-mode
+  (if code-cells-mode
       (progn
         (require 'outline)
-        (setq-local cells--saved-vars (list outline-level
-                                            outline-regexp
-                                            outline-heading-end-regexp)
-                    outline-level 'cells--outline-level
-                    outline-regexp (rx (or (regexp (cells-boundary-regexp))
+        (setq-local code-cells--saved-vars (list outline-level
+                                                 outline-regexp
+                                                 outline-heading-end-regexp)
+                    outline-level 'code-cells--outline-level
+                    outline-regexp (rx (or (regexp 
(code-cells-boundary-regexp))
                                            (regexp outline-regexp)))
                     outline-heading-end-regexp "\n")
-        (font-lock-add-keywords nil (cells--font-lock-keywords)))
-    (setq-local outline-level (nth 0 cells--saved-vars)
-                outline-regexp (nth 1 cells--saved-vars)
-                outline-heading-end-regexp (nth 2 cells--saved-vars))
-    (font-lock-remove-keywords nil (cells--font-lock-keywords)))
+        (font-lock-add-keywords nil (code-cells--font-lock-keywords)))
+    (setq-local outline-level (nth 0 code-cells--saved-vars)
+                outline-regexp (nth 1 code-cells--saved-vars)
+                outline-heading-end-regexp (nth 2 code-cells--saved-vars))
+    (font-lock-remove-keywords nil (code-cells--font-lock-keywords)))
   (font-lock-flush))
 
 ;;* Jupyter notebook conversion
 
-(defcustom cells-convert-ipynb-style
+(defcustom code-cells-convert-ipynb-style
   '(("jupytext" "--to" "ipynb")
     ("jupytext" "--to" "auto:percent")
     nil
-    cells-convert-ipynb-hook)
+    code-cells-convert-ipynb-hook)
   "Determines how to convert ipynb files for editing.
 The first two entries are lists of strings: the command name and
 arguments used, respectively, to convert to and from ipynb
@@ -219,10 +224,10 @@ The fourth entry, also optional, is a hook run after the 
new
 major mode is activated."
   :type '(list sexp sexp sexp sexp))
 
-(defvar cells-convert-ipynb-hook '(cells-mode)
-  "Hook used in the default `cells-convert-ipynb-style'.")
+(defvar code-cells-convert-ipynb-hook '(code-cells-mode)
+  "Hook used in the default `code-cells-convert-ipynb-style'.")
 
-(defun cells--call-process (buffer command)
+(defun code-cells--call-process (buffer command)
   "Pipe BUFFER through COMMAND, with output to the current buffer.
 Returns the process exit code.  COMMAND is a list of strings, the
 program name followed by arguments."
@@ -230,46 +235,46 @@ program name followed by arguments."
     (error "Can't find %s" (car command)))
   (let ((logfile (make-temp-file "emacs-cells-")))
     (prog1
-        (apply 'call-process-region nil nil (car command) nil
-                                    (list buffer logfile) nil
-                                    (cdr command))
+        (apply #'call-process-region nil nil (car command) nil
+               (list buffer logfile) nil
+               (cdr command))
       (with-temp-buffer
         (insert-file-contents logfile)
         (when (> (buffer-size) 0)
-          (display-warning 'cells (buffer-substring-no-properties
-                                   (point-min) (point-max))))
+          (display-warning 'code-cells (buffer-substring-no-properties
+                                        (point-min) (point-max))))
         (delete-file logfile)))))
 
 ;;;###autoload
-(defun cells-convert-ipynb ()
+(defun code-cells-convert-ipynb ()
   "Convert buffer from ipynb format to a regular script."
   (goto-char (point-min))
   (let* ((nb (json-parse-buffer))
          (pt (point))
          (lang (or (map-nested-elt nb '("metadata" "kernelspec" "language"))
                    (map-nested-elt nb '("metadata" "jupytext" 
"main_language"))))
-         (mode (or (nth 2 cells-convert-ipynb-style)
+         (mode (or (nth 2 code-cells-convert-ipynb-style)
                    (intern (concat lang "-mode"))))
-         (exit (cells--call-process t (nth 1 cells-convert-ipynb-style))))
+         (exit (code-cells--call-process t (nth 1 
code-cells-convert-ipynb-style))))
     (unless (eq 0 exit)
       (delete-region pt (point-max))
       (error "Error converting notebook (exit code %s)" exit))
     (delete-region (point-min) pt)
     (set-buffer-modified-p nil)
-    (setq-local write-file-functions '(cells-write-ipynb))
+    (setq-local write-file-functions '(code-cells-write-ipynb))
     (when (fboundp mode)
       (funcall mode)
-      (run-hooks (nth 3 cells-convert-ipynb-style)))))
+      (run-hooks (nth 3 code-cells-convert-ipynb-style)))))
 
 ;;;###autoload
-(defun cells-write-ipynb (&optional file)
+(defun code-cells-write-ipynb (&optional file)
   "Convert buffer to ipynb format and write to FILE.
 Interactively, asks for the file name.  When called from Lisp,
 FILE defaults to the current buffer file name."
   (interactive "F")
   (let* ((file (or file buffer-file-name))
          (temp (generate-new-buffer " *cells--call-process output*"))
-         (exit (cells--call-process temp (nth 0 cells-convert-ipynb-style))))
+         (exit (code-cells--call-process temp (nth 0 
code-cells-convert-ipynb-style))))
     (unless (eq 0 exit)
         (error "Error converting notebook (exit code %s)" exit))
     (with-current-buffer temp
@@ -281,7 +286,7 @@ FILE defaults to the current buffer file name."
     'job-done))
 
 ;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.ipynb\\'" . cells-convert-ipynb))
+(add-to-list 'auto-mode-alist '("\\.ipynb\\'" . code-cells-convert-ipynb))
 
-(provide 'cells)
-;;; cells.el ends here
+(provide 'code-cells)
+;;; code-cells.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]