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: Fri, 10 Jun 2022 08:31:47 +0000 Message-ID: <1Qq0hFFvO9sxfxs3_9pMdP6KDhb1FPNvSMdecSbjkriiidHBUK22Q_ZjHRHRoG97PIW0jr0F4yq311wLGn2EO_sgCWceZJ9aM_7IhxpVpoM=@protonmail.com> References: <877d5pljnr.fsf@gnu.org> <20f6f8fc-7e91-4efb-bac3-8c4e6ed0ae63@gnu.org> <83h74t13hd.fsf@gnu.org> <837d5p10m0.fsf@gnu.org> <83y1y5yn2r.fsf@gnu.org> Reply-To: goncholden Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_39R82efq82DGB1jlmqqYMftrsSljJePzlT6hPA0z0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3626"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 12:17:00 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 1nzbhL-0000jw-TT for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 12:17:00 +0200 Original-Received: from localhost ([::1]:35366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzbhK-0000QU-Qt for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 06:16:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nza3o-0004O9-3d for help-gnu-emacs@gnu.org; Fri, 10 Jun 2022 04:32:04 -0400 Original-Received: from mail-4319.protonmail.ch ([185.70.43.19]:20761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nza3k-0002oe-Ab for help-gnu-emacs@gnu.org; Fri, 10 Jun 2022 04:32:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1654849917; x=1655109117; bh=12w1rc3oyg/pKxIO9Ja9AnHedNFoMfMRvB342TiTXno=; 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=Mw28RR2mt/mf1kglBRYNvlGzwn94jwuurS2LmTm+PksTq/r6Lc3s3JHVbBYldcyM1 X5MMPnpE7LFO/mDRje7F25+HHibigE5B70X68o0Rvx7EnoxliR+GuP+yLtsBZK5/YJ S6ptepSZ0CzU0eodv8ZVE07zg0Dfjcsbyt9CuVEet8rZ/Oy/tSW/v6S+mxJSTb79JQ EnjuQVjZsbNekqcjJxWPSJ6kk4RTEf0rZAXZzvPid/q6mVtP3IuMWSwYmCb23OxvbJ B2dCOGFJcON1FYY0Ps2+8BVa6j+GLTmTluTtyiJ7vIyXTH3uPjG7rT0firYAJG99h4 2Yu2clDCjpeUw== In-Reply-To: <83y1y5yn2r.fsf@gnu.org> Feedback-ID: 43053548:user:proton Received-SPF: pass client-ip=185.70.43.19; envelope-from=goncholden@protonmail.com; helo=mail-4319.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, 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:137595 Archived-At: This is a multi-part message in MIME format. --b1_39R82efq82DGB1jlmqqYMftrsSljJePzlT6hPA0z0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ------- Original Message ------- On Friday, June 10th, 2022 at 7:50 PM, Eli Zaretskii wrote: > > Date: Fri, 10 Jun 2022 07:42:19 +0000 > > From: goncholden goncholden@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > > I think your current views are because you are trying to fight Emacs > > > features instead of using them to your benefit. Why do you need to > > > insert literal TABs so much? You never explained that. > > > > It usually happens with legacy code where people used tabs most times. = Then if the setting in for spaces, the file would end with a mix of tabs an= d spaces. Indentation could get mixed up this way. What could be a solution= ? Still with 'C-q TAB' ? > > > One solution is to mark the portion of the buffer (or the entire > buffer), then use either "M-x tabify" (if you want to have a mix of > TABs and SPACEs) or "M-x untabify" (if you want to have only SPACEs). > After you do one of these, the setting of indent-tabs-mode will take > care of the new/modified code. > > Another possibility, for the code where each indentation level is made > only out of TABs, is to set the indentation levels to correspond to > the existing code. Then TAB will always insert only literal TAB > characters, due to the setting of tab stops. > > I'm not yet sure I understand what situation you describe, so the > answer is somewhat ambiguous and imprecise. I suggest to tell more > and perhaps show an example, so that the advice could be more to the > point. Have attached a file. When I press tab, the tab actually gets removed and the code ends up in column 1. Strange things are happening with tab. --b1_39R82efq82DGB1jlmqqYMftrsSljJePzlT6hPA0z0 Content-Type: text/x-fortran; name=amp_hist.f Content-Transfer-Encoding: base64 Content-Disposition: attach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