From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.devel Subject: How to set Emacs as default app on Windows (10) Date: Sun, 22 May 2022 03:08:43 +0200 (CEST) Message-ID: <1438128271.3469357.1653181723805@mail1.libero.it> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8582"; mail-complaints-to="usenet@ciao.gmane.io" To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 22 03:11:37 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsa89-00026G-5e for ged-emacs-devel@m.gmane-mx.org; Sun, 22 May 2022 03:11:37 +0200 Original-Received: from localhost ([::1]:38828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsa88-0006iM-1H for ged-emacs-devel@m.gmane-mx.org; Sat, 21 May 2022 21:11:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsa5T-0004iS-BF for emacs-devel@gnu.org; Sat, 21 May 2022 21:08:51 -0400 Original-Received: from smtp-35-i2.italiaonline.it ([213.209.12.35]:49509 helo=libero.it) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsa5Q-0002Xj-8c for emacs-devel@gnu.org; Sat, 21 May 2022 21:08:50 -0400 Original-Received: from oxapps-38-177.iol.local ([10.101.8.223]) by smtp-35.iol.local with ESMTPA id sa5LnLAKp5q7asa5Lnumjp; Sun, 22 May 2022 03:08:44 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1653181724; bh=4ZXw/8Pleq/LFhnVveXRoYHfDC9xEzZ1BbUNjvryzuw=; h=From; b=Na3HrldVvinRcic7jqTohyOJQqI8GDJGv4QNycqEHVTahJHFlSVC/0+umQNztABT7 83/IB/FX+4RxyuTqcAj480w6NB0j//uZRzAUmNXfUxntLB/JKczvodaSUxcxCBqZZZ 2mT+7U8OD59qErZP6hSo1EcOPuv5xk9Ef/IDeKWu90IZ1Han9xmQ1ypP0vRXQokFvz 3oaamM3LruQDTVEHoV9JvjNxKZ29gfC5gcgCI+eN/4v0hjKdwvM1B7H9rVrC4NUWSY TdSf4s/7qfvx0M7xOjGb3nMdXSOsoUOeHNoqtAl2A8bKpcFcrxGYB87VqCAgfZ/DEq guz9xNJXUjm5A== X-CNFS-Analysis: v=2.4 cv=Os+Kdwzt c=1 sm=1 tr=0 ts=62898d1c cx=a_exe a=7b6px/8Z3WZhOJKXBd5BFA==:117 a=zzDKHpGIMK4A:10 a=IkcTkHD0fZMA:10 a=0zizqwHWKqoA:10 a=xY1_shhyAAAA:8 a=NQrYKC2O878Be6Ivk_QA:9 a=QEXdDO2ut3YA:10 a=jnKQOvWMZ2QA:10 a=_qGpZPc723ggZ2AwnKam:22 X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.5-Rev39 X-Originating-IP: 87.20.236.46 X-Originating-Client: open-xchange-appsuite x-libjamsun: uUWoGz6f1aPXr8UwhqLXWfv4y4/TyS4A x-libjamv: UV+VgFd1mKQ= X-CMAE-Envelope: MS4xfLUz3NdLIxMD4DWUoDXesAMsck1QsHBaY2YqAPTwwPIw9CAY421xW2QV9vKv7JWyeODK9MYloI1gD3NFOEcx0dlmqm8iZNcs1ZT5IiGsofymOBsUZzUu jBufg+3jWEZSG/G++JTnbAD9eABJBaByZBB1OdNiacVy2dH9QaeTTg7t650JhAw463Wib+LlamceDSGlAOQg90g5zW0hC1iRqhM= Received-SPF: pass client-ip=213.209.12.35; envelope-from=angelo.g0@libero.it; helo=libero.it X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290064 Archived-At: 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.