bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14838: 24.3.50; repeating next-line or previous-line is broken


From: Stephen Berman
Subject: bug#14838: 24.3.50; repeating next-line or previous-line is broken
Date: Thu, 11 Jul 2013 12:04:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On Thu, 11 Jul 2013 05:51:52 +0300 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> Date: Wed, 10 Jul 2013 23:29:12 +0200
>> 
>> Starting with revision 113314, I observe the following:
>> 
>> 0. emacs -Q
>> 1. C-h n to visit NEWS
>> 2. Type C-n and hold the keys down to repeatedly move point down one line.
>> 
>> At around line 250, the motion gets jerky and then appears to stop, and
>> the cursor disappears.  After releasing the keys (but with a delay of
>> maybe a second or longer, perhaps depending on how long they were held
>> down), the cursor reappears on a line further down (which one seems to
>> depend on how long the keys were held down).  Subsequently holding down
>> C-n or C-p makes the cursor vanish and motion stop almost immediately,
>> until the keys are released.  The same thing happens if, after step 1
>> above, I type M-> and then hold down C-p (the stop seems to happen a bit
>> later, maybe after moving up about 300 lines).
>> 
>> With the revision 113360 (this one), the misbehavior begins almost
>> immediately with C-n, though with C-p it appears to be the same as
>> above.
>> 
>> When the motion starts getting jerky, my CPU load starts shooting up,
>> and hits 90%+ when the cursor disappears and motion stops, and stays at
>> that load until the cursor reappears at the new location.
>> 
>> My processor is an AMD Sempron 3400+ (64bit) with a maximum speed of
>> 1.8GHz.  In addition to the following system information, my desktop
>> environment is KDE 4.9.5.  My default font with emacs -Q is 
>> xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1
>
> Does using a different font change anything?

Yes.  First, I found out that the problems I observed do not happen when
I repeat exactly the above recipe after having removed my ~/.Xresources
file and logged in again.  That file contains this:

Emacs.FontBackend: xft
Emacs.Font: DejaVu Sans Mono-9

! ---------[ xft ] ---------
Xft*antialias:          true
Xft*autohint:           true

Without this, when I start Emacs with -Q, the font is still the one I
reported above, but now holding down C-n in NEWS works fine.  I don't
understand why, since I thought -Q means no X resources are read.

When I start Emacs with my init file but without the .Xresources file, I
also don't observe the problem with C-n.  In my initializations, I have
the font DejaVu Sans Mono-9 set as default in a custom theme loaded from
my init file (I've been using the .Xresources file since long before
creating the them, and didn't try removing till now).  So without the
.Xresources file, I have no problem using C-n with this font, but with
the above .Xresources, the problem occurs with this font.  

If I start Emacs with -q, the font used is now this:

x:-sony-fixed-medium-r-normal--16-120-100-100-c-80-iso8859-1

Also with this font I see no problem when holding down C-n.  Likewise
starting with my initializations but removing DejaVu from the custom
them, so with the -sony-fixed-medium-r-normal- font (which apparently
comes from /usr/share/X11/app-defaults/Emacs).

However, when I switch the default font (using the Options menu) to
Adobe Courier, which starting with -Q is this:

xft:-Adobe-Adobe Courier-normal-normal-normal-*-14-*-*-*-m-90-iso10646-1

and repeat the above recipe, now I do observe the problem.  This also
happens with -q and with my initializations, using Adobe Courier.

> To see which function takes most of the time, please use
> profiler-start, press C-n, then after you see CPU load for some time,
> invoke profiler-report.  It is best to do that after manually loading
> simple.el in source form.

I started Emacs like this:

emacs -Q -l ~/bzr/emacs/quickfixes/lisp/simple.el

switched the default font to Adobe Courier as described above and then
followed your instructions; here is the report:

+ call-interactively                                             6758  29%
+ next-line                                                      6059  26%
+ if                                                             5176  22%
+ line-move                                                      3875  16%
+ command-execute                                                 522   2%
  Automatic GC                                                    445   1%
+ let                                                              86   0%
+ redisplay_internal (C function)                                  35   0%
+ prog1                                                            26   0%
+ read-from-minibuffer                                             24   0%
+ find-file-noselect                                               19   0%
+ run-hooks                                                        18   0%
+ condition-case                                                   16   0%
+ cond                                                             12   0%
+ view-file                                                         8   0%
+ mapc                                                              4   0%
+ list                                                              4   0%
+ read-extended-command                                             4   0%
+ vc-mode-line                                                      3   0%
+ line-move-visual                                                  3   0%
+ file-truename                                                     2   0%
+ vc-find-file-hook                                                 2   0%
+ vc-backend                                                        2   0%
+ after-find-file                                                   2   0%
+ completing-read                                                   2   0%
+ let*                                                              1   0%
+ view-emacs-news                                                   1   0%
+ find-file-noselect-1                                              1   0%
+ vc-call-backend                                                   1   0%
  internal-timer-start-idle                                         1   0%
+ and                                                               1   0%


> Also, apply the patch I sent in
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14836#8 and post the
> contents of *Messages* after leaning on C-n for some time in this
> situation.

I did this, started Emacs -Q again as above, switched the default font
to Adobe Courier, and ran my recipe. *Message* consists of these lines:

For information about GNU Emacs and the GNU system, type C-h C-a.
bzr/emacs/quickfixes/lisp/simple.el: `with-wrapper-hook' is an obsolete macro 
(as of 24.4); use a <foo>-function variable modified by add-function.
View mode: type C-h for help, h for commands, q to quit.

followed by exactly 175 repetitions of these two lines (I used `M-x
occur' to make sure they were all identical):

vs 0 dlh 14 this nil rowh 13 rbot 1 py 0 vpos 32 last 31.0
2

and nothing else.

> I also asked to try reducing the keyboard auto-repeat rate, and see if
> that makes any difference.

The default rate in my setup is 25 repeats/s.  I lowered it to 15 and
repeated the above experiment, and the problem again occurs, but starts
later, around line 300.  Then I lowered the repeat rate to 10, which is
annoyingly slow, and here too the problem occurs, starting around line
500.

Steve Berman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]