[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spaces rather than tabs by a major mode hook

From: Andreas Röhler
Subject: Re: Spaces rather than tabs by a major mode hook
Date: Mon, 13 Jun 2022 13:55:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Am 11.06.22 um 22:02 schrieb goncholden:
------- Original Message -------
On Saturday, June 11th, 2022 at 11:50 PM, Eli Zaretskii<>  wrote:

Date: Sat, 11 Jun 2022 11:15:59 +0000

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
Let me rephrase again. Emacs imposes indentation rules by requiring said 

Emacs requires you to customize, once, the indentation so that it
could thereafter help you by indenting everything automatically to
suit the indentation style. That's a win by any measure.
That the problem you are taking ages to understand.  "Emacs requires you to 
customize", the origin of the problem.

The question about how many columns should each construct be indented, has no 

It should be possible to answer that question by just examining the
file you posted.
No, because there are thousands of files.  That was just an example to show how 
emacs takes over the file, disallowing tabs and certain formatting because it 
assumes that fortran files have a single style.  Not true.

Alternatively, you could just reindent the entire file according to
the defaults, like this:

C-x h

and then keep making changes without any customizations.
That would destroy the possibilities of easily detecting code changes.  Only 
want emacs to recognise that one cannot impose a style on legacy code.  It 
should be able to go along with no style.

The mantra that things can always be customised implies observance to a single 
formatting scheme.  Legacy code does not even subscribe to that.  They only had 
simple editors.  If I introduce tabs with
"C-q TAB", all those tabs get removed by emacs as soon as one presses return at 
the end of the line.

Emacs is acting like a dictator.

Hmm, seems you stumbled over a mistake.  That's what I call "electric-indent-mode turned on by default".

While freedom obviously doesn't prevent mistakes, --given also the possibility I'm wrong in this judgement--, you hardly find a tool such easily to tweak along your wishes like Emacs.

So, don't give up.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]