Comments (6)
Can you turn on debug flag of literate-elisp to locate the issue.
(setf literate-elisp-debug-p t)
Please delete back trace buffer if it exists too.
from literate-elisp.
literate-elisp-byte-compile-file
apparently doesn't work at all, and so far I'm surprised if it ever did.
Namely, whitespace-skipping routine seems to be completely broken.
Prepare test.org
for byte-compilation as follows:
# -*- encoding: utf-8; mode: org; org-src-preserve-indentation: t; -*-
#+BEGIN_SRC elisp
(defun test-- () (random))
#+END_SRC
With test.org
and literate-elisp.el
in current directory, in emacs -Q -L .
, run the following:
(add-to-list 'load-path "/usr/share/emacs/site-lisp/org/")
;; or wherever org is
(require 'org)
(load "literate-elisp.el")
(literate-elisp-byte-compile-file "test.org")
The error is, get-file-char
(empty arglist) gets called with non-empty arglist in literate-elisp-peek
.
Emacs version is 27.2 but I don't see any mentions of get-file-char
changes in commit messages of Emacs git repository.
from literate-elisp.
I have tested it in Emacs 27.2 in Mac OS and can't reproduce it.
from literate-elisp.
@akater Please re-open this issue if you still have issue
from literate-elisp.
Yes I still have the issue. What's the signature of get-file-char
, in your Emacs 27.2 on Mac OS?
from literate-elisp.
Here's the backtrace:
Debugger entered--Lisp error: (wrong-number-of-arguments #<subr get-file-char> 1)
get-file-char(98)
funcall(get-file-char 98)
(progn (funcall in c))
(if c (progn (funcall in c)))
(let ((c (funcall in))) (if c (progn (funcall in c))) c)
(cond ((bufferp in) (save-current-buffer (set-buffer in) (if (not (eobp)) (progn (char-after))))) ((markerp in) (save-current-buffer (set-buffer (marker-buffer in)) (if (< (marker-position in) (point-max)) (progn (char-after in))))) ((functionp in) (let ((c (funcall in))) (if c (progn (funcall in c))) c)))
literate-elisp-peek(get-file-char)
(cl-find (literate-elisp-peek in) '(10 32 9))
(while (cl-find (literate-elisp-peek in) '(10 32 9)) (literate-elisp-next in))
literate-elisp-ignore-white-space(get-file-char)
literate-elisp-read-datum(get-file-char)
(setq form (literate-elisp-read-datum in))
(while t (setq form (literate-elisp-read-datum in)) (if form (progn (throw '--cl-block-nil-- form))) (if literate-elisp-org-code-blocks-p (progn (throw '--cl-block-nil-- nil))) (if (null (literate-elisp-peek in)) (progn (throw '--cl-block-nil-- nil))))
(let* ((form nil)) (while t (setq form (literate-elisp-read-datum in)) (if form (progn (throw '--cl-block-nil-- form))) (if literate-elisp-org-code-blocks-p (progn (throw '--cl-block-nil-- nil))) (if (null (literate-elisp-peek in)) (progn (throw '--cl-block-nil-- nil)))) nil)
(catch '--cl-block-nil-- (let* ((form nil)) (while t (setq form (literate-elisp-read-datum in)) (if form (progn (throw '--cl-block-nil-- form))) (if literate-elisp-org-code-blocks-p (progn (throw '--cl-block-nil-- nil))) (if (null (literate-elisp-peek in)) (progn (throw '--cl-block-nil-- nil)))) nil))
read(get-file-char)
(byte-compile-file file load)
(unwind-protect (byte-compile-file file load) (fset 'read original-read))
(let ((literate-elisp-org-code-blocks-p nil) (load-file-name buffer-file-name) (original-read (symbol-function 'read))) (fset 'read (symbol-function 'literate-elisp-read-internal)) (unwind-protect (byte-compile-file file load) (fset 'read original-read)))
literate-elisp-byte-compile-file("test.org")
(progn (literate-elisp-byte-compile-file "test.org"))
eval((progn (literate-elisp-byte-compile-file "test.org")) t)
from literate-elisp.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from literate-elisp.