Change X11 window title after emacs started

夙愿已清 提交于 2019-12-04 18:16:41

问题


When I start emacs, I can use the --title= option 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?


回答1:


M-x set-frame-name NewName RET

and from elisp

(set-frame-name "NewName")



回答2:


I use

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

to include the current buffer name in the frame title.




回答3:


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)
  )


来源:https://stackoverflow.com/questions/2337431/change-x11-window-title-after-emacs-started

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!