Skip to main content
6 votes

error: Invalid byte opcode: op=183, ptr=2

A solution to this is to delete all compiled EmacsLisp files in the user's Emacs directory cd ~/.emacs.d/ find . -name "*.elc" -type f Once you are satisfacted by what the find command ...
smonff's user avatar
  • 1,589
5 votes

Is there a way Emacs can infer is running on WSL (Windows Subsystem for Linux)?

You could also do (string-match-p "Microsoft" (shell-command-to-string "uname -a")) Likely in your my-browse-url-function you're probably depending on a Windows specific path to exist. You could just ...
willbush's user avatar
  • 316
4 votes

Is there a way Emacs can infer is running on WSL (Windows Subsystem for Linux)?

I just happened to notice this while looking for a an already implemented wsl-browse-url (thanks!), so will offer one other option: (when (string-match "-[Mm]icrosoft" operating-system-release) ;; ...
Chris Bilson's user avatar
3 votes
Accepted

error: Invalid byte opcode: op=183, ptr=2

From NEWS: * Incompatible Lisp Changes in Emacs 26.1 [...] ** Certain cond/pcase/cl-case forms are now compiled using a faster jump table implementation. This uses a new bytecode op 'switch', which ...
npostavs's user avatar
  • 9,213
3 votes

Shell-mode execute script every time a shell is invoked

You can test the TERM environment variable in your bashrc file. For M-x shell it will be "dumb" as opposed to anything else. For ansi-term the TERM environment variable is set to "eterm-color".
stsquad's user avatar
  • 4,661
3 votes

Is there a way Emacs can infer is running on WSL (Windows Subsystem for Linux)?

I would check for an environment variable using getenv. You may want to check what variables are available in your typical WSL shell, but one option would be to check for a Windows-specific PATH entry,...
glucas's user avatar
  • 20.6k
2 votes

error: Invalid byte opcode: op=183, ptr=2

One way to handle this is to have dedicated package directories for each Emacs version. You can do this by placing the following in your init file: (setq package-user-dir (concat "~/.emacs.d/elpa/" ...
Lindydancer's user avatar
  • 6,170
2 votes

Copy/paste from Windows clipboard in WSL terminal

This answer is adapted from a post on Reddit. You can define your own wsl-copy and wsl-paste functions by putting the following in your Emacs init file (.emacs): ; wsl-copy (defun wsl-copy (start end) ...
Riggy's user avatar
  • 21
2 votes

Copy/paste from Windows clipboard in WSL terminal

To answer your question, try this: mouse to the title bar (to the right of the red Ubuntu logo) right click, and you should see a menu appear mouse over Edit, move to the right, click on Paste If ...
Ben's user avatar
  • 21
2 votes
Accepted

Experience with WSL as underlying shell (esp. with Texlive) for native win-x64 Emacs

I am (almost exclusively) using Emacs on WSL1. I've got X11 support by VcXsrv. It is very stable. You can mount Windows paths as drvfs. No problem there! My $HOME is my %USERPROFILE%. You can even ...
Tobias's user avatar
  • 33.3k
2 votes
Accepted

US-Intl layout EU users of Emacs in WSL - how do you input those Alt-Gr characters?

Just found this issue, looking around the internet I came across this page, and the solution is at the bottom, basically you have to set the keyboard mapping with the following command on the Debian ...
Skalas's user avatar
  • 36
2 votes
Accepted

Start Process Not Working: Process List Claims Process Started but Process UI not shown

I do not know why this works, but I figured out how to get it to work. (let ((process-connection-type nil)) ; use a pipe (start-process "yekneb-exec-2" nil "/mnt/c/WINDOWS/...
Benilda Key's user avatar
2 votes

emacsclient: error accessing server file "~/.emacs.d/server/server"

Two things. You're using the TCP option --server-name when you should be using --socket-name ~ probably won't work. Use $HOME or else the absolute path.
phils's user avatar
  • 51.7k
1 vote
Accepted

How can I use Canadian CSA keyboard layout in Emacs on Windows WSL

Just set your OS to the keyboard layout you want. No need to mess with Emacs settings.
db48x's user avatar
  • 18.4k
1 vote

Problem with key bindings in Emacs in the terminal on WSL

You’re using Emacs inside of a terminal, and terminals have a much more limited set of keystrokes that they can communicate. This is because historically terminals simply had fewer keys on their ...
db48x's user avatar
  • 18.4k
1 vote
Accepted

How can I get the name of the file on the current Dired line?

Not sure what you're asking, but I think you're asking how to have dired-get-marked-files pick up only the file named on the current line, instead of the files that are marked. If so, the answer is to ...
Drew's user avatar
  • 78k
1 vote
Accepted

How to use Ctrl-C on WSL (key binding conflict)

The answer to your keyboard question is to either configure different keyboard shortcuts in your terminal emulator, use a different terminal emulator, use the Emacs GUI, or in extremis configure ...
db48x's user avatar
  • 18.4k
1 vote

Emacs as Editor under Win10 WSL 2

This works on my WSL 2 with debian 10 and emacs 28.0.5 My batch script runemacs.bat(calling a few powershell commands inside): @echo OFF :: Get the given path to file set givenPath=%* :: Get ...
Percee's user avatar
  • 143
1 vote
Accepted

Why does emacs on a remote computing cluster behave differently depending on how the cluster is accessed?

W.r.t the 4s delay, you should probably look at the $TERM env-var (e.g. with echo "$TERM" run from the same shell from which you start emacs) and then try and look at the corresponding terminal-init-&...
Stefan's user avatar
  • 26.5k
1 vote

Bring Emacs frame to front when running emacsclient on WSL

This is a kind of quirky way of achieving it, but it worked for me. Having frame-title-format set to its original value: (setq frame-title-format '(multiple-frames "%b" ...
nephewtom's user avatar
  • 2,271
1 vote
Accepted

Shell-mode execute script every time a shell is invoked

I would like to execute a script [...] every time I enter M-x shell This is supported as standard. Emacs sends the new shell the contents of the file ~/.emacs_SHELLNAME as input, if it exists, ...
phils's user avatar
  • 51.7k
1 vote

What flows are usable with WSL and Emacs (Windows Subsystem For Linux)?

From what I've learned WSL currently has limited capabilities to run arbitrary code. All Linux executable is hidden inside %APPDATA% directory and isn't launchable from w32 world. Special executable ...
gavenkoa's user avatar
  • 3,462

Only top scored, non community-wiki answers of a minimum length are eligible