From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 7728@debbugs.gnu.org
Subject: bug#7728: 24.0.50; GDB backtrace from abort
Date: Wed, 12 Jan 2011 08:54:17 +0100 [thread overview]
Message-ID: <4D2D5E29.3010502@gmx.at> (raw)
In-Reply-To: <jwvk4ibkwgv.fsf-monnier+emacs@gnu.org>
>> 2) Change the code of Fset_window_configuration and Fselect_window,
>> to have some other way of preventing the latter from storing point
>> in the old selected window, without setting selected_window to
>> nil.
>
> That sounds like a better solution. E.g. move the code of
> Fselect_window to another function, add a third argument to it
> specifying whether to swap-out point in selected_window, and make
> Fset_window_configuration call that new internal function.
The
/* Store the current buffer's actual point into the
old selected window. It belongs to that window,
and when the window is not selected, must be in the window. */
if (!NILP (selected_window))
{
ow = XWINDOW (selected_window);
if (! NILP (ow->buffer))
...
part of Fselect_window should be executed _before_ the
sf = SELECTED_FRAME ();
if (XFRAME (WINDOW_FRAME (w)) != sf)
{
...
part, so the selected window would have been already set. Unfortunately
this would make not_selected_before false when Fselect_window is called
back by Fselect_frame and the remaining parts of Fselect_window starting
with
Fset_buffer (w->buffer);
if (NILP (norecord))
...
would not get executed in that case. Probably, there should be a common
subroutine of Fselect_window and Fselect_frame such that the two won't
have to call each other mutually. (That common subroutine would have to
be robust in the sense that it can't call back neither Fselect_frame nor
Fselect_window.)
> But maybe Fselect_frame should simply not be run in this case.
If I understand Eli's backtrace correctly, the problem was caused within
the following part of Fset_window_configuration
selected_window = Qnil;
/* Arrange *not* to restore point in the buffer that was
current when the window configuration was saved. */
if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
set_marker_restricted (XWINDOW (data->current_window)->pointm,
make_number (old_point),
XWINDOW (data->current_window)->buffer);
Fselect_window (data->current_window, Qnil);
so apparently the frame of data->current_window is _not_ the selected
frame. Would you select the window and keep the old frame selected?
martin
next prev parent reply other threads:[~2011-01-12 7:54 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 16:55 bug#7728: 24.0.50; GDB backtrace from abort Drew Adams
2010-12-25 9:38 ` Eli Zaretskii
2010-12-25 10:44 ` Andreas Schwab
2010-12-25 11:12 ` Eli Zaretskii
2010-12-25 20:35 ` Stefan Monnier
2011-01-01 18:02 ` Eli Zaretskii
2011-01-09 21:18 ` Eli Zaretskii
2011-01-10 23:32 ` Drew Adams
2011-01-11 20:55 ` Stefan Monnier
2011-01-11 21:14 ` Eli Zaretskii
2011-01-11 21:44 ` Drew Adams
2011-01-12 4:11 ` Eli Zaretskii
2011-01-12 4:59 ` Drew Adams
2011-01-12 11:03 ` Eli Zaretskii
2011-01-12 18:36 ` Drew Adams
2011-01-12 19:52 ` Drew Adams
2011-01-12 21:30 ` Drew Adams
2011-01-12 7:54 ` martin rudalics [this message]
2011-01-12 15:05 ` Drew Adams
2011-01-12 15:14 ` Stefan Monnier
2011-01-12 15:59 ` martin rudalics
2011-01-12 16:22 ` Eli Zaretskii
2011-01-12 17:42 ` martin rudalics
2011-01-12 17:48 ` Eli Zaretskii
2011-01-12 18:35 ` martin rudalics
2011-01-12 18:36 ` Drew Adams
2011-01-15 2:59 ` Chong Yidong
2011-01-15 20:05 ` martin rudalics
2011-01-13 2:53 ` Stefan Monnier
2011-01-13 7:07 ` Drew Adams
2011-01-13 17:02 ` Stefan Monnier
2011-01-13 17:57 ` Drew Adams
2011-01-13 21:24 ` Stefan Monnier
2011-01-13 22:06 ` Drew Adams
2011-01-14 0:26 ` Eli Zaretskii
2011-01-14 1:19 ` Drew Adams
2011-01-14 2:40 ` Eli Zaretskii
2011-01-14 6:46 ` Drew Adams
2011-01-14 7:09 ` Drew Adams
2011-01-14 20:01 ` Sean Sieger
2011-01-14 21:06 ` Drew Adams
2011-01-14 21:46 ` Sean Sieger
2011-01-14 22:51 ` Eli Zaretskii
2011-01-14 23:56 ` Sean Sieger
2011-01-14 2:25 ` Stefan Monnier
2011-01-14 4:25 ` Drew Adams
2011-01-14 8:26 ` martin rudalics
2011-01-14 8:58 ` Drew Adams
2011-01-14 15:30 ` Stefan Monnier
2011-01-16 20:44 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D2D5E29.3010502@gmx.at \
--to=rudalics@gmx.at \
--cc=7728@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).