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

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

Re: Problems with compile-mode


From: Daniel Pfeiffer
Subject: Re: Problems with compile-mode
Date: Mon, 24 May 2004 10:16:16 +0200

Salut,

Stefan Monnier <address@hidden> skribis:

> > In compilation-set-window-height I had added save-excursion to save the
> > first problem about insertion point.
> 
> Could you explain in detail what was that problem (I mean I remember the
> description, but I didn't understand your fix because I don't understand
> what was the underlying problem)?

The first problem was that setting compilation-window-height to any number
confused the process marker.  It would be at the beginning of buffer, before
the 3 lines compile inserts.  And the beginning of window would be just before
those lines, so that the compiler output is scrolled out of the top untli you
manually scroll.

> >      (save-current-buffer
> >        (save-selected-window
> >          (save-excursion
> >            (select-window window)
> >            (enlarge-window (- height (window-height))))))
> 
> How about placing the save-excursion before the save-selected-window ?
> In other words throwing out save-current-buffer and replacing it with
> save-excursion?

Yes, this has the same effect.  Alas this still introduces the second error
Oscar reported:

] Now, setting compilation-scroll-output to nil has no effect. The
] window always scrolls as text is added to the compilation buffer.

> Of course, maybe save-excursion should be fixed to remember which point it
> saved and to restore the same one, just like `let' was fixed to restore the
> value of a variable in the same buffer in which it was saved.

Any improvement of the underlying mechanism is welcome. :-)

> Also I don't see how the above code relates to the original problem about
> insertion, since this code is only executed from compilation-goto-locus,
> right?  I think I'm really missing something here.

No, it also gets called from compilation-start.

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / läramå / ucz się    Esperanto:
                              http://lernu.net/




reply via email to

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