From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#34939: Some minibuffer behaviour is annoying Date: Tue, 9 Apr 2019 11:26:31 -0700 (PDT) Message-ID: <54041382-cfd6-4842-aea8-741213f917e9@default> References: <1879851553195601@myt3-2475c4d2af83.qloud-c.yandex.net> <87a7hasuz4.fsf@mail.linkov.net> <87lg0tbjmj.fsf@mail.linkov.net> <877ec5zgeq.fsf@mail.linkov.net> <76a81f37-acf8-1eee-5e9d-0e44b945aaeb@yandex.ru> <877ec4wa7c.fsf@mail.linkov.net> <00a1524b-cce8-70ad-97a8-35e5ef342435@yandex.ru> <049df71d-dd1b-4683-9020-e71eb71c5dad@default> <439cea61-fb63-8214-63ce-a053f0d45bed@yandex.ru> <4eee2f08-5385-c845-07f6-355d242d3ae0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="166402"; mail-complaints-to="usenet@blaine.gmane.org" Cc: pinkanon pinkanon , 34939@debbugs.gnu.org To: Dmitry Gutov , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 09 20:27:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDvSj-000h8z-42 for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Apr 2019 20:27:13 +0200 Original-Received: from localhost ([127.0.0.1]:47461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDvSi-0000DL-2K for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Apr 2019 14:27:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDvSZ-0000CV-S0 for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2019 14:27:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDvSY-0002Aq-RE for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2019 14:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38414) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hDvSY-0002AX-Hj for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2019 14:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hDvSY-0000sR-9o for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2019 14:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Apr 2019 18:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34939 X-GNU-PR-Package: emacs Original-Received: via spool by 34939-submit@debbugs.gnu.org id=B34939.15548344043344 (code B ref 34939); Tue, 09 Apr 2019 18:27:02 +0000 Original-Received: (at 34939) by debbugs.gnu.org; 9 Apr 2019 18:26:44 +0000 Original-Received: from localhost ([127.0.0.1]:51958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDvSG-0000rp-FG for submit@debbugs.gnu.org; Tue, 09 Apr 2019 14:26:44 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:52994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDvSE-0000rJ-GW for 34939@debbugs.gnu.org; Tue, 09 Apr 2019 14:26:43 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x39IKBBU139366; Tue, 9 Apr 2019 18:26:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=6OF2Kc78nx3jZ95BMbYqaleGItvbrNJ1vc/bvCdnA34=; b=uqMda3ZwT0wq3v7b66GbWNff1eeYwP+suDoUwlNUR+cwYLdXTOANLSxMd8J5UB/uOpGy BvsahZ2Kn2Wfhswwq2TWLr/NF85m1oixpPSHmmEdbDnPN60Bj5EORHoPxWmeAUq67teZ 6WBMnDAjbEELEkWXmPHOkobfsGT/K0xDVNLAGKpVgVhB4E+CPry8s5RGzApBWKyYUAV1 gaK6E+NOAGxRf+dXC/VTC/1yJtSTBJl1PxnuaGlJs4vEpLh3fsuLXR46yx15l+vIFZA9 JhTvWVFiQ7RMIDxUiKArxglorurzzUVWjz+gaBaWz5Edwh/GTCN0zh0q8miEh1nJHlCK iw== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2rpkhsxvdj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Apr 2019 18:26:35 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x39IPc2b108659; Tue, 9 Apr 2019 18:26:34 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 2rpytbs3bf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Apr 2019 18:26:34 +0000 Original-Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x39IQWFf028378; Tue, 9 Apr 2019 18:26:32 GMT In-Reply-To: <4eee2f08-5385-c845-07f6-355d242d3ae0@yandex.ru> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4834.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9222 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=18 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904090115 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9222 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=18 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904090115 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:157427 Archived-At: > > But you _can_ see it. Before and after the `message', > > which disappears as soon as you type your next input > > char or perform some other action. Seeing happens > > in time, over time. >=20 > Yeah, it's annoying and creates a bad image for the > editor. Just see the original report. One user does not speak for all Emacs users. Bad image of the editor is in the eye of the beholder, and it should not be our primary concern. Usefulness for users (including Elisp programmers) should be our main concern. Different users make different uses of Emacs. One size - even the one size you think is great - does not fit all. > >> I'd think that much would be obvious. > > > > It's too general and abstract. Too blanket, too > > black-&-white. Too simplistic, dogmatic. > > > > Sometimes in a dialog what's _wanted_ is to interrupt. > > And there are different ways of interrupting, each of > > which can be useful, helpful. >=20 > If we do get around to having message always delegate to > minibuffer-message, there will be another function for "interrupting" > messages. It would require you to do some compatibility shimming in your > code, though. I made my points. I'm not going to argue with you. As you do, you will just do what you want anyway. I will say this though. 1. Whatever you do, please do it in Lisp, not C, so users can advise, redefine, remove, or improve on it according to their needs using Lisp. 2. Please make the behavior controllable by users and by code (Lisp). 3. Since 2009 I've used the following simple function in my code. It lets code and users control the behavior. It is in _addition_ to `minibuffer-message' and `message', as another alternative. IOW, sometimes I call `minibuffer-message', sometimes`message', and sometimes this function. An example of code controlling the behavior is binding `icicle-minibuffer-message-ok-p' to nil (conditionally) to avoid delays from using `minibuffer-message' or to inhibit possible message display. I have over a hundred calls to this function, so you can see that I am sensitive to the need to often use `minibuffer-message' when the minibuffer is active. What I disagree with is your black-&-white view of things, which leads you to want to always impose the single behavior of `minibuffer-message'. (defun icicle-msg-maybe-in-minibuffer (format-string &rest args) "Display FORMAT-STRING as a message. If called with the minibuffer inactive, use `message'. Otherwise: If `icicle-minibuffer-message-ok-p', then use `minibuffer-message'. Else do nothing (no message display)." (if (active-minibuffer-window) (when icicle-minibuffer-message-ok-p (save-selected-window (select-window (minibuffer-window)) (minibuffer-message (apply #'format (concat " [" format-string "]") args)))) (apply #'message format-string args)))