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 10:19:05 +0300 Message-ID: <83a6ajzmza.fsf@gnu.org> References: <83y1y5yn2r.fsf@gnu.org> <1Qq0hFFvO9sxfxs3_9pMdP6KDhb1FPNvSMdecSbjkriiidHBUK22Q_ZjHRHRoG97PIW0jr0F4yq311wLGn2EO_sgCWceZJ9aM_7IhxpVpoM=@protonmail.com> <83wndoztbi.fsf@gnu.org> <83k09oz52i.fsf@gnu.org> <83h74sz4kh.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33848"; 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 09:21:20 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 1nzvQu-0008Yg-6Q for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 09:21:20 +0200 Original-Received: from localhost ([::1]:35566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzvQs-0008Kt-I9 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 03:21:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzvOq-0008Kg-1I for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 03:19:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzvOp-0004Pe-Lh for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 03:19:11 -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=hFfWld40hqBuNf0qJ1VsIj/N75cuxSQRA24PY0LyZUI=; b=hHaAIsnazDvB TPXGAl82gD9ujH/6cse5F74mbB+a94POgUgZYG1qWJk18LV8kDacy6mGD2pMNw9Ki8lH9laPIOFhx cE433HpZMjqHfLJZECdKQVmFWIxr+t+baxXN505aDZG8eEZzEQx+CU4BMVoX6s+hp8JWwaG6m/n8B MlPGLqqVCTgnAsqp9vY7HLPVC94lvkLIpHOjhmRkrf+gqUv/UDM1myyQkzinfsnesYE8XduAq06Eh 1joXjPwTPYu5A1UXLpNz5ve4G+5l54DMLBJ0PYr04UxI6KtEGRQ/j8AkjlKQlsI1WRL8CnpWXcmRs NioIsc2o0sng2lqXnMnpEA==; Original-Received: from [87.69.77.57] (port=1736 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 1nzvOo-0003Gj-42 for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 03:19:11 -0400 In-Reply-To: (message from goncholden on Fri, 10 Jun 2022 19:52:11 +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:137666 Archived-At: > Date: Fri, 10 Jun 2022 19:52:11 +0000 > From: goncholden > Cc: help-gnu-emacs@gnu.org > > > > With "emacs -Q" I can only introduce a single tab. If a tab already exists, the cursor goes to the start of the first character. > > > > > > That's the intended and correct behavior of TAB in > > programming-language modes. What is the problem with it? > > It is a problem because the authors of the code used multiple tab inserts for indentation as well. When you visit that Fortran file, look at the "Fortran" item in the menu bar. Click Fortran->Customization->Fortran->Fortran Indent, and you will see a menu that allows you to customize many aspects of the indentation of Fortran source files. Alternatively, type M-x customize-group RET fortran-indent RET and you will be presented with a buffer showing the customizable options that control indentation in buffers under Fortran mode. By modifying these options to match the style used by the authors of the files whcih you need to edit, you can resolve those issues once and for all, such that typing TAB at the beginning of a line that is already indented according to conventions will not change anything, and indenting a new line you add will follow these conventions, like using a literal TAB for each inner indentation level. All it takes is to customize the indentation such that indentation levels are on multiples of 8 columns, then indent-tabs-mode set to t will insert literal TABs automatically. For example, there's an option that customizes the indentation of the IF body, another option for DO body, etc. > This rejects the use of emacs outright. Such a confidence from someone who has yet so much to learn about Emacs in general and indentation in particular... Given the state of your knowledge in the related areas of Emacs, may I suggest some humility? Like asking a question instead of knee-jerking a reaction that is not based on reality in any way? This could very well result in more people answering your questions, and in your learning what you need to learn much faster and more thoroughly. Because helping someone with such an attitude is not a very satisfying task.