From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Spaces rather than tabs by a major mode hook Date: Thu, 9 Jun 2022 21:54:27 +0200 (GMT+02:00) Message-ID: <20f6f8fc-7e91-4efb-bac3-8c4e6ed0ae63@gnu.org> References: <2nP2PN2t_BuoLFcCV1LCJLjRsU6YkW6e-VeBbRcMl2zR4tfPLI9rg26bBYSjJIhOkCKntjKW0XfBXVpaHYoXIrE7Lm4Zh-4Pzy0b1mCwdpc=@protonmail.com> <877d5pljnr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1847"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuri Khan , help-gnu-emacs@gnu.org To: goncholden Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 21:58:03 2022 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 1nzOI7-0000DV-8J for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 21:58:03 +0200 Original-Received: from localhost ([::1]:49666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzOI4-0000bj-7r for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 15:58:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzOEm-0008TS-LG for help-gnu-emacs@gnu.org; Thu, 09 Jun 2022 15:54:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzOEl-0002f0-VI; Thu, 09 Jun 2022 15:54:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Subject:References:In-Reply-To:To:From: Date; bh=JITwZI7BGD7rGV+FI7fwPI++Uebf0aBnjewk2V4eprs=; b=le2XfRHKptUVDlXKUv5i ZvQvfMRhPTODuI1zXCMO8qkoEVgglit0sdb7Bh3+9zKJbuTycqBMan2qA0so30/Xdx0ZYa6Fcy16/ pVa2KGDsjsZpuyjT/GRO2GjB3inwx7vjZSRU5Vd4vZ2ZqdLwF3mfWKciJwVjd8XmuI/4rzxbCo8qc X2OCMTTro05XMTUiJahT7LO64VBNBN17+z8Yx7YKobvgik6lt0fRuaE5S0JXHX24HzUaoWpM4YoJ9 Xdl3uoZkgZP+nTz4qv3B5i0/NZn7bQin5iuGnzgg1tm2BjaWo1VJOgu0rV42z/fWaNL95S4P/WPfU Osf88U6ExtMMfA==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:45193) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzOEj-0008Ql-M8; Thu, 09 Jun 2022 15:54:34 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 675B427C0054; Thu, 9 Jun 2022 15:54:33 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 09 Jun 2022 15:54:33 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtledgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefkjghfufggtgfgsehtqhertddttdejnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh ephfduhfejjedvtdfhteejtdejgeeiudeiueduteeuhfffgfehhedtvddvheeugeeunecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Jun 2022 15:54:32 -0400 (EDT) In-Reply-To: X-Correlation-ID: <20f6f8fc-7e91-4efb-bac3-8c4e6ed0ae63@gnu.org> 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" Xref: news.gmane.io gmane.emacs.help:137577 Archived-At: The TAB key is usually bound to some indentation command such as indent-acc= ording-to-mode. So bind that to some other key and TAB to self-insert-comma= nd. HTH, Tassilo 09.06.2022 21:40:26 goncholden : >=20 > ------- Original Message ------- > On Friday, June 10th, 2022 at 7:24 AM, Tassilo Horn wrote: >=20 >=20 >> goncholden goncholden@protonmail.com writes: >>=20 >>>>> ((c++-mode >>>>> (indent-tabs-mode . t) >>>>> (c-mode >>>>> (indent-tabs-mode . t))) >>>=20 >>> Suppose I have a file with tabs, would the change show the tabs as >>> spaces? I would rather have the file show as it is. If there are >>> tabs in the file, would (setq-default indent-tabs-mode nil) show them >>> as spaces? >>=20 >>=20 >> It doesn't affect how tabs/spaces are displayed. It just defines if >> emacs' indentation commands may insert tabs. Even with indent-tabs-mode >> set to nil, you can still manually insert a TAB using C-q TAB. >>=20 >> If you want to convert a file from/to tabs, you can use the commands >> tabify and untabify. >>=20 >> Bye, >> Tassilo >=20 > Makes sense but I find it somewhat complicated. >=20 > It works well if I press return and get indentation with spaces.=C2=A0 Bu= t if someone presses the tab key, why does it not accept that tab? >=20 > I would like to be able to introduce a tab with the tab key but indent wi= th spaces.