From unknown Wed Jun 25 05:43:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36343: 26.2; [PATCH] `view-echo-area-messages': set `window-point' to `point-max' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 16:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 36343@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15613074099361 (code B ref -1); Sun, 23 Jun 2019 16:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2019 16:30:09 +0000 Received: from localhost ([127.0.0.1]:54165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf5NW-0002Qr-Vp for submit@debbugs.gnu.org; Sun, 23 Jun 2019 12:30:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:49591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf5NS-0002Qc-BD for submit@debbugs.gnu.org; Sun, 23 Jun 2019 12:30:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55236) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf5NQ-0001UN-K2 for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 12:30:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hf5NL-0003dP-5o for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 12:29:58 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51834) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hf5NG-0003IK-Sf for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 12:29:52 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5NGOHdd108053 for ; Sun, 23 Jun 2019 16:29:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=AwBxThAUebfBonCFT5v5McY2FXPwMMlgz/9ZskYA9wM=; b=34y6DeuHhx7R6vT0Nhvpl1kKPtJgqcCjXNuPthR/a6h5QDuoYgJGyoGFAddB9uRmHTHz SsFwGetaKE4B2n8Q46MozsvaZtVN9wrgBBhQ7EXrT7Cb5pTGBHA5bUuYspSw9YBXRqWB VtWg7eYqhFP1WKlBzkPzffBPcH/YgcyEmRaOcw5k9WrTKORe77IIoZ9mqV33njP6QJHw PosSCmaAcKKOPM6g0xoiyMXom3I9h63SnffSQQ2F1St/IDFEyyepZZksJRGUnv/y0uj1 mfooo2XXj/0cXFWH+fagfTL/J4mbsxZeOZMq3LV8Zu1RxC4d7BvHtBqZ3p03PJ1jb5Bo bA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2t9cyq2xjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 23 Jun 2019 16:29:45 +0000 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 x5NGSjVj158538 for ; Sun, 23 Jun 2019 16:29:44 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2t9p6t89p8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 23 Jun 2019 16:29:44 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x5NGThCc005204 for ; Sun, 23 Jun 2019 16:29:43 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 23 Jun 2019 09:29:42 -0700 (PDT) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9297 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1906230143 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9297 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1906230143 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) `C-h f view-echo-area-messages' says this: View the log of recent echo-area messages: the '*Messages*' buffer. The number of messages retained in that buffer is specified by the variable 'message-log-max'. It does that. But one might expect "view the log of recent" to mean make the most recent msgs logged visible. That doesn't happen if `*Messages*' is already displayed in a window other than the selected one. This definition fixes that. It just sets `window-point'. Hopefully you don't need an explicit *.patch to apply this fix. (defun view-echo-area-messages () "View the log of recent echo-area messages: the `*Messages*' buffer. The number of messages retained in that buffer is specified by the variable `message-log-max'." (interactive) (with-current-buffer (messages-buffer) (goto-char (point-max)) (let ((win (display-buffer (current-buffer)))) (set-window-point win (point)) win))) This definition doesn't do anything special to make all parts of the buffer visible - it doesn't `widen' or show any text that might be hidden. It just makes sure that the most recent msgs that are aleady visible are on-screen. I think that's probably what we want. --- If you really think the current behavior is what users expect, and you think it should be kept as the default behavior, then please consider at least letting a prefix arg set the window point to `point-max': (defun view-echo-area-messages (arg) "View the log of recent echo-area messages: the `*Messages*' buffer. The number of messages retained in that buffer is specified by the variable `message-log-max'. With a prefix arg move `window-point' to `point-max'." (interactive "P") (with-current-buffer (messages-buffer) (goto-char (point-max)) (let ((win (display-buffer (current-buffer)))) (when arg (set-window-point win (point))) win))) The code above (both versions) returns the window, like the current code. Dunno whether that's important, but at least that behavior is preserved, just in case something depends on it. --- Note: You might also want to consider giving users the ability (i.e. option) to ensure that `message' itself always moves `window-point' to `point-max' in any window that is already displaying `*Messages*'. Just a suggestion - not part of this bug report. See, for example, https://stackoverflow.com/q/4682033/729907. In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13 Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749 Windowing system distributor `Microsoft Corp.', version 10.0.17134 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' From unknown Wed Jun 25 05:43:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36343: 26.2; [PATCH] `view-echo-area-messages': set `window-point' to `point-max' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 16:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 36343@debbugs.gnu.org Received: via spool by 36343-submit@debbugs.gnu.org id=B36343.156130845611743 (code B ref 36343); Sun, 23 Jun 2019 16:48:01 +0000 Received: (at 36343) by debbugs.gnu.org; 23 Jun 2019 16:47:36 +0000 Received: from localhost ([127.0.0.1]:54358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf5eS-00033J-5w for submit@debbugs.gnu.org; Sun, 23 Jun 2019 12:47:36 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:54992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf5eQ-000333-PF for 36343@debbugs.gnu.org; Sun, 23 Jun 2019 12:47:35 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5NGiDSA119011 for <36343@debbugs.gnu.org>; Sun, 23 Jun 2019 16:47:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=0Ux3LktNnwMjilZD/82rgSH2/6lMy8E/bgbmBJQalXA=; b=Lhr90vIsOCEUbiMFVzKdx4WsI83zzYETGa/L0iN/3h1N72KJecBIKEkci+A0Np7/6nGj plmQs9Q2mDEGgXVbWSz+HG7H1LgLriWNWV4+67c5cwBuY2z9LigRrf3lgHxVF+GaaNd/ ZTrbRoE2yHyOG9euSttVhwb7ZH0BHHySgRcH+/Aus7oXGxJ1FieBuNfP/zvDZzfzDoji uhMwwr9NhIq8jzFE0rvJE6+JNyHsPL7uHbynmsFHqUxgwdp9Zmu7xUg9g8Q4PejyYVps Nw3D7uUEYuOraDWbwaBg394uQBq0DAaTaN5s6RiqScRq9919uyjj8C+WAagcGdZhQ6OH sw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2t9cyq2y67-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <36343@debbugs.gnu.org>; Sun, 23 Jun 2019 16:47:27 +0000 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 x5NGkxxK181897 for <36343@debbugs.gnu.org>; Sun, 23 Jun 2019 16:47:26 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2t9p6t8ceg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <36343@debbugs.gnu.org>; Sun, 23 Jun 2019 16:47:26 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x5NGlNcU013821 for <36343@debbugs.gnu.org>; Sun, 23 Jun 2019 16:47:26 GMT MIME-Version: 1.0 Message-ID: <64881836-0348-416a-ab6d-10cc918fa981@default> Date: Sun, 23 Jun 2019 09:47:22 -0700 (PDT) From: Drew Adams References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9297 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=13 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=992 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906230146 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9297 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=13 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 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-1906230146 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) A question might be whether _all_ windows showing `*Messages*' should be handled this way. I figured that if someone has multiple such windows then probably she does _not_ want all to be handled this way. Another possibility is to give users some control over this via the prefix arg. From unknown Wed Jun 25 05:43:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36343: 26.2; [PATCH] `view-echo-area-messages': set `window-point' to `point-max' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jul 2019 14:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Drew Adams Cc: 36343@debbugs.gnu.org Received: via spool by 36343-submit@debbugs.gnu.org id=B36343.156242451519310 (code B ref 36343); Sat, 06 Jul 2019 14:49:01 +0000 Received: (at 36343) by debbugs.gnu.org; 6 Jul 2019 14:48:35 +0000 Received: from localhost ([127.0.0.1]:55731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjlzP-00051O-Gl for submit@debbugs.gnu.org; Sat, 06 Jul 2019 10:48:35 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjlzM-00051F-Hu for 36343@debbugs.gnu.org; Sat, 06 Jul 2019 10:48:34 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjlzI-0005R4-3R; Sat, 06 Jul 2019 16:48:30 +0200 From: Lars Ingebrigtsen References: Date: Sat, 06 Jul 2019 16:48:27 +0200 In-Reply-To: (Drew Adams's message of "Sun, 23 Jun 2019 09:29:42 -0700 (PDT)") Message-ID: <878stbdxs4.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > This definition fixes that. It just sets `window-point'. Makes sense. I've inserted it in the Emacs trunk. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: > This definition fixes that. It just sets `window-point'. Makes sense. I've inserted it in the Emacs trunk. > Hopefully you don't need an explicit *.patch to apply this fix. No, but that would be very convenient, especially if you write ChangeLog-format change messages. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 10:48:39 2019 Received: (at control) by debbugs.gnu.org; 6 Jul 2019 14:48:39 +0000 Received: from localhost ([127.0.0.1]:55734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjlzS-00051e-Pm for submit@debbugs.gnu.org; Sat, 06 Jul 2019 10:48:38 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjlzR-00051W-IG for control@debbugs.gnu.org; Sat, 06 Jul 2019 10:48:37 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjlzO-0005RB-VR for control@debbugs.gnu.org; Sat, 06 Jul 2019 16:48:36 +0200 Date: Sat, 06 Jul 2019 16:48:34 +0200 Message-Id: <877e8vdxrx.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #36343 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 36343 fixed close 36343 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 36343 fixed close 36343 27.1 quit