GNU bug report logs - #4808
23.1.50; calc-quit move point to another window

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Mon, 26 Oct 2009 14:05:05 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4808 in the body.
You can then email your comments to 4808 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4808; Package emacs. (Mon, 26 Oct 2009 14:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 26 Oct 2009 14:05:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; calc-quit move point to another window
Date: Mon, 26 Oct 2009 13:56:10 +0000
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Lately I have been using a three-window setup for writing in LaTeX and I
have found that calc move point to another window, which I am not sure
is desirable.

My frame setup is as follows with point in window 1.

    +------------------+----------+
    |                  |          |
    |                  |     2    |
    |                  |          |
    |                  |          |
    |         1        +----------+
    |                  |          |
    |                  |     3    |
    |                  |          |
    |                  |          |
    +------------------+----------+

Now `M-x calc' and then quit it with 'q'. You will see point moved to
window 2. This is reproducible with Emacs -q.

In GNU Emacs 23.1.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2009-09-22 on neutron.local
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns''


Leo

Emacs-Uptime: "34 days, 5 hours, 7 minutes, 6 seconds"



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4808; Package emacs. (Tue, 27 Oct 2009 02:40:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to jay.p.belanger <at> gmail.com:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 27 Oct 2009 02:40:06 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jay Belanger <jay.p.belanger <at> gmail.com>
To: Leo <sdl.web <at> gmail.com>
Cc: 4808 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#4808: 23.1.50; calc-quit move point to another window
Date: Mon, 26 Oct 2009 21:30:57 -0500
Leo <sdl.web <at> gmail.com> writes:
...
> Lately I have been using a three-window setup for writing in LaTeX and I
> have found that calc move point to another window, which I am not sure
> is desirable.
>
> My frame setup is as follows with point in window 1.
>
>     +------------------+----------+
>     |                  |          |
>     |                  |     2    |
>     |                  |          |
>     |                  |          |
>     |         1        +----------+
>     |                  |          |
>     |                  |     3    |
>     |                  |          |
>     |                  |          |
>     +------------------+----------+
>
> Now `M-x calc' and then quit it with 'q'. You will see point moved to
> window 2. This is reproducible with Emacs -q.

I'm not sure this is a Calc problem; `calc-quit' will (aside from some
bookkeeping) delete the calc window and bury the buffer.  If, in the
above configuration, you split window 1

     +------------------+----------+
     |                  |          |
     |                  |     2    |
     |        1         |          |
     |                  |          |
     |------------------+----------+
     |                  |          |
     |        4         |     3    |
     |                  |          |
     |                  |          |
     +------------------+----------+

(and have 4 a different buffer, of course), move the cursor from window
1 to window 4, then delete window 4, the cursor will end up in window 2.
This seems more like a quirk of deleting windows than anything else.
Calc could make efforts to avoid this particular situation, but relying
on standard Emacs behavior seems like the best choice.

Jay



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4808; Package emacs. (Tue, 27 Oct 2009 02:40:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to jay.p.belanger <at> gmail.com:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 27 Oct 2009 02:40:09 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4808; Package emacs. (Tue, 27 Oct 2009 08:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 27 Oct 2009 08:30:04 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: jay.p.belanger <at> gmail.com
Cc: 4808 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#4808: 23.1.50; calc-quit move point to another window
Date: Tue, 27 Oct 2009 08:23:24 +0000
On 2009-10-27 02:30 +0000, Jay Belanger wrote:
> This seems more like a quirk of deleting windows than anything else.
> Calc could make efforts to avoid this particular situation, but relying
> on standard Emacs behavior seems like the best choice.

I agree it needs to be fixed in delete-window. It is more intuitive for
the point to remain in the window that is enlarged by delete-window.

Leo



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4808; Package emacs. (Tue, 27 Oct 2009 08:30:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 27 Oct 2009 08:30:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4808; Package emacs. (Tue, 27 Oct 2009 08:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 27 Oct 2009 08:40:05 GMT) Full text and rfc822 format available.

Message #30 received at 4808 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: jay.p.belanger <at> gmail.com, 4808 <at> debbugs.gnu.org
Cc: Leo <sdl.web <at> gmail.com>
Subject: Re: bug#4808: 23.1.50; calc-quit move point to another window
Date: Tue, 27 Oct 2009 09:31:10 +0100
>> Lately I have been using a three-window setup for writing in LaTeX and I
>> have found that calc move point to another window, which I am not sure
>> is desirable.
>>
>> My frame setup is as follows with point in window 1.
>>
>>     +------------------+----------+
>>     |                  |          |
>>     |                  |     2    |
>>     |                  |          |
>>     |                  |          |
>>     |         1        +----------+
>>     |                  |          |
>>     |                  |     3    |
>>     |                  |          |
>>     |                  |          |
>>     +------------------+----------+
>>
>> Now `M-x calc' and then quit it with 'q'. You will see point moved to
>> window 2. This is reproducible with Emacs -q.

I can't reproduce your problem but I haven't built from CVS sources for
quite a while.  The algorithm for selecting a window after deleting the
selected one is contrived and I never understood it completely.
Conceptually, it should select the window "preceding" the deleted one
"in the cyclic ordering of windows".  Only if no preceding window
exists, the window "following" the deleted one "in the cyclic ordering
of windows" should be chosen.  However, since a preceding (previous) and
following (next) window should invariantly exist for any window, this
part of the selection procedure is what I fail to understand.

In your case the window returned by `previous-window' when you are in
the calc window (which here pops up below window 1) should give you the
window that will be selected after the calc window got deleted.  On my
Emacs window 1 gets selected.  Can you tell whether there was a change
in behavior over the past weeks or months?

> I'm not sure this is a Calc problem; `calc-quit' will (aside from some
> bookkeeping) delete the calc window and bury the buffer.  If, in the
> above configuration, you split window 1
>
>      +------------------+----------+
>      |                  |          |
>      |                  |     2    |
>      |        1         |          |
>      |                  |          |
>      |------------------+----------+
>      |                  |          |
>      |        4         |     3    |
>      |                  |          |
>      |                  |          |
>      +------------------+----------+
>
> (and have 4 a different buffer, of course),

The buffer identity should not matter.

> move the cursor from window
> 1 to window 4, then delete window 4, the cursor will end up in window 2.
> This seems more like a quirk of deleting windows than anything else.
> Calc could make efforts to avoid this particular situation, but relying
> on standard Emacs behavior seems like the best choice.

It's difficult to judge your example since I don't know whether your
first split was horizontally or vertically.  However, iIf window 2 _is_
the window preceding window 4 in the "cyclic ordering of windows" you
essentially get the behavior explained above.

For some reason here I can never get window 2 selected when deleting
window 4 so I'm merely surprised by the behavior of _my_ Emacs ;-)

martin



Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Mon, 05 Sep 2011 08:58:02 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Mon, 05 Sep 2011 08:58:02 GMT) Full text and rfc822 format available.

Message #35 received at 4808-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 4808-done <at> debbugs.gnu.org
Subject: Re: bug#4808: 23.1.50; calc-quit move point to another window
Date: Mon, 05 Sep 2011 10:53:27 +0200
> My frame setup is as follows with point in window 1.
> 
>     +------------------+----------+
>     |                  |          |
>     |                  |     2    |
>     |                  |          |
>     |                  |          |
>     |         1        +----------+
>     |                  |          |
>     |                  |     3    |
>     |                  |          |
>     |                  |          |
>     +------------------+----------+
> 
> Now `M-x calc' and then quit it with 'q'. You will see point moved to
> window 2. This is reproducible with Emacs -q.

Should be fixed in current trunk.

martin





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Oct 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.