GNU bug report logs -
#36343
26.2; [PATCH] `view-echo-area-messages': set `window-point' to `point-max'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sun, 23 Jun 2019 16:31:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.2
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36343 in the body.
You can then email your comments to 36343 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36343
; Package
emacs
.
(Sun, 23 Jun 2019 16:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 23 Jun 2019 16:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
`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=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36343
; Package
emacs
.
(Sun, 23 Jun 2019 16:48:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 36343 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36343
; Package
emacs
.
(Sat, 06 Jul 2019 14:49:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 36343 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> 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
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 06 Jul 2019 14:49:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
36343 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 06 Jul 2019 14:49:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 04 Aug 2019 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.