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#38851: 27.0.50; Recent my patch breaks isearch with macOS native input method Date: Thu, 2 Jan 2020 03:25:13 +0900 Message-ID: Reply-To: tsuucat Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_DB15627B-EE5A-4585-88F1-FB7260CC73DC" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="113097"; mail-complaints-to="usenet@blaine.gmane.org" To: 38851@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 01 19:26:18 2020 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 1imihF-000TIL-Ud for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jan 2020 19:26:18 +0100 Original-Received: from localhost ([::1]:60706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imihE-0005vB-M3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jan 2020 13:26:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50561) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imih6-0005v5-Ua for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 13:26:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imih1-00026s-PW for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 13:26:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imih0-00025r-WE for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 13:26:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imigz-0005Wp-Ow for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 13:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: tsuucat Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jan 2020 18:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38851 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157790312421207 (code B ref -1); Wed, 01 Jan 2020 18:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Jan 2020 18:25:24 +0000 Original-Received: from localhost ([127.0.0.1]:37560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imigN-0005Vy-Sg for submit@debbugs.gnu.org; Wed, 01 Jan 2020 13:25:24 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:49614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imigM-0005Vp-2i for submit@debbugs.gnu.org; Wed, 01 Jan 2020 13:25:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49596) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imigK-0005nI-O1 for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 13:25:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imigJ-0000TK-Ir for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 13:25:20 -0500 Original-Received: from pv50p00im-ztbu10011701.me.com ([17.58.6.53]:42995) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1imigJ-0000Jt-3n for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 13:25:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1577903115; bh=0MFXNMOAsvEp5YeAo3NoCXdbisaIoVFMBAuEEjhradk=; h=From:Content-Type:Subject:Message-Id:Date:To; b=u0nf0GvdE6WxxfFPh/x5BcL6VSgLxVi8nQE4xWm8DO8OnVEiArNQi99/fA0yzoHKe ltEsi0et5yMNt1lvU2KDemgxhJnBf57KhXzh7B5lYUv9dXIgg6MZTM1VeSbB+Iygvx i6Vbg72UGlE9ORdFBCtZ/kzB2QtAgmo2TR2pxz7RsZsA03v1Gcs9YIVeJXq6BUiYXO kom6mvMRHfhGxw40Lc8q/xhxdc6IqICJIKBXKUUAPQaB8CVCld83ys+fusWKMjT7MM ZmGKEN+1UZ1GpW8q1LAiut10a+YzjOMXDpiXCX0bn1m0F72a1ovxa6DiSJ8fn4Y+Sn gBPqtaIpmYi2w== Original-Received: from [192.168.129.33] (i220-109-150-92.s41.a008.ap.plala.or.jp [220.109.150.92]) by pv50p00im-ztbu10011701.me.com (Postfix) with ESMTPSA id A61E08A0AE6 for ; Wed, 1 Jan 2020 18:25:15 +0000 (UTC) X-Mailer: Apple Mail (2.3445.104.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-01-01_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=672 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2001010168 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] 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:174051 Archived-At: --Apple-Mail=_DB15627B-EE5A-4585-88F1-FB7260CC73DC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I sent a patch for Bug#23412 and the patch was already merged. = (http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=3Demacs-27&id=3Dba04= 2176d8931cdf9441b3b4919ec74b75019494) Unfortunately, the patch breaks isearch with macOS native input method. I tried to modify ns-echo-working-text function and = ns-delete-working-text function, but I cannot do it. This is because input-pending-p now returns t after pressing RET to = confirm=20 the conversion. (isearch-update function uses input-pending-p) The following patch treats ns-unput-working-text event by = deleteWorkingText=20 specially in read_char(). This solve the problem. --Apple-Mail=_DB15627B-EE5A-4585-88F1-FB7260CC73DC Content-Disposition: attachment; filename=0001-Change-redisplay-solution.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Change-redisplay-solution.patch" Content-Transfer-Encoding: quoted-printable =46rom=209f337cfc6c5daea484b4e1d42d20e017e798cdee=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Masahiro=20Nakamura=20=0A= Date:=20Thu,=202=20Jan=202020=2001:21:40=20+0900=0ASubject:=20[PATCH]=20= Change=20redisplay=20solution=0A=0A---=0A=20src/keyboard.c=20|=206=20= ++++++=0A=20src/nsterm.m=20=20=20|=208=20++++----=0A=202=20files=20= changed,=2010=20insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/src/keyboard.c=20b/src/keyboard.c=0Aindex=207d3b024..30fd526=20100644=0A= ---=20a/src/keyboard.c=0A+++=20b/src/keyboard.c=0A@@=20-2896,6=20= +2896,12=20@@=20read_char=20(int=20commandflag,=20Lisp_Object=20map,=0A=20= =09=20=20=20example=20banishing=20the=20mouse=20under=20= mouse-avoidance-mode.=20=20*/=0A=20=09timer_resume_idle=20();=0A=20=0A= +#ifdef=20HAVE_NS=0A+=20=20=20=20=20=20if=20(CONSP=20(c)=0A+=20=20=20=20=20= =20=20=20=20=20&&=20(EQ=20(XCAR=20(c),=20intern=20= ("ns-unput-working-text"))))=0A+=20=20=20=20=20=20=20=20= input_was_pending=20=3D=20input_pending;=0A+#endif=0A+=0A=20=20=20=20=20=20= =20if=20(current_buffer=20!=3D=20prev_buffer)=0A=20=09{=0A=20=09=20=20/*=20= The=20command=20may=20have=20changed=20the=20keymaps.=20=20Pretend=20= there=0Adiff=20--git=20a/src/nsterm.m=20b/src/nsterm.m=0Aindex=20= c5cc182..52a9830=20100644=0A---=20a/src/nsterm.m=0A+++=20b/src/nsterm.m=0A= @@=20-6430,6=20+6430,10=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-6458,10=20+6462,6=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=_DB15627B-EE5A-4585-88F1-FB7260CC73DC Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii -- tsuucat --Apple-Mail=_DB15627B-EE5A-4585-88F1-FB7260CC73DC--