From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to set Emacs as default app on Windows (10) Date: Sun, 22 May 2022 12:04:57 +0300 Message-ID: <83o7zq6ipy.fsf@gnu.org> References: <1438128271.3469357.1653181723805@mail1.libero.it> <83zgja6rnj.fsf@gnu.org> <521120714.3662391.1653209622418@mail1.libero.it> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24200"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 22 11:07:47 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 1nshYx-0006C1-5V for ged-emacs-devel@m.gmane-mx.org; Sun, 22 May 2022 11:07:47 +0200 Original-Received: from localhost ([::1]:58362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nshYv-00089N-KK for ged-emacs-devel@m.gmane-mx.org; Sun, 22 May 2022 05:07:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nshWd-0006wX-Pm for emacs-devel@gnu.org; Sun, 22 May 2022 05:05:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nshWc-00078s-By; Sun, 22 May 2022 05:05:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5VShBeoLFeAwmdoO73u2X1xTXuRVHBRuxzx06sJl+tk=; b=O4mM9c1pmiw1 xgM0uE8wMETyngR0Mop1o+GWOXtX8SqMwx9Bro5x5nR7g9ApxcXZ+rmemtEKQcj10TnqfX0JN60dY 6d+NcrkbNAReT7BbBbEVRUtfdG2Kae9Ik/vEuGaRzbWFsotXB6jrUT5cFRt1y1+O+ueKGHbpDXlRW OLjW2cqkAd/CmdD+yByMOc6nzU0hCo4A6tEp0dJbz8L3SGc/GPWrYKKOZWdRieKcm4igfvUlWUrvr PfpBN+bG+9pf0cP4ZA3q/5OIg4DTlzWquAoJfFa2yWtRMDM/+AOedG4wUnPN0zrJyJIkYOw+O7QY0 7IYq18CJ+1q8RztYBSrbkA==; Original-Received: from [87.69.77.57] (port=4028 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nshWT-0002ja-G3; Sun, 22 May 2022 05:05:20 -0400 In-Reply-To: <521120714.3662391.1653209622418@mail1.libero.it> (message from Angelo Graziosi on Sun, 22 May 2022 10:53:42 +0200 (CEST)) 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:290082 Archived-At: > Date: Sun, 22 May 2022 10:53:42 +0200 (CEST) > From: Angelo Graziosi > Cc: emacs-devel@gnu.org > > > > >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" > > > > I don't understand why you needed to change that target. What was it > > supposed to achieve, and how is that related to the issue at hand, > > which is setting up the default application to open *.tex files? > > The link above seems to suggest to use emacsclientw which uses runemacs instead to use directly runemacs.. That suggestion doesn't make sense to me, and I think it is unrelated to your issue and the original question. > > "Another frame" or "another instance of Emacs"? How many Emacs > > processes do you have running after you click on a .tex file in the > > Explorer? > > I would say: another frame and two processes (from task manager). See the screenshot Thanks, but the screenshot doesn't say definitively that there are 2 Emacs processes, it only hints on that (via the warning it shows in one of the frames). The definitive answer is to see how many Emacs processes are shown in Task Manager. I suspect that what you have is a separate Emacs process, and the reason for that is that the Emacs session that was already up and running didn't start the server (via "M-x server-start" or an equivalent in your init file). IOW, I think the issue you are having has nothing to do with the shortcut, it is due to how you customize your Emacs sessions: you should make sure the server is started there, or else it will be unable to receive client connections from emacsclient. > > The tab bar conceptually holds window configurations, not buffers or > > individual windows. AFAICT, server.el and emacsclient currently don't > > have an option to visit files in a new tab, they can only visit it > > either in an existing frame (the default) or in a new frame, if > > invoked with the -c command-line option. > > OK, I rephrase the question: How to set Emacs as default app to open .tex, .text, .c. .f90 etc. files similarly to a browser (if Emacs uses tabs...)? > > If it is not implemented you should add it in ToDo list.. If that is what you want, then I suggest to submit a feature-request bug report, since I don't think we have such a feature. I think we will need to implement a new directive in our server-client protocol to support such a feature.