I'm trying to create a frame with the following params

(make-frame `((name . "Foo")
              (title . "[%F] %b)))

to try and create a frame with the title [Foo] buffer_name. But it seems only the name parameter is used and the frame title is only Foo.

Does title param get ignored if name is specified? The docs aren't very clear about it.

I'm using Emacs for OS X.

1 Answer 1

(make-frame `((name . ,(concat "[foo] " (buffer-name)))))

I do not see any reason to use both title and name frame parameters to achieve the goal stated in the question above. If the goal is to affect the mode-line as mentioned in the documentation below relating to using the title parameter, then there would be no need to use the name parameter.

[It is important to note that Emacs 25 contains substantial bug fixes relating to frame placement and size on OSX.]


title:  If a frame has a non-nil title, it appears in the window system’s title bar at the top of the frame, and also in the mode line of windows in that frame if mode-line-frame-identification uses ‘%F’ (see %-Constructs). This is normally the case when Emacs is not using a window system, and can only display one frame at a time. See Frame Titles.

name:  The name of the frame. The frame name serves as a default for the frame title, if the title parameter is unspecified or nil. If you don’t specify a name, Emacs sets the frame name automatically (see Frame Titles). If you specify the frame name explicitly when you create the frame, the name is also used (instead of the name of the Emacs executable) when looking up X resources for the frame.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.