Re: [AUCTeX-devel] Proposal for changes in error overview window management

2018-04-21 Thread Mosè Giordano
Hi Juanjo,

2018-04-19 8:31 GMT+02:00 Juan Jose Garcia-Ripoll
:
> Dear all,
>
> I am submitting a proposal for a patch of the current handling of
> TeX-error-overview windows. Currently this management is very agressive and
> overrides any strategy the user wishes to set up using display-buffer-alist.

Admittedly, window management of the error overview is not perfect, I
always wanted to improve it but never had the time.  Your effort is welcome.

> Let me show an example:
>
> * I set display-buffer-alist to use popup windows for the error overview.
> * I compile the latex and produce an error overview.
> * I edit and recompile.
> * AucTeX kills the buffer but not the window before compilation
> * Compilation proceeds and a *new* window with an error overview is
> produced.

Yes, this is something I don't like either.

> The patch solves this by using only display-buffer. pop-up-buffer and
> quit-window (which knows the right strategy to take when a buffer is to be
> hidden or closed), together with set-window to change context. In current
> Emacs there is no need to manage frames and windows separately: set-window
> changes the focus to the right frame.

What I don't like about your approach is that it changes the behavior
of `TeX-error-overview-goto-source'.  I really want to keep the error
overview active while navigating through the list of errors/warnings
with `n' and `p', I don't want the frame to go away.  In addition,
when the the error overview is displayed, now the echo area shows
"nil", I didn't get why.

Besides the comments about the patch, note that AUCTeX is part of the
GNU project.  Thus, you'd have to transfer the copyright of your
contributions to the Free Software Foundation and accept to release
your contributions under the terms of the GPL v3 license.  If you're
willing to do so, please fill the form at
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/Copyright/request-assign.future;hb=HEAD
and send it to ass...@gnu.org.  Indicate Emacs as program, because
this will cover both Emacs and AUCTeX (and any other package in GNU
ELPA).

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Proposal for changes in error overview window management

2018-04-27 Thread Juan Jose Garcia-Ripoll
Here goes a second attempt. The logic now is as follows:

AucTeX does not handle frames or window creation, but when user selects
TeX-error-overview-setup to be a separate-frame, it uses
display-buffer-alist to set up one.

Within the error overview buffer, keys 'n', 'p' and 'j' are used to
navigate errors and then to jump to the offending place in the file that
originates the error.

The jump to those files is done by attempting to focus on the original
window where error overview was invoked, and open a buffer. Instead of
assuming that the file is opened in the same window, the new function
simply keeps track of that buffer and switches to it, either for display,
or also for input focus. I had to explicitely use
select-frame-set-input-focus to ensure that this works even when the error
overview is opened on a different frame.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com


second-attempt.patch
Description: Binary data
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel