unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62459: [PATCH] Have Xref inherit input method when reading identifiers
@ 2023-03-26 11:57 Philip Kaludercic
  2023-03-26 19:04 ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2023-03-26 11:57 UTC (permalink / raw)
  To: 62459

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Certain languages rely heavily on input methods (two examples I have
encountered are APL and Agda), and the default behaviour of Xref when
prompting an identifier can be annoying since the user is required to
manually enable the input method, if they want to look up an identifier
that contains "non-ASCII" characters.  For that reason I think it should
be OK to set the INHERIT-INPUT-METHOD argument when calling
`completing-read'.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] Have Xref inherit input method when reading identifiers --]
[-- Type: text/x-patch, Size: 997 bytes --]

From f640cdc2e4762d8830e860455917e6c2e21e2b4d Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sun, 26 Mar 2023 13:50:27 +0200
Subject: [PATCH] Have Xref inherit input method when reading identifiers

* lisp/progmodes/xref.el (xref--read-identifier): Set
INHERIT-INPUT-METHOD flag to non-nil.
---
 lisp/progmodes/xref.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 1ae60796601..d77024136d0 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1525,7 +1525,7 @@ xref--read-identifier
                        prompt))
                    (xref-backend-identifier-completion-table backend)
                    nil nil nil
-                   'xref--read-identifier-history def)))
+                   'xref--read-identifier-history def t)))
              (if (equal id "")
                  (or def (user-error "There is no default identifier"))
                id)))
-- 
2.30.2


[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


-- 
Philip Kaludercic

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#62459: [PATCH] Have Xref inherit input method when reading identifiers
  2023-03-26 11:57 bug#62459: [PATCH] Have Xref inherit input method when reading identifiers Philip Kaludercic
@ 2023-03-26 19:04 ` Dmitry Gutov
  2023-03-26 22:05   ` Philip Kaludercic
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2023-03-26 19:04 UTC (permalink / raw)
  To: Philip Kaludercic, 62459

On 26/03/2023 14:57, Philip Kaludercic wrote:
> Certain languages rely heavily on input methods (two examples I have
> encountered are APL and Agda), and the default behaviour of Xref when
> prompting an identifier can be annoying since the user is required to
> manually enable the input method, if they want to look up an identifier
> that contains "non-ASCII" characters.  For that reason I think it should
> be OK to set the INHERIT-INPUT-METHOD argument when calling
> `completing-read'.

Sure. If you see the improvement from this, please go ahead.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#62459: [PATCH] Have Xref inherit input method when reading identifiers
  2023-03-26 19:04 ` Dmitry Gutov
@ 2023-03-26 22:05   ` Philip Kaludercic
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Kaludercic @ 2023-03-26 22:05 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 62459

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 26/03/2023 14:57, Philip Kaludercic wrote:
>> Certain languages rely heavily on input methods (two examples I have
>> encountered are APL and Agda), and the default behaviour of Xref when
>> prompting an identifier can be annoying since the user is required to
>> manually enable the input method, if they want to look up an identifier
>> that contains "non-ASCII" characters.  For that reason I think it should
>> be OK to set the INHERIT-INPUT-METHOD argument when calling
>> `completing-read'.
>
> Sure. If you see the improvement from this, please go ahead.

OK, I'll push it to master.

-- 
Philip Kaludercic





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-26 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-26 11:57 bug#62459: [PATCH] Have Xref inherit input method when reading identifiers Philip Kaludercic
2023-03-26 19:04 ` Dmitry Gutov
2023-03-26 22:05   ` Philip Kaludercic

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).