Questions tagged [bytecode]
14 questions
9
votes
2 answers
Portability of bytecode between Emacs versions
I sometimes run multiple versions of Emacs from the same home directory. I have a number of byte-compiled files. Bytecode is not compatible across all Emacs versions, so I maintain separate directories for .elc files for each version range.
What are…

Gilles 'SO- stop being evil'
- 21,702
- 4
- 53
- 89
8
votes
2 answers
Argspec or arity of a bytecode function in Emacs 24
I have code that tests the arity of a function. I use it to determine whether optional arguments added in recent versions of a package are present. It calls subr-arity for built-in functions and parses the arglist of bytecode objects and…

Gilles 'SO- stop being evil'
- 21,702
- 4
- 53
- 89
5
votes
1 answer
Elisp backtrace print garbage messages
I'm using emacs 25.2 on osx 10.12 and following elisp intro to produce some error message intentionally.
(This is a list)
After I run C-x C-e on this line. A backtrace buffer appeared as supposed but with garbage error messages:
Debugger…

spacegoing
- 419
- 2
- 9
5
votes
1 answer
What does a byte compiled Emacs file contains and how is it executed?
I didn't know byte compiled emacs files (.elc) were actually version-specific until Malabarba pointed that to me.
So this made me ask what do those files actually contain and how does their execution compare to the execution of normal .el files?…

caisah
- 4,056
- 1
- 23
- 43
4
votes
0 answers
Is there an ELISP decompiler?
I'm thinking of writing one so that when I get those horrible tracebacks from bytecode files, I can better see where I was at.
Is there one already?
Are there any other tools for showing an error traceback in more Elisp programmer terms rather…

rocky
- 888
- 7
- 26
3
votes
2 answers
Disassembly of a bytecode *file*?
There is a disassembler for functions, but is there something that will disassemble a bytecode file?
Thoughts on how to accomplish?

rocky
- 888
- 7
- 26
2
votes
3 answers
error: Invalid byte opcode: op=183, ptr=2
I byte-compile my ~/.emacs.d/init.el. It was done by Emacs 26.1 from Cygwin and I got error when load emacs-nox 25.2 from Debian WSL:
error: Invalid byte opcode: op=183, ptr=2
Were new opcodes introduced into Emacs byte code starting from v26? For…

gavenkoa
- 3,352
- 19
- 36
1
vote
1 answer
Unrecognisable code set by Customize
I was looking through my .emacs.el file and saw that Customize has put the following in it:
'(org-mode-hook
(quote
(#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-show-block-all append local]
5]
#[0…

granti128
- 25
- 3
0
votes
1 answer
How does startup.el work (on Debian 12)
I'm using the emacs/stable,stable,now 1:28.2+1-15 Debian package with Doom and am trying to change startup behavior. I made backups of startup.el.gz and startup.elc located at /usr/share/emacs/28.2/lisp/. After trying to change startup-behavior in…

J-Kappes
- 1
- 1
0
votes
1 answer
How to disassemble an lambda/anonymous function given its hex adress but not name?
Assume that we have:
(defalias 'my-f (lambda () (message "a")))
(byte-compile 'my-f)
=> #f(compiled-function
()
#)
(setq my-g (byte-compile (lambda () (message "b"))))
=> #f(compiled-function
()
…

Daanturo
- 180
- 8
0
votes
0 answers
Is there a way to change the unibyte string bytecode output of `byte-compile` to hex?
Given a byte-compiled function:
(byte-compile (defun factorial (integer)
"Compute factorial of an integer."
(if (= 1 integer) 1
(* integer (factorial (1- integer))))))
=> #[(integer)
…

John DeBord
- 550
- 3
- 13
0
votes
0 answers
Mutually recursive bytecode function throws an error when I try to eval
The following workflow contains the steps needed to reproduce the error:
;; Byte-compile the function.
(byte-compile '(defun flatten (x)
(cl-labels ((rec (x acc)
(cond ((null x) acc)
…

John DeBord
- 550
- 3
- 13
0
votes
2 answers
Generating a single byte-compiled file from more sources
I have a relatively large elisp file which starts becoming hard to maintain and I am going to split it into smaller files.
However, for my use case, it would be still convenient to have a single byte-compiled file (because I use it on other systems…

antonio
- 1,762
- 12
- 24
0
votes
0 answers
Error when trying to save a file as root using Tramp and sudo
I am following the directions laid out in this answer to edit my sshd_config file.
However when I try to save I get:
byte-code: Wrong type argument: listp, 126
Does anybody know why this would be and how I could fix it? (this prevents me from saving…

Startec
- 1,354
- 1
- 13
- 30