all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21732: 25.0.50; intermittent failure using windmove when in doc-view buffer
@ 2015-10-22  7:12 Daniel McClanahan
  2015-10-22 10:05 ` martin rudalics
  2015-10-22 14:56 ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: Daniel McClanahan @ 2015-10-22  7:12 UTC (permalink / raw)
  To: 21732

I've been experiencing this issue at least for months, I don't think I
remember a time when it wasn't happening (I've only used emacs for a
year or so). Occasionally, when viewing a file in doc-view-mode, I've
noticed that using windmove (which I use for all my window movements)
left, right, up, or down occasionally fails, throwing the error "Wrong
type argument: wholenump, -<num>", for some number num.

I've attached gdb and found that this is because "cursor.y" of the
window being chosen is negative, which I found after attaching a
breakpoint to "posn-at-point," which was throwing the error, and
following it down a few calls to "pos_visible_p", and checking the
value of "w" in there. I don't know what "w->cursor.y" represents (I
know it's cursor position, but I don't know how that maps to the
cursor's lisp representation), and although I've delved into xdisp.c
to see why that would be negative (but only sometimes) in doc-view
buffers, I haven't been able to see where the cursor position is
updated, and I've spent a few hours checking it out but am finding it
difficult to follow a lot of the xdisp.c code.

Is this something that has been seen before? I encounter it relatively
often when working with a text buffer open in one window and a pdf
open in doc-view-mode in an adjacent window.

Steps to reproduce: kind of hard, since it's very intermittent.
Basically, just switch window focus between a pdf and another buffer a
few times over a period of editing time, and it should show up
(typically within 30 minutes for me).

I've also noticed that when this "wholenump" error occurs, the line
number in the mode line is set to (1- the number of lines in the
document), when the line number in the mode line for doc-view-mode is
usually set to 1. I don't recall when this is changed. Also, after
this situation occurs (the wholenump error appears), I cannot zoom in
or out or change pages.

Sorry for the poor report, I wish I had more information but wanted to
know if this was a known problem already.





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

end of thread, other threads:[~2015-11-09  8:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22  7:12 bug#21732: 25.0.50; intermittent failure using windmove when in doc-view buffer Daniel McClanahan
2015-10-22 10:05 ` martin rudalics
2015-10-22 14:56 ` Eli Zaretskii
2015-10-23  3:52   ` Daniel McClanahan
2015-10-23  5:43     ` Tassilo Horn
2015-10-23 18:22       ` Daniel McClanahan
2015-10-23 19:28         ` Tassilo Horn
2015-10-24  7:58         ` martin rudalics
2015-10-24  9:21           ` martin rudalics
2015-11-07  9:51             ` Daniel McClanahan
2015-11-07 12:30               ` Eli Zaretskii
2015-11-09  1:53                 ` Daniel McClanahan
2015-11-09  8:26                   ` martin rudalics

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.