[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20100: 24.4.91; Can't scroll a window while in minibuffer
From: |
Oleh Krehel |
Subject: |
bug#20100: 24.4.91; Can't scroll a window while in minibuffer |
Date: |
Fri, 13 Mar 2015 13:51:36 +0100 |
I'm trying to write a completion package using `read-from-minibuffer'
combined with `post-command-hook'.
Everything is working OK, except when I want to sync the current
completion candidate (one of buffer's lines) with the corresponding line
in the buffer.
This code, specifically `recenter', doesn't work:
(with-current-buffer buf
(goto-char (point-min))
(forward-line (1- num))
(recenter))
However, this code will scroll the window (`buf' and `wnd' correspond to
each other):
(with-current-buffer buf
(goto-char (point-min))
(forward-line (1- num))
(setf (window-point wnd)
(point)))
Still, it's not a perfect solution, since even after setting
`window-point', (window-start wnd) and (window-end wnd t) will not
return the correct thing.
I'm pretty sure it's a bug and the code above should work as is, but I'd
also appreciate pointers for achieving the scrolling and window bounds
re-calculation for the current Emacs.
regards,
Oleh
- bug#20100: 24.4.91; Can't scroll a window while in minibuffer,
Oleh Krehel <=