unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Angelo Graziosi <angelo.g0@libero.it>
Cc: emacs-devel@gnu.org
Subject: Re: How to set Emacs as default app on Windows (10)
Date: Sun, 22 May 2022 08:52:00 +0300	[thread overview]
Message-ID: <83zgja6rnj.fsf@gnu.org> (raw)
In-Reply-To: <1438128271.3469357.1653181723805@mail1.libero.it> (message from Angelo Graziosi on Sun, 22 May 2022 03:08:43 +0200 (CEST))

> Date: Sun, 22 May 2022 03:08:43 +0200 (CEST)
> From: Angelo Graziosi <angelo.g0@libero.it>
> 
> 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"

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?

> 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.

"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?

> 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..)

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.



  reply	other threads:[~2022-05-22  5:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-22  1:08 How to set Emacs as default app on Windows (10) Angelo Graziosi
2022-05-22  5:52 ` Eli Zaretskii [this message]
2022-05-22  8:53   ` Angelo Graziosi
2022-05-22  9:04     ` Eli Zaretskii
2022-05-22  9:54       ` Angelo Graziosi
2022-05-22 10:27         ` Eli Zaretskii
2022-05-22 21:00           ` Angelo Graziosi
2022-05-23 10:54             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83zgja6rnj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=angelo.g0@libero.it \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).