![]() 2Īt this point the combination of Windows 11, WSL and Emacs is extremely powerful and enjoyable. I guess it’s safe to say this was my biggest motivation to switch to Windows 11 and wslg as soon as possible. ![]() Before I had to restart my Emacs session almost every time my computer went to sleep and now everything works as expected. One more thing - the new setup solves the annoying “X connection closed” issue that plagued some Windows X servers (e.g. It also seems that Emacs is a bit snappier, but this mightīe just my wishful thinking. I’m writing this article in Emacs 29 running on Windows 11 + WSL and it’s gorgeous - gone are the blurry fonts and the need to use a 3rd party X server as a stop-gap measure. In general it’s an useful tool to customize the visuals of GTK apps that you’re running in WSL2. Run the tool, select some theme from it and the warnings will go away. You can fix this by installing gnome-tweaks: $ apt install gnome-tweaks You might also encounter some warnings on Emacs startup that some files from the cursor theme cannot be loaded.īasically, the problem is that most likely no GNOME theme is currently selected (simply because you don’t use GNOME directly). ![]() I also didn’t spend any time sanitizing the input - some texts might break the shell command (e.g. The only problem with it is that you’ll notice for a second the UI of clip.exe every time you use this command. My solution shells out to clip.exe from WSL and it works reliably. ( defun copy-selected-text ( start end ) ( interactive "r" ) ( if ( use-region-p ) ( let (( text ( buffer-substring-no-properties start end ))) ( shell-command ( concat "echo '" text "' | clip.exe" ))))) Mouse or a touchpad, that you might want to enable as well: I’ll update the article when I figure this out.Įmacs 29 also ships with an improved global minor mode for scrolling with a Icon in Windows, but I have been unable to figure out what exactly went usr/local/share/applications/) Emacs’s icon got replaced with a generic Linux Epic!įor some reason with the default sktop (installed by make install in It’s as simple as this! If Emacs is properly packaged it will even appear in the Windows start menu, alongside any other Linux GUI apps you’ve installed. Now you can type emacs (or emacs-29.0.50) in the WSL Ubuntu terminal and Emacs will start in GUI mode on Windows. Emacs prompts you for a filename respond by typing the filename, followed by RETURN. C-x C-f creates a new buffer that has the same name as the file. The instructions above are for Ubuntu 20.04, but the steps are quite similar for any Linux distro you might be using with (or without) WSL. You can open a file by specifying the filename when you start Emacs (as we did earlier) or by typing C-x C-f (the long command name for this is find-file ). $ sudo apt install build-essential libgtk-3-dev libgnutls28-dev libtiff5-dev libgif-dev libjpeg-dev libpng-dev libxpm-dev libncurses-dev texinfo Of any pre-built Ubuntu packages that enable pgtk, but it’s trivial to build Emacs 29 locally: $ git clone git://git.sv.gnu.org/emacs.git 26.2k 3 3 gold badges 46 46 silver badges 84 84 bronze badges. pgtk) feature branch was finally merged in Emacs’s master (which will become Emacs 29 in a couple of years). How can I use regular terminal shortcuts within Emacs Note that I am using DOOM Emacs (evil-mode). That’s great, but it requires a bit of extra work for Emacs users who have HiDPI displays,Īs Windows 11 uses Wayland/Weston and Emacs isn’t a proper GTK app (read this as - you’ll get blurry fonts). Windows 11 features built-in support for running Linux GUI applications. The instructions there are still valid for Windows 11, but now we have a second simpler way for running Linux GUI apps. Adding an extra (unless window-system (set-face-background 'default "unspecified-bg" (selected-frame))) doesn't work and only confuses graphical frames.This article is a follow-up to an older article I wrote about running Emacs with WSL2, using an X server for Windows 10. only when invoked with emacsclient -t and not when invoked with emacs). I put the above code in my init file, but only suppresses the background when opening an emacsclient in a terminal, and not emacs itself (i.e. (add-hook 'after-make-frame-functions 'on-frame-open) (set-face-background 'default "unspecified-bg" frame))) I've got it, sort of: (add-to-list 'custom-theme-load-path "~/.emacs.d/themes") How do I get emacs to use the default background color (no color at all), when the frame is not graphical? I'm using a terminal with a translucent background, and characters with a background color are not "see-through". I'd like to have emacs not to have a background color when I open a frame in the terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |