all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: selected-frame and selected-window
Date: Tue, 20 Nov 2012 15:37:05 -0500	[thread overview]
Message-ID: <jwvk3tg2fef.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <837gpgvz81.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Nov 2012 21:41:34 +0200")

> This is assertion violation in redisplay_internal, here:
>       eassert (EQ (XFRAME (selected_frame)->selected_window,
>                    selected_window));
> This crash is probably of the kind you reported in the past, related
> to the selected-frame/selected-window issues.

I'm not sure is that assertion is actually right.

99% of the time the (frame-selected-window) is the same as the
(selected-window), but there are some exceptions.  So far I found two:

- one in the redisplay, where we change selected-frame (without changing
  selected-window) just to get the frame-local variables.  As soon as we
  drop frame-local variables, this one will disappear (e.g. it's gone in
  my local branch).
- one in the mode-line computation.  This one is nasty because it is
  visible to lisp: while running an (:eval <form>) element, we change
  selected-window (without changing frame-selected-window) to the window
  being redisplayed.  So in <form>, it is not always true that
  (eq (selected-window) (frame-selected-window)).  To some extent this
  could be a feature (lets you return different data for the mode-line
  depending on whether it's selected or not), but I'd rather get this
  information differently since it is so easy to assume that
  (eq (selected-window) (frame-selected-window)) without being aware of it.

There might be more cases: I added a whole bunch of `eassert's where the
assertion is refined to try and take the above discrepancies into
account, and those get caught occasionally.  I haven't managed to track
down their cause yet.  It might just be a bug in the assertions.


        Stefan



  parent reply	other threads:[~2012-11-20 20:37 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 20:48 bug#12911: 24.3.50; let users decide where (& perhaps whether) `emacs_backtrace.txt' files are written Drew Adams
2012-11-16 21:05 ` bug#12911: 24.3.50; let users decide where (& perhaps whether) `emacs_backtrace.txt'files " Drew Adams
2012-11-16 21:19 ` bug#12911: 24.3.50; let users decide where (& perhaps whether) `emacs_backtrace.txt' files " Stefan Monnier
2012-11-17  7:26   ` Eli Zaretskii
2012-11-17 17:38     ` Drew Adams
2012-11-17 17:55       ` Eli Zaretskii
2012-11-17 18:24         ` Drew Adams
2012-11-19  1:52     ` Stefan Monnier
2012-11-19  3:51       ` Eli Zaretskii
2012-11-19  4:07         ` Stefan Monnier
2012-11-19 15:52           ` Eli Zaretskii
2012-11-19 18:04             ` Stefan Monnier
2012-11-19 18:13               ` Eli Zaretskii
2012-11-19 18:35                 ` Stefan Monnier
2012-11-19 18:40                   ` Eli Zaretskii
2012-11-19 19:47                     ` Stefan Monnier
2012-11-19 20:05                       ` Eli Zaretskii
2012-11-19 21:15                         ` Stefan Monnier
2012-11-20  3:58                           ` Eli Zaretskii
2012-11-20  4:59                             ` Stefan Monnier
2012-11-20  5:02                               ` Daniel Colascione
2012-11-20 13:16                                 ` Andy Moreton
2012-11-20 16:27                                   ` Eli Zaretskii
2012-11-20 17:03                                 ` Eli Zaretskii
2012-11-20 17:36                                   ` Daniel Colascione
2012-11-20 18:02                                     ` Eli Zaretskii
2012-11-20 18:57                                       ` bug#12911: 24.3.50; let users decide where (& perhaps whether)`emacs_backtrace.txt' " Drew Adams
2012-11-20 19:58                                         ` Eli Zaretskii
2012-11-20 21:47                                           ` Drew Adams
2012-11-21  3:47                                             ` Eli Zaretskii
2012-11-21  4:03                                               ` Daniel Colascione
2012-11-21 15:43                                                 ` Juanma Barranquero
2012-11-21 16:24                                                   ` bug#12911: 24.3.50; let users decide where (& perhaps whether)`emacs_backtrace.txt' filesare written Drew Adams
     [not found]                                                     ` <E86D7DFBD2BD4C3394E5316EF0321A! 95@us.oracle.com>
2012-11-21 16:45                                                     ` Juanma Barranquero
2012-11-21 17:40                                                       ` Drew Adams
2012-11-21 17:43                                                         ` Juanma Barranquero
2012-11-21 18:01                                                           ` Drew Adams
2012-11-21 18:13                                                             ` Juanma Barranquero
2012-11-21 18:42                                                               ` Drew Adams
2012-11-20 18:30                                   ` bug#12911: 24.3.50; let users decide where (& perhaps whether) `emacs_backtrace.txt' files are written Stefan Monnier
2012-11-20 18:37                                     ` Eli Zaretskii
2012-11-20 20:15                                       ` Stefan Monnier
2012-11-20 16:36                               ` Juanma Barranquero
2012-11-20 17:11                                 ` bug#12911: 24.3.50; let users decide where (& perhaps whether) `emacs_backtrace.txt'files " Drew Adams
2012-11-20 17:53                                   ` Eli Zaretskii
2012-11-20 18:10                                     ` Drew Adams
2012-11-20 18:27                                       ` Eli Zaretskii
2012-11-20 19:15                                         ` Dani Moncayo
2012-11-20 19:41                                           ` Eli Zaretskii
2012-11-20 20:11                                             ` Dani Moncayo
2012-11-20 20:37                                             ` Stefan Monnier [this message]
2012-11-21 17:05                                               ` selected-frame and selected-window Stefan Monnier
2012-12-08 12:24                                               ` Eli Zaretskii
2012-12-08 23:51                                                 ` Stefan Monnier
2012-12-09  3:50                                                   ` Eli Zaretskii
2012-12-14 15:53                                                     ` Stefan Monnier
2012-12-14 16:04                                                       ` Eli Zaretskii
2012-11-20 17:49                                 ` bug#12911: 24.3.50; let users decide where (& perhaps whether) `emacs_backtrace.txt' files are written Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk3tg2fef.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.