2

I'm using Emacs 24.5.1 on windows 7.

Can I have a DIFFERENT text in the emacs window title bar and the windows task bar?

frame-title-format seems to set the same text for both locations. Setting icon-title-format seems to have no effect.

Who can help? :)

enter image description here

CSharper
  • 298
  • 2
  • 13
  • If you are referring to the image that is seen on the windows task bar when hovering over the Emacs icon with the mouse, then no, there is no way to change this with a setting within Emacs. If you are referring to something else, then please consider posting a screen-shot. – lawlist Sep 19 '16 at 15:40
  • I'm not referring to images. I refer to the text displayed in title bar and task bar. Screenshot attached. – CSharper Sep 19 '16 at 18:44
  • 1
    Thank you for the screenshot -- the concept depicted in the screenshot is fairly similar to what I see with Windows 7 Ultimate, except that I have a popup when I hover my mouse over the Emacs icon on the taskbar. In a nutshell, this is a Windows thing that cannot be controlled within Emacs other than the `frame-title-format`. Perhaps someone will have a Windows tweak to suggest. – lawlist Sep 20 '16 at 03:45
  • On a related but different note, you may wish to have the file name in the `mode-line-format` (somewhat truncated depending upon its length), and use the `frame-title-format` for organizational purposes. E.g., a frame for writing documents, a frame for programming in a particular language, a frame for email, calendar, etc. See this related thread for some ideas of how to organize buffers by frame: http://stackoverflow.com/questions/18346785/how-to-intercept-a-file-before-it-opens-and-decide-which-frame And, to associate buffers with the frame see: https://github.com/alpaker/Frame-Bufs – lawlist Sep 20 '16 at 04:21
  • As @lawlist said, this is an MS Windows question, not an Emacs question. The two names are the same, for Windows. – Drew Sep 20 '16 at 13:15
  • 1
    It was meant as an emacs question. If the answer is "cannot be set by emacs elisp" - then I'm fine with that. – CSharper Sep 20 '16 at 19:28

1 Answers1

2

You can't do this in Emacs Lisp. Or rather, you can't do it easily.

Windows inherits taskbar names from frame titles. This is the intended behaviour for all programs, and there is no default way to change it. It can be changed, but the process is hacky. I don't think Microsoft intended this feature to exist.

This question discusses a few different ways of doing it in C#. It suggests changing the underlying class the program uses to create a frame and hacking on some modifications to the displayed Title. It may be possible to do this in Elisp, but you will probably have to interface to Windows DLLs. Modifying the Emacs source code and creating a custom build is probably the better solution.

I don't think it's really worth implementing unless you have a strong need for this behaviour. I display certain data in my frame title, which I assume is what you want to do here. If you just want to have a constant display of that data without cluttering the title, it may be easier to create a one-line window at the top of every frame that will display just below the taskbar.

Community
  • 1
  • 1
JCC
  • 492
  • 3
  • 17