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: Spaces rather than tabs by a major mode hook Date: Sat, 11 Jun 2022 13:33:59 +0300 Message-ID: <83h74rxze0.fsf@gnu.org> References: <83h74sz4kh.fsf@gnu.org> <83a6ajzmza.fsf@gnu.org> <83r13vy4nf.fsf@gnu.org> <83leu3y0hs.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39256"; 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 Sat Jun 11 12:52:01 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 1nzyin-0009zC-Er for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 12:52:01 +0200 Original-Received: from localhost ([::1]:40784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzyim-0000pB-BY for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 06:52:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzyRS-0002Ud-Tu for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 06:34:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzyRS-0006DX-LL for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 06:34:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+UyW1aUBatezJnh9nEEwM0RG7y0LIG7OYi1tf+tXo6s=; b=Lmlsoj3/g+JO FNeXvuYogzjv/FaHGS9ktEXQ23CAN08xXB+URQ6ibe9jSU4jdfoe1jD2u3X9De/UDj8sQQsAXfMa3 syIoNbVN8QXayuYOoEgi7+D06m/6sYmtVsGEyYBehCfV45v1U5p5YbNB3c8ysmsQlbZgQQ6Pvxt+Z 3a2JL68NheBZDWV7VsoNy7egjOMJvVYlMssbskKuOVOh3eBOuR7eVBTMgvjMRCVRc5YCSxGh65yrg x+ixI7VHxktDWLFqfc2ac4prUbw52ulilv2ETnEjcZmyrR7w66CoFuOsCi50Zn30iM5iEJegvX77e R9TruUJu+/bRK9epPqMuzQ==; Original-Received: from [87.69.77.57] (port=2013 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzyRS-00060B-4W for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 06:34:06 -0400 In-Reply-To: (message from goncholden on Sat, 11 Jun 2022 10:20:39 +0000) 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:137689 Archived-At: > Date: Sat, 11 Jun 2022 10:20:39 +0000 > From: goncholden > Cc: help-gnu-emacs@gnu.org > > > > For instance, how can I get the tab key to just make a tab and > > > pressing it again to make another tab. As I can do with spaces. > > > > > > You shouldn't need this, not at all. If you set the indentation > > levels and variables for the style of these files, typing TAB will > > insert as many TAB characters as needed to get to the correct column. > > For example, if the line should be indented 3 tab stops, typing TAB > > just once will insert all the 3 TABs in one go. > > > > That is what Emacs indentation commands are about: they insert the > > whitespace as necessary according to your settings, so that you never > > again should need to count TABs or insert them one by one. > > > > You should embrace this powerful feature instead of fighting against > > it. It does need some setup to adapt to a particular style of > > indentation, but that is one-time only, so really worth it. > > The point here is that they do not have a specific style, meaning the styles vary, but emacs imposes some specific style that one has to set up. And you cannot degress from it. Emacs doesn't impose any style. By "style" I meant how many columns should each construct be indented. In Emacs, you can set all the parameters of the style one by one via the menu I mentioned, and you can do that according to the style used by whoever wrote these files. Then you save your customizations, and Emacs will henceforth automatically indent according to the style you defined by your customizations.