emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to set Emacs as default app on Windows (10)


From: Angelo Graziosi
Subject: How to set Emacs as default app on Windows (10)
Date: Sun, 22 May 2022 03:08:43 +0200 (CEST)

Usually I start Emacs with a link in the task bar which has as target:

C:\Users\utente>C:\Windows\System32\cmd.exe /c "SET 
path=C:\msys64\mingw64\bin;%path%&& SET PRELOAD_WINSOCK=1&& START /D 
^"C:\Apps\Emacs\bin^" runemacs.exe"

So trying to open a .tex file from explorer, when it asks with which 
application I want to open that file, I browsed until the bin folder of Emacs 
and chose emacs.exe. But in this way, if I had stated Emacs from the above 
link, it opens another frame (and loses also a bit of graphics) and the result 
is not very good...

Reading https://www.emacswiki.org/emacs/EmacsMsWindowsIntegration I tried this

>From a DOS box I started the Emacs client adapting the above target:

C:\Users\utente>C:\Windows\System32\cmd.exe /c "SET 
path=C:\msys64\mingw64\bin;%path%&& SET PRELOAD_WINSOCK=1&& START /D 
^"C:\Apps\Emacs\bin^" emacsclientw.exe -c -n -a C:\Apps\Emacs\bin\runemacs.exe"

and from a DOS box started as administrator, I did

ftype CodeFile=emacsclientw -na runemacs "%1"

assoc .tex=CodeFile

then tried to open the .tex file from explorer. But the result is as above, 
with another frame and losing graphics.

So, how one can set Emacs as default app on Windows 10? (the next step would be 
Gnu/Linux and macOS...)

It should open the new file in a new tab in Emacs (already running with the 
tab-line enabled) as many apps do (consider a browser with a few tabs opened 
and double clicking in explorer on a .html file..)


Ciao,
 Angelo.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]