From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: Re: Spaces rather than tabs by a major mode hook Date: Sun, 12 Jun 2022 00:07:29 +0000 Message-ID: References: <83r13vy4nf.fsf@gnu.org> <83leu3y0hs.fsf@gnu.org> <5a55bbf0-7ff6-7b97-f414-de4ab94e000e@yandex.ru> <5lO61DyUB07ImkgO405EHVwZry2eSsg7Z76zJkIXjySv0lBUIRMMmdUbN6hGlJiLPdtg0s2Dwsau1xdJW9pzcExKhNcT8e-m_WUaf3AGIM8=@protonmail.com> Reply-To: goncholden 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="24572"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , Eli Zaretskii , help-gnu-emacs@gnu.org To: goncholden Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 12 02:08:26 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 1o0B9W-0006E5-2V for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 12 Jun 2022 02:08:26 +0200 Original-Received: from localhost ([::1]:50816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0B9U-0006Mh-PA for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 20:08:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0B8s-0006MK-Ny for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 20:07:46 -0400 Original-Received: from mail-40138.protonmail.ch ([185.70.40.138]:36440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0B8m-0002jq-RJ for help-gnu-emacs@gnu.org; Sat, 11 Jun 2022 20:07:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1654992457; x=1655251657; bh=NJY075phC75XcDG61EArdPotlRlWJXbkE5OhWb/35kQ=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=HYYsq9vUtbeUqzRqKg8GO24az1EtkuotmC29U8ho/0xuCBNDueQavb/M0hlPsKCYy BQ0wVHZAnOhOypygmxnftBZmD28viawSyTuKuGyAxtjcz7WA0aUiR0nCmN/r4Dvg2E AFlgHmv50xDDUJsFh8ROCrZow5qgvEtB4x52U+7vU7a8LHN0MxUmuUX99KnCpTE2vN w52fWz2TbD9KyEH7W8Stbjpvfbv9Wl+u4t7/7ElfttWBK8OhDf2uC34tF9oqrGjBlP DmOO2m7r0D+NPwTVSJBpjg+Foj2caftvsJCmtgwAK5u364V10YHVMlUM8GTJq16T2P n5MWq44lbwOqQ== In-Reply-To: <5lO61DyUB07ImkgO405EHVwZry2eSsg7Z76zJkIXjySv0lBUIRMMmdUbN6hGlJiLPdtg0s2Dwsau1xdJW9pzcExKhNcT8e-m_WUaf3AGIM8=@protonmail.com> Feedback-ID: 43053548:user:proton Received-SPF: pass client-ip=185.70.40.138; envelope-from=goncholden@protonmail.com; helo=mail-40138.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TO_EQ_FM_DIRECT_MX=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:137704 Archived-At: ------- Original Message ------- On Sunday, June 12th, 2022 at 9:56 AM, goncholden wrote: > > ------- Original Message ------- > On Sunday, June 12th, 2022 at 9:36 AM, Dmitry Gutov dgutov@yandex.ru wrot= e: > > > > > On 12.06.2022 00:17, goncholden wrote: > > > > > I have tried that. You get encouraged it might work. Until you press = return on the end of the line. Then emacs deletes all the tabs. > > > > Aaand you can disable 'electric-indent-mode' to get rid of this behavio= r. > > > > > Emacs should have a minor-mode or settings that only keep the highlig= hting for the specific major-mode, and allows the user > > > to format as one pleases. > > > > The general expectation is that our users's projects adhere to some > > common rules WRT indentation, with only a few parameters varying betwee= n > > them (which can be customized). When that holds, Emacs's way is way mor= e > > efficient in practice. > > > That expectation is wrong for legacy code, particularly in fortran. > > > And when one works on a rare exception, they can tweak their config > > accordingly. A minor mode could be helpful, I suppose, but the > > customizations I suggested are fairly easy to do already. > > > They are easy to do but they are not enough. Because at some deep level e= macs expectation users's projects to adhere to a sytle. That only works for= single person works or multi-person works who actually adhere to a style. = In this files, the style they adhere to relate only to naming conventions a= nd that code is uppercase. And obviously, that usual column position rules. The defeating part is that even if I introduce TABs with (global-set-key (kbd "TAB") (kbd "C-q TAB")) or (local-set-key (kbd "TAB") 'self-insert-command) and using (setq tab-always-indent nil) all tabs get forcefully removed once one hits return at end of line. I cou= ld be that emacs introduces some indentation spaces on the next line but to= then remove all tabs on the previous line is excessive.