[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23749: 24.3.50; can't make the cursor to the end of a buffer when th
bug#23749: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible
Sat, 11 Jun 2016 22:25:17 -0400
tag 23749 + notabug
On Sat, Jun 11, 2016 at 10:01 PM, Samuel Lê <address@hidden> wrote:
> - run "emacs -Q" from command line.
> - split emacs screen (C-x 2)
> - on one side open an elisp code (say test.el)
> - on the other side put the *scratch* buffer
> - in test.el, enter (with-current-buffer "*scratch* (insert "test\n")
> (goto-char (point-max)))
> - then press C-x e to evaluate that command
> - it inserts "test" in *scratch* buffer but doesnt go at the end of the
> - buffer.
> It works fine when buffer *scratch* is not visible.
> In GNU Emacs 18.104.22.168 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
I see the same with 25.0.95. I think it's not a bug, it's simply that
the window point is stored separately. You can use
(set-window-point (get-buffer-window) (point-max)))
to set it. Or if there are multiple windows and you want to set the
point in all of them:
(dolist (w (get-buffer-window-list))
(set-window-point w (point-max))))