From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to get default input method by set-input-method? Date: Thu, 26 Dec 2024 14:05:12 +0200 Message-ID: <86wmfmy7if.fsf@gnu.org> References: <1e02733a6e6a804a1b75c3141531534f.support1@rcdrun.com> <86zfkiye6u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39372"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 26 13:05:50 2024 Return-path: Envelope-to: geh-help-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 1tQmcf-000A4y-RQ for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 Dec 2024 13:05:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQmcC-0005hR-6c; Thu, 26 Dec 2024 07:05:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQmc7-0005h9-0O for help-gnu-emacs@gnu.org; Thu, 26 Dec 2024 07:05:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQmc6-0002ub-Fb for help-gnu-emacs@gnu.org; Thu, 26 Dec 2024 07:05:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+ZMzFg8dohPsM3U9nnOyHntrdAh7c/SPBPnpwLRYju0=; b=oDi6+BCieAQ2synrEtBe G7jHLw3c81q+Bo7ccvTsvib19ZNX/FP+xWS55vyftfquZeXR8CN3c0OGVgTAuXoeNmW5Qc1k/mu2J uXi4c6iMTqM8xWQWkWsPwTcVlvO5+U8R4tdBc5EGrLeqa4ZBiB4fsXJPIfKUP9oWmRsjKqDm2SgBS ZDUlHhaA1fN1zibLrpHNew+Ic4DZhGBzmfQYeOQ2c+n6xNW4RXuwuTMghhoSTYw0zLup/QiEwQ91w 5MFzxDo/WRPEcwMFD+ctVrXPSt6chaHXeu6Tt/4PnDPmMrqkdEQj03Aaw5I/I6DA3V6oRt26qfvQo bUX0/ZTk7RSsVw==; In-Reply-To: (message from Jean Louis on Thu, 26 Dec 2024 14:17:28 +0300) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148999 Archived-At: > Date: Thu, 26 Dec 2024 14:17:28 +0300 > From: Jean Louis > Cc: help-gnu-emacs@gnu.org > > * Eli Zaretskii [2024-12-26 12:42]: > > > Date: Thu, 26 Dec 2024 11:37:51 +0300 > > > From: Jean Louis > > > > > > For long time I have no idea how to go to the default input method by > > > using M-x set-input-method > > > > > > I am using several input methods, mixing them and I use the M-x > > > set-input-method, not the keybinding. > > > > > > How to get default input method by set-input-method? > > > > M-: (get-language-info current-language-environment 'input-method) RET > > (get-language-info current-language-environment 'input-method) ➜ nil > current-language-environment ➜ "English" > > I get nil, and then M-x set-input-method cannot go to nil Which is correct for "English". If you type C-\, Emacs will ask you what input method to turn on. If there's a default input method, Emacs doesn't ask. Try: M-x set-language-environment RET French RET Then type C-\ and Emacs will turn on the default input method without asking. Your question was about the default input method. > in fact there is no standard input method that I can find. I see here: > > 2 possible completions: > english-colemak > english-dvorak They are not the default in this language environment. > I hope you understand the problem: I don't. > - I choose German postfix > > - I may choose other input method, those are 2 > > - after that there is no function or possibility to get interactively > into that nil Again, you asked about the _default_ input method. If you are now asking about a non-default input method you invoked by name, then you can get it from current-input-method (but only as long as the input method is active), or from default-input-method.