From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Intelligent stacking of messages in the echo area Date: Wed, 29 Jan 2020 00:34:15 +0200 Organization: LINKOV.NET Message-ID: <878slrcibk.fsf@mail.linkov.net> References: <87sgldfi9j.fsf@mail.linkov.net> <878sn3g0o7.fsf@gmail.com> <87pngepti3.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="13566"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Eric S Fraga Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 29 00:19:20 2020 Return-path: Envelope-to: ged-emacs-devel@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 1iwa8e-0003Db-S7 for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Jan 2020 00:19:20 +0100 Original-Received: from localhost ([::1]:38568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwa8d-0005qO-VV for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jan 2020 18:19:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48336) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwa6S-0004NP-5A for emacs-devel@gnu.org; Tue, 28 Jan 2020 18:17:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwa6R-0004yT-1e for emacs-devel@gnu.org; Tue, 28 Jan 2020 18:17:04 -0500 Original-Received: from crocodile.birch.relay.mailchannels.net ([23.83.209.45]:30759) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwa6Q-0004u6-CQ for emacs-devel@gnu.org; Tue, 28 Jan 2020 18:17:02 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B8CFF2155E; Tue, 28 Jan 2020 23:16:59 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (100-96-206-163.trex.outbound.svc.cluster.local [100.96.206.163]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5368F21AED; Tue, 28 Jan 2020 23:16:59 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Tue, 28 Jan 2020 23:16:59 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Bottle-Ruddy: 1c36897f61a1d0f0_1580253419567_1683842990 X-MC-Loop-Signature: 1580253419567:1755546706 X-MC-Ingress-Time: 1580253419566 Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTP id DB36A80F9A; Tue, 28 Jan 2020 15:16:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=r0PO+nQ35KXfzVqyJ/8TQaYY/kM=; b= Irk0D1kspKJCCAt/6bZx7EyE1Bjd+XVpmMtLmMVt1K/LJqpSWLjVWY0fqEpHBsAD wotGuYqy/rPgmKxMSl4XMg1+Ic9gEQFm/cbdcKNIeX2+lpfu4tlzoNsy1ny5fdmI v1p4rltjJ94ykFQv4QnXpiJ6IQKPkUG9KAR1LIHTjtw= Original-Received: from mail.jurta.org (m91-129-105-126.cust.tele2.ee [91.129.105.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTPSA id A71B281267; Tue, 28 Jan 2020 15:16:51 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a93 In-Reply-To: (Eric S. Fraga's message of "Fri, 24 Jan 2020 10:14:50 +0000") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrfeeggdduieehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduvdeinecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdehrdduvdeipdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvgdrfhhrrghgrgesuhgtlhdrrggtrdhukh X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.45 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244733 Archived-At: >> Good heuristics. Another heuristics that could be added is >> to filter out transient messages ending with ellipsis - >> added here to a new variable like Eli asked to do: > > Just to say thank you. I've been using this bit of code for the past > two or three weeks and it works very well. > > I added to your regex for my particular situation: > > #+begin_src elisp > (defcustom multi-message-transient "\\(\\.\\.\\.\\'\\|^,\\|^C-\\|^pop3 retrieved\\)" > "Regexp to filter out transient messages that should not be stacked." > :type 'regexp > :group 'minibuffer > :version "28.1") > #+end_src Thanks. This means that this option multi-message-transient is useful after all. BTW, I customized it to "^Mark\\|\\.\\.\\.\\'" to skip mark-related messages like "Mark set" and "Mark deactivated". Now what remains to do is to combine multi-message feature with minibuffer-message, so when the minibuffer is not active then multi-line messages are displayed in the echo-area, otherwise multi-line messages are displayed at the end of the minibuffer: (defun set-multi-message--wrapper (orig-fun message) (let* ((multi-message (set-multi-message message))) (or (funcall orig-fun multi-message) multi-message))) (setq set-message-function 'set-minibuffer-message) (add-function :around set-message-function #'set-multi-message--wrapper)