开发者

Change X11 window title after emacs started

开发者 https://www.devze.com 2022-12-21 02:24 出处:网络
When I start emacs, I can use the --title= opti开发者_开发百科on to control the title of the x-window that holds the emacs application.Is it possible to change the title after emacs starts from elisp?

When I start emacs, I can use the --title= opti开发者_开发百科on to control the title of the x-window that holds the emacs application. Is it possible to change the title after emacs starts from elisp?


M-x set-frame-name NewName RET

and from elisp

(set-frame-name "NewName")


I use

(setq frame-title-format "%b - emacs")

to include the current buffer name in the frame title.


The following worked for me (GNU EMACS 24.3.1 on cygwin multiwindow X11):

 (set-frame-parameter frame 'title arg)

which I wrapped in an interactive function

(defun set-frame-title/ag (title &optional frame)
  "set frame TITLE of &optional FRAME defaults to (selected-frame)
aka C11 window titlebar name"
  (interactive "sframe title: ")
  (set-frame-parameter frame 'title title)
  )
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号