emacs-devel
[Top][All Lists]
Advanced

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

Re: next-error-last-buffer


From: Juri Linkov
Subject: Re: next-error-last-buffer
Date: Thu, 13 May 2004 07:23:12 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:
>     2. Add a new user variable `next-error-find-buffer-function' and try
>     to call it (i.e. to call it if it's fbound and return its value,
>     but if it returns `nil', try other rules) in `next-error-find-buffer'
>     at the top precedence level before all other rules.
>
> Is this really an improvement?  It is not that hard for users
> who want different behavior to edit the code.

With the goal to improve configurability of the rules for finding
an appropriate compilation buffer this is really an improvement.
But with a list of rules suggested by Ted, there will be no need
in a special variable for user-defined function.

>     I thought again about why the current behavior is too confusing
>     and I think I found the reason: the most confusing is the fact that
>     the compilation buffer is visible in the window adjacent to the
>     source file window where the point is located, but typing C-x `
>     uses the last but not visible compilation buffer.
>
> Perhaps next-error should always choose a compilation or occur buffer
> that is visible in a window, rather than one that isn't.  And it
> should prefer one that is visible in the current frame to one that is
> visible in another frame.  This might help us get a better default
> behavior.

It seems this behavior will satisfy most users.

BTW, there is one related inconvenience in the compilation functionality:
when there is the compilation window on another frame, starting compilation
places another frame over the current frame, but doesn't make it active.
This is because in the function `compilation-start' the `frame' argument
of `display-buffer' is `t':

   (display-buffer outbuf nil t)
                              ^--- consider windows on all frames

Why should compilation insist on switching frames?  Shouldn't
`display-buffer-reuse-frames' define the user preference instead?

So I think `display-buffer' should use the default values:

diff -u emacs/lisp/progmodes/compile.el~ emacs/lisp/progmodes/compile.el
@@ -898,7 +905,7 @@
     (if (eq outbuf (current-buffer))
        (goto-char (point-max)))
     ;; Pop up the compilation buffer.
-    (setq outwin (display-buffer outbuf nil t))
+    (setq outwin (display-buffer outbuf))
     (with-current-buffer outbuf
       (if (not (eq mode t))
          (funcall mode)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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