From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "L.J. Lee" Newsgroups: gmane.emacs.bugs Subject: bug#43084: toggle-korean-input-method, Korean with Dvorak Date: Fri, 29 Jan 2021 13:54:52 +0900 Message-ID: <877dnwz6jn.fsf@gmail.com> References: <87sg6m99dw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11459"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 26.3 Cc: 43084@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 29 08:11:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l5Nvy-0002rQ-LF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jan 2021 08:11:10 +0100 Original-Received: from localhost ([::1]:58018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5Nvx-00019i-Ji for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jan 2021 02:11:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Nvq-00019J-G6 for bug-gnu-emacs@gnu.org; Fri, 29 Jan 2021 02:11:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5Nvq-0000w0-8o for bug-gnu-emacs@gnu.org; Fri, 29 Jan 2021 02:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l5Nvq-0006jp-2g for bug-gnu-emacs@gnu.org; Fri, 29 Jan 2021 02:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "L.J. Lee" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jan 2021 07:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 43084-submit@debbugs.gnu.org id=B43084.161190425925891 (code B ref 43084); Fri, 29 Jan 2021 07:11:02 +0000 Original-Received: (at 43084) by debbugs.gnu.org; 29 Jan 2021 07:10:59 +0000 Original-Received: from localhost ([127.0.0.1]:51018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Nvm-0006jW-MC for submit@debbugs.gnu.org; Fri, 29 Jan 2021 02:10:59 -0500 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:45264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5Lm7-0000xw-Cu for 43084@debbugs.gnu.org; Thu, 28 Jan 2021 23:52:51 -0500 Original-Received: by mail-pl1-f172.google.com with SMTP id b8so4576521plh.12 for <43084@debbugs.gnu.org>; Thu, 28 Jan 2021 20:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=w9NYe85kYGr/+yguS3hWT6dQltwThULpYV09XE2BZUM=; b=puse/adBLxxdaaIbz8SJlO9zFja+t0o08Ps5B86v85DtnAqnf0CqtMQLjGXA1d8A1c hTDgSuLFHajk++5SU+Gm62SMVffvSJyGJ0gEuiR9TClvFB8DVuQwd1nPtPtUSOON9BAr Adl64FAL3PIK3qqL2umdMtAKQB5hb0pbxqO9rPhQd2V4WVOWOKukLeswYoPsZwBPmSJz vAiort5Qp22uZHumch+kNoZjwpRLrbzlo9Sar2h3EW+7vRIhxBGwOR9zFRNoosYujws6 kJMIef+cxQL9LFoSNVcT9QPAeiLF+2uXAEnqaZtRezeH2zzFo/YLR5WX+aoqdqHbg037 cPRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=w9NYe85kYGr/+yguS3hWT6dQltwThULpYV09XE2BZUM=; b=kAj9JqdyW4uk0afozCqtB/K25lQo/hCASa/HXxiTP6JInMBcmfWXs6oSueMhFritOt BRFVlwSr8WBJAPB0PYAoredpVAeVryrOhhkXnpEx9IrddM5CN25htTdwSuoQgAbEaljH bEZjIfj2SzSl0ARmoEVxATa2hfTWBVCZH4NsomPzFnF2RYTjHBpa+HHFtjbd4my8kfwa GcjySJLMaFuu9DVQLB6uBI+WIp9tE4/2pQFg3km3MGMVLl3ug681HEfj6xWHXRZYRmXb ks800Ij1YhPGWq15vdVdWQJdam861rNCvapPDHQ//yv0brkQmfxRBqzhW80wsubq6keQ a7+w== X-Gm-Message-State: AOAM5326/n+gkE9nY2nWd45MtTQgH3oYS3+7+dGEJR3bZ/NZkgt473tu bEkBx7EeC0BDrXs4k3zXlJZeIIO6wFc= X-Google-Smtp-Source: ABdhPJwYHuKiBhcbKG/m6lwLf2S6gPDkdoRUTeD3TC94owYPUHLDfkfiumQFE916EI7jFAjmvQx0fQ== X-Received: by 2002:a17:902:123:b029:dc:27b:3c62 with SMTP id 32-20020a1709020123b02900dc027b3c62mr2613812plb.16.1611895965159; Thu, 28 Jan 2021 20:52:45 -0800 (PST) Original-Received: from arch.gmail.com ([116.41.211.209]) by smtp.gmail.com with ESMTPSA id n15sm6197866pjk.57.2021.01.28.20.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 20:52:44 -0800 (PST) In-reply-to: <87sg6m99dw.fsf@gnus.org> X-Mailman-Approved-At: Fri, 29 Jan 2021 02:10:57 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198852 Archived-At: Lars Ingebrigtsen writes: > "L.J. Lee" writes: > >> I was puzzled, however, that my Korean layout >> reverted to the more common 2-beol-sik (korean-hangul) whenever I >> pressed S-SPC. C-\ would work to switch my layout correctly, but >> pressing S-SPC even once to toggle to Korean layout would change the >> default layout to korean-hangul and necessitate a manual change back to >> korean-hangul3f >> using M-x set-input-method. >> >> I found out through language-info-alist that S-SPC is >> bound to toggle-korean-input-method, and used the function query to >> track this function to korea-util.el under lisp/language. >> >> As expected, the toggle-korean-input-method function set the >> default input method to korean-hangul regardless of user settings, so I >> redefined it from init.el to set the default-korean-keyboard as >> korean-hangul3f. Here's the code I used: >> >> (with-eval-after-load "language/korea-util" >> (defun toggle-korean-input-method () >> "Turn on or off a Korean text input method for the current butter." >> (interactive) >> (if current-input-method >> (deactivate-input-method) >> (activate-input-method) >> (concat "korean-hangul3f" default-korean-keyboard))))) > > I don't use the Korean input methods, so this is totally uninformed -- > but looking at the code, your alteration seems to be the same as putting > > (setq default-korean-keyboard "3f") > > in your init file? > > In which case configuring this is already supported in Emacs. It doesn't, actually--your suggested method was what I tried at first, because it's the normal way to do things. However, my setting didn't survive the first time I tried to switch between Korean and English using S-SPC because doing so triggered toggle-korean-input-method, which overrode my default-korean-keyboard setting (korean-hangul3f) and reset it to korean-hangul instead. Long story short, the toggle-korean-input-method is written to override user settings which is just Bad Code and should be changed. (Most Korean keyboard users wouldn't even notice, by the way, because most use korean-hangul and korean-hangul3f is a minority layout. It's probably why this error survived so long.) Regards, -- L.J. Lee Mastodon account: https://rage.love/@ljwrites Dreamwidth blog: https://lj_writes.dreamwidth.org