From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20410: 24.5.50; cursor not updated after yank of non-ASCII string from the clipboard Date: Sun, 26 Apr 2015 18:04:56 +0300 Message-ID: <83383nx753.fsf@gnu.org> References: <83tww715y7.fsf@gnu.org> <838udiypuz.fsf@gnu.org> <83pp6sy0xo.fsf@gnu.org> <83mw1wxuax.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1430060783 10854 80.91.229.3 (26 Apr 2015 15:06:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 15:06:23 +0000 (UTC) Cc: 20410@debbugs.gnu.org To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 26 17:06:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YmO8K-00056O-0F for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 17:06:12 +0200 Original-Received: from localhost ([::1]:51063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmO8J-0003Yp-7U for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 11:06:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmO8F-0003YZ-B1 for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2015 11:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmO8A-0008J1-Bc for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2015 11:06:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmO8A-0008Iv-7f for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2015 11:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YmO89-0007vQ-SU for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2015 11:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Apr 2015 15:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20410 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20410-submit@debbugs.gnu.org id=B20410.143006072230420 (code B ref 20410); Sun, 26 Apr 2015 15:06:01 +0000 Original-Received: (at 20410) by debbugs.gnu.org; 26 Apr 2015 15:05:22 +0000 Original-Received: from localhost ([127.0.0.1]:40531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YmO7V-0007uZ-VJ for submit@debbugs.gnu.org; Sun, 26 Apr 2015 11:05:22 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:59405) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YmO7R-0007uJ-Lj for 20410@debbugs.gnu.org; Sun, 26 Apr 2015 11:05:19 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NNF006005SI5400@mtaout28.012.net.il> for 20410@debbugs.gnu.org; Sun, 26 Apr 2015 18:03:55 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NNF002FK5UJMT30@mtaout28.012.net.il>; Sun, 26 Apr 2015 18:03:55 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102059 Archived-At: > Date: Sun, 26 Apr 2015 19:02:05 +0900 > From: YAMAMOTO Mitsuharu > Cc: 20410@debbugs.gnu.org > > > Does the patch below fix the problems you see? (It might look a bit > > drastic, but then loading new fonts is not supposed to be a frequent > > operation, I think.) > > Yes, it solves the problems as far as I tested. But because > adjust_frame_glyphs are called from many places other than font > changes, I wonder if it might disable some cases where some > optimizations were applied successfully otherwise (sorry, I don't have > any ideas about concrete examples). Some calls to adjust_frame_glyphs > are already accompanied by SET_FRAME_GARBAGED, but not always. Hmm... you are right, we could be more selective. Does the alternative patch below work for you? diff --git a/src/xdisp.c b/src/xdisp.c index 5a27adc..cbe46eb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13359,6 +13359,13 @@ static void debug_method_add (struct window *, char const *, ...) if (f->fonts_changed) { adjust_frame_glyphs (f); + /* Disable all redisplay optimizations for this frame. + This is because adjust_frame_glyphs resets the + enabled_p flag for all glyph rows of all windows, so + many optimizations will fail anyway, and some might + fail to test that flag and do bogus things as + result. */ + SET_FRAME_GARBAGED (f); f->fonts_changed = false; } /* If cursor type has been changed on the frame @@ -13753,6 +13760,10 @@ static void debug_method_add (struct window *, char const *, ...) if (f->fonts_changed) { adjust_frame_glyphs (f); + /* Disable all redisplay optimizations for this + frame. See the comment for the previous call + to adjust_frame_glyphs for the reasons. */ + SET_FRAME_GARBAGED (f); f->fonts_changed = false; goto retry_frame; }