views:

106

answers:

3

I've created two EmacsW32 frames, one for each of my monitors. I want to be able to alt-tab to the left or right frame when both frames are hidden, but I can't tell them apart because the icon order changes in the alt-tab window.

Is there some way to change the icon for a particular frame in EmacsW32 on Windows XP?

+1  A: 

So far I've found 'set-frame-name' and discovered that select-frame-by-name does actually work. I named the left frame 'left' and the right frame is 'right'. So I do see the name of the frame when I'm hitting alt-tab.

It's still not quite what I wanted though.

shapr
+2  A: 

I downloaded a couple of .ico files from a freeware web page (just google it) and tried using it, which works. Previously I tried a .bmp - because the documentation for frame parameters doesn't specify file types. Looks like for windows you have to use .ico format. My two emacs frames now look like a surfboard and a beach chair.

(set-frame-parameter (car (frame-list)) 'icon-type  "c:/path/to/bitmap/surf.ico")
Trey Jackson
In my Fedora box, I can use any image format that Emacs handles.
Török Gábor
Sadly, this does not appear to work in windows. I just created BMPs with right and left arrows, and no goodness.
shapr
Updated the code to use .ico which appears mandatory for Windows (XP at least).
Trey Jackson
After your code change, this works great! Thanks!
shapr
+1  A: 

I am using NTEmacs and hence this trick shall work on all emacs. Just set the frame titles according to buffer name to differentiate them from each other. This will get reflected in Alt-Tab. This may not work if the buffers opened are of same name though.

Put follwoing in your .emacs

;; format the title-bar to always include the buffer name
(setq frame-title-format "emacs - %b")
(setq icon-title-format "emacs - %b")
Amol Gawai