unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Da Zhang <zhangda82@gmail.com>
Cc: 10192-done@debbugs.gnu.org
Subject: bug#10192: Emacs 24.0.92 windows build, fatal error with M-< or M->
Date: Sat, 03 Dec 2011 12:05:44 +0200	[thread overview]
Message-ID: <83wraeas1z.fsf@gnu.org> (raw)
In-Reply-To: <4ED9DECF.6000500@gmail.com>

> Date: Sat, 03 Dec 2011 03:33:19 -0500
> From: Da Zhang <zhangda82@gmail.com>
> 
> The system quit with fatal error after  running this code:
> ;; for smooth scrolling and disabling the automatical recentering of emacs when moving the cursor
> (setq-default scroll-margin 0
>        scroll-conservatively 0
>        scroll-up-aggressively 0.01
>        scroll-down-aggressively 0.01)

This should be fixed now (revision 106588 on the trunk).

If you can rebuild Emacs, the patch is below.  If you cannot rebuild,
set scroll-margin to 1, it should avoid the crashes.  (A better
solution is below, read on.)

By the way, if these customizations were needed to prevent Emacs from
recentering the display, you can now do it like this:

  (setq scroll-conservatively 101)

That is, set this single variable to a value larger than 100.  Then
Emacs will never recenter (and the crashes you had will also
disappear, even if you don't rebuild).  In previous versions of Emacs,
all kinds of weird tricks, such as the strange settings of
scroll-up-aggressively you show above, were necessary to prevent
recentering.  But in Emacs 24, no recentering will ever happen if
scroll-conservatively is set to a large number.

Here's the patch to prevent aborts with your original customizations:

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2011-12-03 07:59:23 +0000
+++ src/xdisp.c	2011-12-03 09:55:27 +0000
@@ -15617,7 +15617,7 @@ redisplay_window (Lisp_Object window, in
 	      pt_offset = float_amount * WINDOW_BOX_TEXT_HEIGHT (w);
 	      if (pt_offset == 0 && float_amount > 0)
 		pt_offset = 1;
-	      if (pt_offset)
+	      if (pt_offset && margin > 0)
 		margin -= 1;
 	    }
 	  /* Compute how much to move the window start backward from






  parent reply	other threads:[~2011-12-03 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02  5:20 bug#10192: Emacs 24.0.92 windows build, fatal error with M-< or M-> Da Zhang
2011-12-02  7:53 ` Eli Zaretskii
     [not found]   ` <4ED9DECF.6000500@gmail.com>
2011-12-03 10:05     ` Eli Zaretskii [this message]
2011-12-02 14:08 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wraeas1z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=10192-done@debbugs.gnu.org \
    --cc=zhangda82@gmail.com \
    /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 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).