From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.bugs Subject: bug#11822: 24.1; emacsclient terminal mode captures escape characters as text Date: Tue, 8 Sep 2015 02:53:41 -0400 Message-ID: <541AF5DA-A12E-4DEC-B67D-BC49B21F0395@permabit.com> References: <6eipe9fypj.fsf@just-testing.permabit.com> <83d34h739a.fsf@gnu.org> <501848BE.10702@permabit.com> <5021D940.8050401@permabit.com> <415962DC-9BF5-4595-8180-7BE8DB545206@permabit.com> <502427D2.3080003@permabit.com> <83ipcre0fm.fsf@gnu.org> <2AB38709-2307-437E-A242-70B8A358BE4F@permabit.com> <83a9y3dwa8.fsf@gnu.org> <838vdndv9m.fsf@gnu.org> <1341183F-84AB-4257-B28B-57BDE5CA4F20@permabit.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441695268 2016 80.91.229.3 (8 Sep 2015 06:54:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 06:54:28 +0000 (UTC) Cc: 11822@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 08 08:54:16 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 1ZZCnF-0006KJ-QC for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 08:54:14 +0200 Original-Received: from localhost ([::1]:60345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZCnF-0006YT-Nm for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Sep 2015 02:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZCn7-0006Xx-Os for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 02:54:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZCn4-0003je-JS for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 02:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZCn4-0003jZ-Fr for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 02:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZZCn4-0004oA-9k for bug-gnu-emacs@gnu.org; Tue, 08 Sep 2015 02:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Raeburn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Sep 2015 06:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11822 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11822-submit@debbugs.gnu.org id=B11822.144169522718461 (code B ref 11822); Tue, 08 Sep 2015 06:54:02 +0000 Original-Received: (at 11822) by debbugs.gnu.org; 8 Sep 2015 06:53:47 +0000 Original-Received: from localhost ([127.0.0.1]:52079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZCmp-0004ng-4E for submit@debbugs.gnu.org; Tue, 08 Sep 2015 02:53:47 -0400 Original-Received: from mail-qg0-f43.google.com ([209.85.192.43]:34400) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZCmn-0004nY-El for 11822@debbugs.gnu.org; Tue, 08 Sep 2015 02:53:46 -0400 Original-Received: by qgez77 with SMTP id z77so75664994qge.1 for <11822@debbugs.gnu.org>; Mon, 07 Sep 2015 23:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=permabit.com; s=google; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HtcMMTYkiLi251tYvJIPqji3JvQv8+9WANgjOko8zkI=; b=XlOQPKgcYdz2dGpl/U9kcP2BSfJ0exY7hQNO9HxLcI8g9BocoW+BFVrkBa28cSUbnV c5dD4P8juIiKOhWaj430ESh5vqCvnK6H2jJpH+LUfHLfiutx7F7ui3xTog9SsEQPZNU0 mmPD4FrUmNA221xiWhzjQF0QXMDEjwpk9FooQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=HtcMMTYkiLi251tYvJIPqji3JvQv8+9WANgjOko8zkI=; b=QJP8al5zwTT1TpOhj0ddf2zAe/cazv71FzXaYtH5pEoFshoRuOD+VHNK2idDL60HEl KeslaTRQe+WuIUJD3lXaDp2DjhvRlS34diUf02UpxU/jaBE6kEERlNfSXTvEgcp/fKhg ORmJDmAWoO2sLMPWGMIgoOmuh83MqzPovHctZ82SIEKiSgKf7wgKIn4OkSzsswoK2I5s Two9HSzd9BkFGVmKvUXEOZ6ZKh6inJxV5Pi8E/+9eUsKkTcG1UEbQHgv0akqVR5IREtZ XXewGwbgll8j+PEmkASf45hpBqDzA7PfNFY1rHx/8ihSxvmzHUp6AFZ+0mylpBZYXGQR KJOg== X-Gm-Message-State: ALoCoQkiuN+GDbFp2XT5cXxo5i1bg4qipTtzFL8IZwET7P76+gWfCTEsqT+Lt+5Vx3DjuXylCuQ+ X-Received: by 10.140.128.2 with SMTP id 2mr35322894qha.8.1441695224736; Mon, 07 Sep 2015 23:53:44 -0700 (PDT) Original-Received: from [192.168.17.111] (c-66-31-203-101.hsd1.ma.comcast.net. [66.31.203.101]) by smtp.gmail.com with ESMTPSA id j108sm1300609qgj.25.2015.09.07.23.53.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Sep 2015 23:53:43 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.2104) 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: 208.118.235.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:106232 Archived-At: > On Sep 7, 2015, at 21:29, Stefan Monnier = wrote: >=20 >> increments face_change_count. If face_change_count is nonzero, = init_iterator >> (which gets called on every frame, thanks to prepare_menu_bars = calling >> x_consider_frame_title, and perhaps other ways) will call >=20 > I think here we should arrange to only call init_iterator on those > frames that are being redisplayed. >=20 > IIUC this refreshes all frames because >=20 > bool all_windows =3D windows_or_buffers_changed || update_mode_lines; >=20 > sets all_windows to true. Can you check the actual value of > windows_or_buffers_changed and update_mode_lines to see which one = causes > it to be true, and where it was set (each place they're set uses > a different value). Then we can see if this place where it's set can = be > modified so it explicitly marks the few frames/windows that actually > need to be refreshed, rather than asking for a "global" redisplay. When I created a frame on a second display, there were some calls to = prepare_menu_bars where both variables were zero, but one call had = windows_or_buffers_changed=3D13, update_mode_lines=3D24. With a hardware watchpoint I see windows_or_buffers_changed getting set = to 2 (wset_redisplay calls redisplay_other_windows), 30 = (apply_window_adjustment), 19 (clear_image_cache because some images = were freed =E2=80=94 I had the tool bar displayed this time), 53 = (Fclear_face_cache), 54 (Finternal_make_lisp_face, possible = inheritance), 59 (x_set_menu_bar_lines), 60 (x_set_tool_bar_lines), 54, = 56 (Finternal_set_lisp_face_attribute, possible inheritance), 54 (many = times back and forth between those two), 47 (redisplay_internal, because = face_change_count was nonzero), 13 (redraw_frame), 58 = (free_realized_faces), 60, and finally 0 (redisplay_internal); the value = of update_mode_lines changed just a few times, 0 to 2 = (bset_update_mode_line) to 24 (status_notify, in case process status is = used in a mode line for a buffer that might be visible in one or more = windows) to 0 (redisplay_internal). All of that was just in the process of creating the second frame via = emacsclient, the server interaction being responsible for the = status_notify call. It appears that init_iterator is getting called a total of 35 times = during the creation of the second frame. I don=E2=80=99t have the = details on how many for each frame, but one of the calls specifies = base_face_id as MODE_LINE_INACTIVE_FACE_ID, which looks like it=E2=80=99s = going to update the mode line coloring, at least, on the frame on the = first display, which I hadn=E2=80=99t thought about before. So even if = not all frames need updating, the previously-selected frame does. Ken=