Now on my Windows 10 laptop, I'm not seeing David's original problem.  I
can pin Emacs after running it from runemacs.exe and run multiple instances
and they are grouped on the taskbar as desired.  i checked and the shortcut
does not have an AppID, but things are working as desired.

I added the AppID to the shortcut in my Start Menu folder, started Emacs
using it, pinned it to the taskbar, and the shortcut *does* have the
"GNU.Emacs" AppID and things work as desired.

So now I'm not sure what's going on.  I've gotten it to work on Win7, Win8,
and Win10.  And maybe on this Win10 laptop things have gotten messed up.  I
may have to create plain VMs without Emacs every having been installed/run
and then test things.   But for now, it seems it *can* be made to work on
all three OS's, maybe having to set the AppID in a shortcut.



On Thu, Oct 15, 2015 at 6:02 PM, Rob Davenport <rob.davenp...@us.abb.com>
wrote:

> The start menu is involved because I noticed when monitoring file/registry
> activity during the act of pinning Emacs, I saw that windows was looking at
> the Emacs.lnk file that happened to be in my Start Menu.   That shortcut
> didn't have an AppID.  When I put GNU.Emacs in for the AppID, *then*
> pinning correctly created a pinned shortcut with the AppID.
>
> I assume when pinning, Windows looks for various clues as to what AppID to
> give the shortcut.  It also looks in the registry for things too.  I assume
> it wasn't able to determine what AppID to use for me until I set it in the
> shortcut in my Start Menu.
>
> Does the shortcut icon on your desktop have the AppID set?  How did you
> create that shortcut?
> (I just tried dragging runemacs.exe with a right-click and choosing
> "Create Shortcut here" and that one did not have an AppID.)
>
> I'm not sure how the one in my start menu got the app id.  I suspected I
> must have run addpm at some time and that added the appid, but it doesn't
> have code to do that.  (And running addpm used to be necessary or at least
> very useful - moreso than recently, so I know I've run it occasionally to
> set registry entries and environment variables, but I typically don't.  But
> I remembered it when see the Start Menu being examined during pinning and
> thought that using addpm might be a difference in what I do that could be
> causing different behavior.)
>
> Rob
>
> -----Original Message-----
> From: Eli Zaretskii [mailto:e...@gnu.org]
> Sent: Thursday, October 15, 2015 4:27 PM
> To: Rob Davenport <rob.davenp...@us.abb.com>
> Cc: rob.davenp...@gmail.com; help-emacs-windows@gnu.org;
> d...@austin.rr.com
> Subject: Re: [h-e-w] Fwd: Windows 10 Taskbar Behavior
>
> > From: Rob Davenport <rob.davenp...@us.abb.com>
> > CC: "help-emacs-windows@gnu.org" <help-emacs-windows@gnu.org>,
> >       "d...@austin.rr.com" <d...@austin.rr.com>
> > Date: Thu, 15 Oct 2015 19:45:19 +0000
> >
> > <time passes...>
> > I have now tried it on a Windows 8 machine.  I started Emacs via
> runemacs.exe, pinned it to the taskbar and the shortcut *does* have the
> AppID.
> > I tried running emacs.exe.   Got two windows as expected.   When I tried
> pinning the console window emacs.exe, the shortcut did *not* have the AppID.
> > When I tried pinning the GUI windows of Emacs.exe, the shortcut *did*
> have the AppID.
> >
> > On Windows 7, I used procmon and watched what files and registry entries
> are hit when pinning.  Noticed that the Emacs.lnk under the Start
> Menu\Programs\Gnu Emacs\ folder was getting queried.  I checked *that* link
> and sure enough, it did *not* have any AppID.  Hmm.   I tried giving it a
> test AppID of "MyAppID" - then, launched Emacs via that shortcut and pinned
> it.  I got another taskbar icon, in addition to the running Emacs, but no
> AppID.  Then I gave the StartMenu Emacs.lnk the 'GNU.Emacs' AppID, launched
> and pinned it.  Now the taskbar shortcut *has* the GNU.Emacs AppID.     So
> it can work on Windows 7 for me.
>
> Sorry, I got lost here somewhere.  What does the Start Menu have to do
> with this issue?
>
> > I typically launch Emacs via a command prompt alias - not the Start
> Menu.  (How do you normally start Emacs?  Start Menu shortcut, or some
> other means?)  I suspect that might be the difference in our experience in
> what lnks get the AppID in various OS's.
>
> I start Emacs from a desktop icon that invokes runemacs.exe.
>
> > The addpm program will create the Start Menu shortcut, but I don't see
> code in there that would set the AppID.  Perhaps it should?
>
> I never use addpm.  Why do you use it?
>

Reply via email to