unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20100: 24.4.91; Can't scroll a window while in minibuffer
@ 2015-03-13 12:51 Oleh Krehel
  2015-03-13 16:58 ` martin rudalics
  0 siblings, 1 reply; 7+ messages in thread
From: Oleh Krehel @ 2015-03-13 12:51 UTC (permalink / raw)
  To: 20100


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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-14  8:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 12:51 bug#20100: 24.4.91; Can't scroll a window while in minibuffer Oleh Krehel
2015-03-13 16:58 ` martin rudalics
2015-03-13 17:10   ` Oleh Krehel
2015-03-13 18:16     ` martin rudalics
2015-03-13 18:41       ` Oleh Krehel
2015-03-13 20:58         ` Eli Zaretskii
2015-03-14  8:17         ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).