Both sides previous revisionPrevious revisionNext revision | Previous revision |
other:emacs_doc [2024/05/07 16:46] – [Example configuration file] Added new config file jypeter | other:emacs_doc [2025/08/05 16:12] (current) – [Windows installation] jypeter |
---|
* IF the automated installation with ''winget'' does not work, download the most recent Windows installer from a gnu //ftp// mirror | * IF the automated installation with ''winget'' does not work, download the most recent Windows installer from a gnu //ftp// mirror |
* Go to a [[https://ftpmirror.gnu.org/emacs/windows/|gnu emacs for windows ftp mirror]] | * Go to a [[https://ftpmirror.gnu.org/emacs/windows/|gnu emacs for windows ftp mirror]] |
* Go to the most recent ''emacs-XX/'' folder (e.g. ''emacs-29/'' as of February 2024) | * Go to the most recent ''emacs-XX/'' folder (e.g. ''emacs-29/'' as of August 2024) |
* Download the most recent ''emacs-XX.YY-installer.exe'' file (e.g. ''emacs-29.2_1-installer.exe'' as of February 2024) and execute it | * Download the most recent ''emacs-XX.YY-installer.exe'' file (e.g. ''emacs-29.4-installer.exe'' as of August 2024) and execute it |
| |
* If everything went well, you should have a new ''Start''=>''Emacs-XX'' menu that you can use to start ''emacs'' | * If everything went well, you should have a new ''Start''=>''Emacs-XX'' menu that you can use to start ''emacs'' |
* If the menu shortcuts have **not** been installed: | * If the menu shortcuts have **not** been installed: |
* Go to the emacs binaries directory: ''C:\\Program Files\\Emacs\\emacs-XX.YY\\bin'' | * Go to the emacs binaries directory: ''C:\Program Files\Emacs\emacs-XX.YY\bin'' |
* Click on the ''addpm.exe'' program to (re-)run the program that will create the shortcuts ([[https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/Installing-binaries.html|official page]]) | * Click on the ''addpm.exe'' program to (re-)run the program that will create the shortcuts ([[https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/Installing-binaries.html|official page]]) |
| |
* You can work with the default ''emacs'' settings, but it is highly recommended to start with a nice existing emacs configuration file (if available) | * You can work with the default ''emacs'' settings, but it is highly recommended to start with a nice existing emacs configuration file (if available) |
* [[other:emacs_doc#example_configuration_file|Example configuration file]] | * [[other:emacs_doc#example_configuration_file|Example configuration file]] |
| |
| * Note: Emacs is installed in the ''C:\Program Files\Emacs\emacs-XX.YY\bin'' directory |
| |
=== Recommended EXTRA binaries for Windows === | === Recommended EXTRA binaries for Windows === |
* **If** you need to use the **emacs //ediff// mode to compare text files**\\ <wrap hi>Very useful</wrap> | * **If** you need to use the **emacs //ediff// mode to compare text files**\\ <wrap hi>Very useful</wrap> |
* Install the Windows version of [[https://www.gnu.org/software/diffutils/diffutils.html|Gnu diffutils]] | * Install the Windows version of [[https://www.gnu.org/software/diffutils/diffutils.html|Gnu diffutils]] |
* Download the //Complete package, except sources installer// (''diffutils-2.8.7-1.exe'' as of February 2024) from [[https://gnuwin32.sourceforge.net/packages/diffutils.htm|]] and execute the installer | * Can be installed with ''[[other:win10apps#installing_applications_with_winget|winget]]'': ''[[https://ragerworks.com/package/GnuWin32.DiffUtils|winget install --id=GnuWin32.DiffUtils -e]]'' |
* This will install the required binaries and reources in ''C:\Program Files (x86)\GnuWin32\'' | * Otherwise, download the //Complete package, except sources// ''Setup'' installer (''diffutils-2.8.7-1.exe'' as of August 2025) from [[https://gnuwin32.sourceforge.net/packages/diffutils.htm|]] and execute the installer |
* If you use the recommended ''.emacs'' configuration file, it should already have a section telling emacs where to find the ''diffutils'' binaries it needs for comparing text files | * This will install the required binaries and reources in ''C:\Program Files (x86)\GnuWin32\'' |
* <code>(when (eq window-system 'w32) | * If you use the recommended ''[[#example_configuration_file|.emacs]]'' configuration file, it should already include the following section telling ''emacs'' where to find the ''diffutils'' binaries it needs for comparing text files\\ ...Otherwise add these lines to your ''.emacs'' file |
| * <code>(when (eq window-system 'w32) |
(setq exec-path (append exec-path '("C:\\Program Files (x86)\\GnuWin32\\bin"))) | (setq exec-path (append exec-path '("C:\\Program Files (x86)\\GnuWin32\\bin"))) |
)</code> | )</code> |
* FIXME Check if there is a recent //compiled for Windows// version of ''diffutils''\\ As of February 2024... | * FIXME Check if there is a recent //compiled for Windows// version of ''diffutils''\\ As of August 2025... |
* [[https://savannah.gnu.org/news/?id=10368|diffutils-3.10]] is available (released in May 2023) | * [[https://savannah.gnu.org/news/?id=10368|diffutils-3.12]] sources are available (released in April 2025) |
* The ''2.8.7-1'' Win32 binaries are dated //May 2004//, but **work perfectly fine**! | * Only the ''2.8.7-1'' Win32 binaries are available (dated //May 2004//), but **work perfectly fine**! |
| |
=== emacs for Windows technical notes === | === emacs for Windows technical notes === |
File is missing: Opening output file, No such file or directory, c:/Users/your_login/AppData/Roaming/.emacs.d/server/server</code> | File is missing: Opening output file, No such file or directory, c:/Users/your_login/AppData/Roaming/.emacs.d/server/server</code> |
* You may want to **change the default font** defined in the recommended configuration file, depending on the fonts available on the computer/server where ''emacs'' is running, the size of your screen, etc... | * You may want to **change the default font** defined in the recommended configuration file, depending on the fonts available on the computer/server where ''emacs'' is running, the size of your screen, etc... |
* The recommended configuration file will probably use the ''Consolas'' or ''Cascadia Code'' fonts, with size ''12'', available on Windows. Note: the ''Cascadia Code'' font is only available if you have installed [[other:win10apps#windows_terminal|Windows Terminal]] | * The recommended configuration file will probably use the ''Consolas'' or ''Cascadia Code'' fonts, with size ''12'', available on Windows. |
* Changing the default font: | * Changing the default font: |
* ''Options''=>''Set Default Font...'' | * ''Options''=>''Set Default Font...'' |
* Select a font and size | * Select a font and size |
* Linux: ''DejaVu Sans Mono'', size 12 | * Linux: ''DejaVu Sans Mono'', size 12 |
* Windows: ''Consolas'' or ''Cascadia Code'', size 10 or 12 | * Windows: ''Consolas''+''Normal'' size ''12'' or ''Cascadia Code''+''Regular'' size ''10'' |
| * Note: the ''Cascadia Code'' font is only available after installing [[other:win10apps#windows_terminal|Windows Terminal]] |
* Mac: FIXME | * Mac: FIXME |
* ''Options''=>''Save Options'' | * ''Options''=>''Save Options'' |
==== Windows ==== | ==== Windows ==== |
| |
Using ''winget upgrade'' for updating emacs on Windows unfortunately [[https://github.com/microsoft/winget-pkgs/issues/88443#issuecomment-1688257680|does not work yet (August 2023)]]. The easiest way to update Emacs is: | <note tip>''winget list'' returns a result, **after installing ''Emacs 30.1''**, so it is possible that ''winget upgrade'' will work, at last! :-) |
| |
| <code>> winget list --id GNU.Emacs |
| Nom ID Version Disponible Source |
| -------------------------------------------------- |
| GNU Emacs 30.1 GNU.Emacs Unknown 30.1 winget</code></note> |
| |
| Using ''winget upgrade'' for updating emacs on Windows unfortunately [[https://github.com/microsoft/winget-pkgs/issues/88443#issuecomment-1688257680|does not work yet (August 2024)]]. The easiest way to update Emacs is: |
| |
* Check the version of the installed Emacs | * Check the version of the **installed** Emacs |
* In the ''Start'' menu: ''Start'' => ''E'' => ''Emacs-**version**'' (e.g. ''Emacs 28.2'') | * In the ''Start'' menu: ''Start'' => ''E'' => ''Emacs-**version**'' (e.g. ''Emacs 29.3'') |
* In a running Emacs: ''Help'' menu => ''About Emacs'' | * In a running Emacs: ''Help'' menu => ''About Emacs'' |
| * or ''M-x version'' |
* Use ''winget show'' in a PowerShell to determine (all) the available versions | * Use ''winget show'' in a PowerShell to determine (all) the available versions |
* <code>PS C:> winget show --id GNU.Emacs --versions | * <code>PS C:> winget show --id GNU.Emacs --versions |
Version | Version |
------- | ------- |
29.1 | 29.4 |
28.2 | 29.3 |
| 29.2 |
[...]</code> | [...]</code> |
* If you want/need to update Emacs (after making sure it is not running) | * If you want/need to update Emacs |
* Uninstall it with: ''Start'' => ''E'' => ''Emacs-**version**'' => ''Uninstall''\\ Your emacs configuration file and other files you have installed will **not** be removed! | * Make sure Emacs it is not running |
| * Uninstall it with: ''Start'' => ''E'' => ''Emacs-**version**'' => ''Uninstall'' |
| * Your emacs configuration file and other files you have installed will **not** be removed! |
| * This will remove the ''C:\Program Files\Emacs'' directory and its content |
| * Slight //bug//: this will **not** remove the shortcuts from the ''Start'' menu |
| * e.g. If you uninstalled emacs 29.3 and installed emacs 29.4, you will end up with the following ''Start'' Menu:{{ :other:emacs_in_start_menu.jpg?direct&200 |}} |
| * Just go to the ''C:\Users\your_login\AppData\Roaming\Microsoft\Windows\Start Menu\Programs'' directory and remove the **old** menu/directory (e.g. ''Emacs-29.3'') |
* Perform a new [[other:emacs_doc#windows_installation|Emacs for Windows installation]] | * Perform a new [[other:emacs_doc#windows_installation|Emacs for Windows installation]] |
| |