From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Covici Newsgroups: gmane.emacs.help Subject: Re: Is there a way to avoid clobbering minibuffer by messages? Date: Fri, 31 Mar 2023 07:04:19 -0400 Organization: Covici Computer Systems Message-ID: References: <3f004ca9-1f71-2c5b-17f1-e154f209e6d3@gmail.com> <83ilei62o6.fsf@gnu.org> <8d94bd37-d657-cf14-c0cb-372cde983ee0@gmail.com> <837cuy5y2m.fsf@gnu.org> <612cf8b3-9dea-a487-893d-241728f71944@gmail.com> <58158ae498edfb9d8921@heytings.org> <58158ae4986f49e1690e@heytings.org> <58158ae49879a773345e@heytings.org> <58158ae498b2bf0b33f8@heytings.org> Reply-To: covici@ccs.covici.com Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28843"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Platon Pronko , Eli Zaretskii , help-gnu-emacs@gnu.org To: Gregory Heytings Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 31 13:05:00 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1piCZ2-0007Gm-Jl for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 31 Mar 2023 13:05:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piCYh-0005Fb-R5; Fri, 31 Mar 2023 07:04:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piCYg-0005FQ-EE for help-gnu-emacs@gnu.org; Fri, 31 Mar 2023 07:04:38 -0400 Original-Received: from debian-2.covici.com ([166.84.7.93] helo=covici.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piCYd-0002XT-Dy; Fri, 31 Mar 2023 07:04:36 -0400 Original-Received: from ccs.covici.com (ccs.covici.com [70.109.51.194]) (authenticated bits=0) by covici.com (8.15.2/8.15.2/Debian-22) with ESMTPSA id 32VB9lpr431179 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 31 Mar 2023 07:09:48 -0400 Original-Received: from ccs.covici.com (localhost [127.0.0.1]) by ccs.covici.com (8.17.1.9/8.17.1) with ESMTPS id 32VB4Qd13908755 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 31 Mar 2023 07:04:27 -0400 Original-Received: (from covici@localhost) by ccs.covici.com (8.17.1.9/8.17.1/Submit) id 32VB4Jjh3908668; Fri, 31 Mar 2023 07:04:19 -0400 In-Reply-To: <58158ae498b2bf0b33f8@heytings.org> Received-SPF: pass client-ip=166.84.7.93; envelope-from=covici@ccs.covici.com; helo=covici.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143178 Archived-At: Would this work if I am using a virtual console -- in that case there would be no frame or anything like that? On Fri, 31 Mar 2023 03:45:09 -0400, Gregory Heytings wrote: > > [1 ] > > >> I think of modeline as something buffer-specific, so I don't > >> want to put global messages there. > > > > In that case you can try the other file I posted, with which > > messages are displayed in a popup buffer. > > > > Here it is again, with a few corrections. Again messages are > displayed in a popup buffer only when the minibuffer is active. > [2 popup-buffer-minibuffer-message.el ] > (defvar popup-buffer-minibuffer-message-window nil) > (defvar popup-buffer-minibuffer-message-timer nil) > (defun popup-buffer-minibuffer-message-clear () > (when (not noninteractive) > (when (timerp minibuffer-message-timer) > (cancel-timer popup-buffer-minibuffer-message-timer) > (when (window-live-p popup-buffer-minibuffer-message-window) > (delete-window popup-buffer-minibuffer-message-window))))) > (defun popup-buffer-minibuffer-message-set (message) > (let* ((minibuf-window (active-minibuffer-window)) > (minibuf-frame (and (window-live-p minibuf-window) > (window-frame minibuf-window)))) > (when (and (not noninteractive) > (window-live-p minibuf-window) > (or (eq (window-frame) minibuf-frame) > (eq (frame-parameter minibuf-frame 'minibuffer) 'only))) > (progn > (when (numberp minibuffer-message-clear-timeout) > (setq popup-buffer-minibuffer-message-timer > (run-with-timer minibuffer-message-clear-timeout nil > #'popup-buffer-minibuffer-message-clear))) > (let ((buffer (get-buffer-create " *Popup Echo Area*"))) > (unless (window-live-p popup-buffer-minibuffer-message-window) > (setq popup-buffer-minibuffer-message-window > (display-buffer > buffer > '(display-buffer-in-side-window (window-height . 1))))) > (with-current-buffer buffer > (setq-local mode-line-format nil cursor-type nil) > (erase-buffer) > (insert message)) > (fit-window-to-buffer popup-buffer-minibuffer-message-window > 10 1)) > t)))) > (setq clear-message-function #'popup-buffer-minibuffer-message-clear) > (setq set-message-function #'popup-buffer-minibuffer-message-set) -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici wb2una covici@ccs.covici.com