From: tsuucat via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: 38851@debbugs.gnu.org
Subject: bug#38851: 27.0.50; Recent my patch breaks isearch with macOS native input method
Date: Tue, 11 Feb 2020 02:08:14 +0900 [thread overview]
Message-ID: <AFCFCD95-08DA-4EFC-A0D2-93BEFB2A7C6B@icloud.com> (raw)
In-Reply-To: <20200103202943.GA60724@breton.holly.idiocy.org>
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
> Thanks. I have no better ideas, so this will have to do. Does anyone
> else have any opinions?
I have some more explanation. After this commit (https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9e77c1b7bcfd0807be7fe67daf73c2320e864309 <https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9e77c1b7bcfd0807be7fe67daf73c2320e864309>)
which introduce input_was_pending, read_char became to redisplay always
after processing special event.
```
input_was_pending = input_pending;
```
is a way to prevent redisplay. The same code is placed at end of read_char.
Emacs at current emacs-27 branch cannot use isearch with macOS native
input method (I checked with macOS Japanese input method and get
```
ns-delete-working-text: Wrong type argument: arrayp, nil
```
). This is worse situation for macOS native input method users.
Even if modifying keyboard.c is not acceptable, I think reverting the position of
```
if (workingText != nil)
[self deleteWorkingText];
```
in insertText should be done.
If the patch I sent before is acceptable, I have two patch for improvement.
0001-proper-selection-window-position-for-isearch.patch
This is to show candidate window for IM at proper position when isearch.
0001-Remove-unfavorable-deleteWorkingText.patch
Currently clicking buffer or focusing out frame delete working text. To prevent
deleting working text by such a input.
--
tsuucat
[-- Attachment #2.1: Type: text/html, Size: 2263 bytes --]
[-- Attachment #2.2: 0001-proper-selection-window-position-for-isearch.patch --]
[-- Type: application/octet-stream, Size: 1166 bytes --]
From db2b26d0891e60d67cad68982af44d759b407a58 Mon Sep 17 00:00:00 2001
From: Masahiro Nakamura <tsuucat@icloud.com>
Date: Sat, 4 Jan 2020 20:19:42 +0900
Subject: [PATCH] proper selection window position for isearch
---
src/nsterm.m | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 52a9830..7674fb0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6557,13 +6557,18 @@ - (NSRect)firstRectForCharacterRange: (NSRange)theRange
{
NSRect rect;
NSPoint pt;
- struct window *win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
+ struct window *win;
NSTRACE ("[EmacsView firstRectForCharacterRange:]");
if (NS_KEYLOG)
NSLog (@"firstRectForCharRange request");
+ if (WINDOWP (echo_area_window) && ! NILP (call0 (intern ("ns-in-echo-area"))))
+ win = XWINDOW (echo_area_window);
+ else
+ win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
+
rect.size.width = theRange.length * FRAME_COLUMN_WIDTH (emacsframe);
rect.size.height = FRAME_LINE_HEIGHT (emacsframe);
pt.x = WINDOW_TEXT_TO_FRAME_PIXEL_X (win, win->phys_cursor.x);
--
2.21.0
[-- Attachment #2.3: Type: text/html, Size: 494 bytes --]
[-- Attachment #2.4: 0001-Remove-unfavorable-deleteWorkingText.patch --]
[-- Type: application/octet-stream, Size: 834 bytes --]
From 3a5c22dfc70197cce8cc42680d500a56ba8146b3 Mon Sep 17 00:00:00 2001
From: Masahiro Nakamura <tsuucat@icloud.com>
Date: Tue, 11 Feb 2020 01:51:14 +0900
Subject: [PATCH] Remove unfavorable deleteWorkingText
---
src/nsterm.m | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 7674fb0..c7450b4 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6675,8 +6675,6 @@ - (void)mouseDown: (NSEvent *)theEvent
NSTRACE ("[EmacsView mouseDown:]");
- [self deleteWorkingText];
-
if (!emacs_event)
return;
@@ -7301,7 +7299,6 @@ - (void)windowDidResignKey: (NSNotification *)notification
if (emacs_event && is_focus_frame)
{
- [self deleteWorkingText];
emacs_event->kind = FOCUS_OUT_EVENT;
EV_TRAILER ((id)nil);
}
--
2.21.0
[-- Attachment #2.5: Type: text/html, Size: 314 bytes --]
next prev parent reply other threads:[~2020-02-10 17:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 18:25 bug#38851: 27.0.50; Recent my patch breaks isearch with macOS native input method tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-01-03 20:29 ` Alan Third
2020-02-10 17:08 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-02-10 21:44 ` Alan Third
2020-02-10 22:21 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-02-11 15:56 ` Eli Zaretskii
2020-02-11 17:22 ` Alan Third
2020-02-13 19:17 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-02-19 11:14 ` Alan Third
2020-02-11 17:05 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AFCFCD95-08DA-4EFC-A0D2-93BEFB2A7C6B@icloud.com \
--to=bug-gnu-emacs@gnu.org \
--cc=38851@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=tsuucat@icloud.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).