From: Eli Zaretskii <eliz@gnu.org>
To: stefan.hahn@s-hahn.de, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 17281@debbugs.gnu.org
Subject: bug#17281: 24.4.50; emacs hangs in next-line
Date: Thu, 17 Apr 2014 13:16:52 +0300 [thread overview]
Message-ID: <83r44wi7l7.fsf@gnu.org> (raw)
In-Reply-To: <83wqeoib08.fsf@gnu.org>
Btw, just FYI, this code:
(defun test ()
(interactive)
(goto-char (point-min))
(save-match-data (re-search-forward "^$" nil t))
(next-line 1))
doesn't do what you think. next-line does TRT for the selected
window, but in this case the mode function 'test' runs when the buffer
that visits the file is not yet displayed in any window, certainly not
in the selected one. You want to call forward-line instead.
Stefan (Monnier), this raises a general issue with next-line: is it
supposed to work accurately in a buffer that is not the currently
selected window's buffer? If so, the call to line-pixel-height should
be made after switching to the current buffer in the selected window.
Right now, line-pixel-height returns its result computed for the
selected window, which is OK when next-line is invoked interactively,
but not if it is part of some non-interactive code, such as the mode
function in this case.
next prev parent reply other threads:[~2014-04-17 10:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-17 6:10 bug#17281: 24.4.50; emacs hangs in next-line Stefan-W. Hahn
2014-04-17 7:13 ` Eli Zaretskii
2014-04-17 7:25 ` Stefan-W. Hahn
2014-04-17 8:00 ` Eli Zaretskii
2014-04-17 8:29 ` Stefan-W. Hahn
2014-04-17 9:03 ` Eli Zaretskii
2014-04-17 10:16 ` Eli Zaretskii [this message]
2014-04-17 11:00 ` Stefan-W. Hahn
2014-04-17 11:25 ` Eli Zaretskii
2014-04-17 12:39 ` Stefan Monnier
2014-04-17 12:37 ` Stefan Monnier
2014-04-17 12:47 ` Eli Zaretskii
2014-04-17 13:16 ` Stefan Monnier
2014-04-17 12:56 ` Stefan-W. Hahn
2014-04-17 13:13 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r44wi7l7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=17281@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=stefan.hahn@s-hahn.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.