How can I put DISPLAY name in frame-title of GNU EMACS -
i use gnu emacs on multiple monitors windoze pc via vnc.
(currently 5 - 4 big, 1 small monitor on tablet pc. 2 vertical 1200x1920, 2 horizontal 1920x1200, plus small.)
the way doing run separate vnc on each monitor. open single emacs, , use make-frame-other-display open emacs' frames in other vnc window.
to make things more complicated - run vncs on up-to-date ubuntu system, run emacs on quite out of date machine rest of build tools live. i.e. vnc displays not local same machine emacs.
rather xhost+, open xterm in each of vncs, , ssh machine running emacs. creates displays of form localhost:16.0. use make-frame-on-display using these localhost displays.
this gets confusing.
it helps if leave "echo $display" in xterm windows. or chamnge xterm's title.
i'd change emacs' frames' titles, reflect each frame things current display. doing
(defvar frame-title-specific-ag "emacs" "title element frame-title-format specific particular emacs instance; andy glew") (setq frame-title-format (list "frame=%f " (format "%s" frame-title-specific-ag) " " 'system-name " display=" (getenv "display") " %b" " " (format "pid:%d" (emacs-pid)) " user:"(user-login-name)) )
only gets display variable entire emacs.
q: there way find out display associated particular frame?
to display name current frame, use
(frame-parameter nil 'display)
or replace nil
specific frame name of display instead of current one. example, use show display in title:
(setq frame-title-format '("display=" (:eval (frame-parameter nil 'display))))
note important form quoted, list used has :eval
tells emacs run code whenever renders frame title. without that, might tempted write like:
(setq frame-title-format (list "display=" (frame-parameter nil 'display)))
but doesn't work. problem function call happens when form evaluated, , result list holding particular string, name of whatever frame in effect evaluation happened, , string not change magically.
Comments
Post a Comment