all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to close or kill *messages* window by using elisp script
@ 2019-06-04  8:08 Budi
  2019-06-04 13:16 ` Budi
  0 siblings, 1 reply; 6+ messages in thread
From: Budi @ 2019-06-04  8:08 UTC (permalink / raw)
  To: help-gnu-emacs

How to close or kill *messages* window  by using script of emacs lisp


running this

(quit-window nil "*Messages*")

yields error:

window-normalize-window: *Messages* is not a live window

Sincere useful help is so invaluable



^ permalink raw reply	[flat|nested] 6+ messages in thread
* How to close or kill *messages* window by using elisp script
@ 2019-06-05  7:22 martin rudalics
  2019-06-05  7:52 ` Emanuel Berg via help-gnu-emacs
  0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2019-06-05  7:22 UTC (permalink / raw)
  To: budikusasi; +Cc: help-gnu-emacs

 > How to close or kill *messages* window  by using script of emacs lisp
 >
 >
 > running this
 >
 > (quit-window nil "*Messages*")
 >
 > yields error:
 >
 > window-normalize-window: *Messages* is not a live window

The doc-string of 'quit-window' says


(quit-window &optional KILL WINDOW)

Quit WINDOW and bury its buffer.
WINDOW must be a live window and defaults to the selected one.


but *Messages* is a string most likely denoting a buffer.  Try
running

(let ((window (get-buffer-window "*Messages*")))
   (when (window-live-p window)
     (quit-window nil window)))

instead.

martin



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-05  7:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-04  8:08 How to close or kill *messages* window by using elisp script Budi
2019-06-04 13:16 ` Budi
2019-06-04 13:23   ` Anders Dalskov
2019-06-04 14:56   ` Michael Heerdegen
  -- strict thread matches above, loose matches on Subject: below --
2019-06-05  7:22 martin rudalics
2019-06-05  7:52 ` Emanuel Berg via help-gnu-emacs

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.