From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: tsuucat via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#23412: 25.1.50; GUI Emacs on Mac OS X: text is keeping shaking/re-displaying when insert text with external input method Date: Thu, 19 Dec 2019 14:57:08 +0900 Message-ID: <1FE824D7-2765-4CF6-98B8-912AA2FAA646@icloud.com> References: <20191217202837.GA18094@breton.holly.idiocy.org> <20191218204422.GA22550@breton.holly.idiocy.org> Reply-To: tsuucat Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_A3C12D98-6037-45AF-B295-FC38E0137EFB" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="51627"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 23412@debbugs.gnu.org To: HaiJun Zhang , alan@idiocy.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 19 06:58:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ihopA-000DIl-6R for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Dec 2019 06:58:12 +0100 Original-Received: from localhost ([::1]:36158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihop8-0006rp-Dy for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Dec 2019 00:58:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57022) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihop1-0006rV-TO for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 00:58:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihop0-0002CT-N9 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 00:58:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38226) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihop0-0002AQ-Fp for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 00:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ihop0-0000bT-DB for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2019 00:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: tsuucat Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2019 05:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23412 X-GNU-PR-Package: emacs Original-Received: via spool by 23412-submit@debbugs.gnu.org id=B23412.15767350392269 (code B ref 23412); Thu, 19 Dec 2019 05:58:02 +0000 Original-Received: (at 23412) by debbugs.gnu.org; 19 Dec 2019 05:57:19 +0000 Original-Received: from localhost ([127.0.0.1]:44199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihooJ-0000aX-C9 for submit@debbugs.gnu.org; Thu, 19 Dec 2019 00:57:19 -0500 Original-Received: from pv50p00im-ztdg10011901.me.com ([17.58.6.50]:59289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ihooH-0000aK-Dy for 23412@debbugs.gnu.org; Thu, 19 Dec 2019 00:57:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1576735031; bh=4G9suBbcvo9HhL8vCQEcZyB3UJTI/MGtTYBPsbERw6Q=; h=From:Message-Id:Content-Type:Subject:Date:To; b=0sQ/xFiYsdxXrMdJ2QC3pcXLmhymBkl52cRXMS1EI0nO1IbrYqB+ZOAxRIM+9q1Cf JtUDEM0fGwEaw3+PmvWYRM9T9FIBRw+p2ntlbeY9/7QVMmx/Le7yKh9bFM2QtfFFKZ LRz80IigtSRETZzaRytPNoYxx68/eIhL0//yqfvplVqYJ0RZZCb743YZoIGftiJZxx u7Q2fPt7SPVSZnkFl5ZQf1pW/DP5G/bFHRQBt7KKzHr3o5PPCXqHof90nxIZ1k779A n1QZ1kcuL7XwbaQXJKC28+gW1RFHe72UWomTuUzzXWZ4h82pvBhLJsUsVvm6ugCuix ejtWyjf5FR2CQ== Original-Received: from [192.168.96.166] (hlla-gw.hlla.is.tsukuba.ac.jp [130.158.83.243]) by pv50p00im-ztdg10011901.me.com (Postfix) with ESMTPSA id D29FE800F07; Thu, 19 Dec 2019 05:57:10 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-12-18_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=937 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1912190049 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:173541 Archived-At: --Apple-Mail=_A3C12D98-6037-45AF-B295-FC38E0137EFB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Since the working text is not the final text to insert to buffer, how = about displaying it using after-string property of overlay? Such as: >=20 > (overlay-put (setq ns-working-overlay (make-overlay start (point))) > =E2=80=98after-string (propertize ns-working-text =E2=80=98face = 'ns-working-text-face)) I did it. It is good undo behavior. After this, working text appears in read-only buffer. (Mac port-like behavior) --Apple-Mail=_A3C12D98-6037-45AF-B295-FC38E0137EFB Content-Disposition: attachment; filename=0001-insertText-flicker-patch.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-insertText-flicker-patch.patch" Content-Transfer-Encoding: quoted-printable =46rom=20383e6547ee47ac874935a162e36e644b4076927d=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Masahiro=20Nakamura=20=0A= Date:=20Thu,=2019=20Dec=202019=2000:32:54=20+0900=0ASubject:=20[PATCH]=20= insertText=20flicker=20patch=0A=0A---=0A=20lisp/term/ns-win.el=20|=2010=20= ++++------=0A=20src/nsterm.m=20=20=20=20=20=20=20=20|=20=208=20++++----=0A= =202=20files=20changed,=208=20insertions(+),=2010=20deletions(-)=0A=0A= diff=20--git=20a/lisp/term/ns-win.el=20b/lisp/term/ns-win.el=0Aindex=20= 1841e67..81e9a0c=20100644=0A---=20a/lisp/term/ns-win.el=0A+++=20= b/lisp/term/ns-win.el=0A@@=20-316,10=20+316,9=20@@=20= ns-insert-working-text=0A=20=20=20(interactive)=0A=20=20=20= (ns-delete-working-text)=0A=20=20=20(let=20((start=20(point)))=0A-=20=20=20= =20(insert=20ns-working-text)=0A-=20=20=20=20(overlay-put=20(setq=20= ns-working-overlay=20(make-overlay=20start=20(point)=0A-=09=09=09=09=09=09= =09(current-buffer)=20nil=20t))=0A-=09=09=20'face=20= 'ns-working-text-face)))=0A+=20=20=20=20(overlay-put=20(setq=20= ns-working-overlay=20(make-overlay=20start=20(point)))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20'after-string=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(propertize=20ns-working-text=20'face=20= 'ns-working-text-face))))=0A=20=0A=20(defun=20ns-echo-working-text=20()=0A= =20=20=20"Echo=20contents=20of=20`ns-working-text'=20in=20message=20= display=20area.=0A@@=20-342,8=20+341,7=20@@=20ns-delete-working-text=0A=20= =20=20=20=20=20=20=20=20=20;;=20Still=20alive?=0A=20=20=20=20=20=20=20=20= =20=20(overlay-buffer=20ns-working-overlay))=0A=20=20=20=20=20= (with-current-buffer=20(overlay-buffer=20ns-working-overlay)=0A-=20=20=20= =20=20=20(delete-region=20(overlay-start=20ns-working-overlay)=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(overlay-end=20= ns-working-overlay))=0A+=20=20=20=20=20=20(overlay-put=20= ns-working-overlay=20'after-string=20nil)=0A=20=20=20=20=20=20=20= (delete-overlay=20ns-working-overlay)))=0A=20=20=20=20((integerp=20= ns-working-overlay)=0A=20=20=20=20=20(let=20((msg=20(current-message))=0A= diff=20--git=20a/src/nsterm.m=20b/src/nsterm.m=0Aindex=20= 52a9830..c5cc182=20100644=0A---=20a/src/nsterm.m=0A+++=20b/src/nsterm.m=0A= @@=20-6430,10=20+6430,6=20@@=20-=20(void)insertText:=20(id)aString=0A=20=20= =20if=20(!emacs_event)=0A=20=20=20=20=20return;=0A=20=0A-=20=20/*=20= First,=20clear=20any=20working=20text.=20=20*/=0A-=20=20if=20= (workingText=20!=3D=20nil)=0A-=20=20=20=20[self=20deleteWorkingText];=0A= -=0A=20=20=20/*=20It=20might=20be=20preferable=20to=20use=20= getCharacters:range:=20below,=0A=20=20=20=20=20=20cf.=20= https://developer.apple.com/library/content/documentation/Cocoa/Conceptual= /CocoaPerformance/Articles/StringDrawing.html#//apple_ref/doc/uid/TP400014= 45-112378.=0A=20=20=20=20=20=20However,=20we=20probably=20can't=20use=20= SAFE_NALLOCA=20here=20because=20it=20might=0A@@=20-6462,6=20+6458,10=20= @@=20-=20(void)insertText:=20(id)aString=0A=20=20=20=20=20=20=20= emacs_event->code=20=3D=20code;=0A=20=20=20=20=20=20=20EV_TRAILER=20= ((id)nil);=0A=20=20=20=20=20}=0A+=0A+=20=20/*=20Last,=20clear=20any=20= working=20text.=20=20*/=0A+=20=20if=20(workingText=20!=3D=20nil)=0A+=20=20= =20=20[self=20deleteWorkingText];=0A=20}=0A=20=0A=20=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_A3C12D98-6037-45AF-B295-FC38E0137EFB Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii -- tsuucat --Apple-Mail=_A3C12D98-6037-45AF-B295-FC38E0137EFB--