Change X11 window title after emacs started

前端 未结 3 1131
無奈伤痛
無奈伤痛 2021-02-14 15:55

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 f

相关标签:
3条回答
  • 2021-02-14 16:11

    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 讨论(0)
  • 2021-02-14 16:23
    M-x set-frame-name NewName RET
    

    and from elisp

    (set-frame-name "NewName")
    
    0 讨论(0)
  • 2021-02-14 16:33

    I use

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

    to include the current buffer name in the frame title.

    0 讨论(0)
提交回复
热议问题