help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Spaces rather than tabs by a major mode hook


From: goncholden
Subject: Re: Spaces rather than tabs by a major mode hook
Date: Sun, 12 Jun 2022 07:29:04 +0000

------- Original Message -------
On Sunday, June 12th, 2022 at 6:40 PM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Sat, 11 Jun 2022 20:02:57 +0000
> > From: goncholden goncholden@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> >
> > > 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.

Unless you don't want help.  You want to do it yourself.
Basically, I want all of the support disabled and take complete control except 
of the language highlighting.

> > That the problem you are taking ages to understand. "Emacs requires you to 
> > customize", the origin of the problem.
>
>
> No, it isn't the problem. It is the solution to many problems,
> whereby people use many different coding styles in their programs. It
> is impossible to provide good indentation support for any arbitrary
> style, so if you happen to need to work with non-standard style, you
> need to tell Emacs about that style.

But my point is different.  I want to instruct emacs not to provide me with 
good indentation support for the current buffer, as I know better what to do.  
This is the argument I am putting forward.

> > > > The question about how many columns should each construct be indented, 
> > > > has no answer.
> > >
> > > It should be possible to answer that question by just examining the
> > > file you posted.
> >
> > No, because there are thousands of files.
>
>
> Are they using different styles? If so, my suggestion is to reformat
> them to the default style supported by Emacs out of the box, before
> you start editing.

Yes.  Same language with many different styles and all syntactically and 
operationally correct.  So fixing for
some specific style has no practical value whatsoever.

> > > Alternatively, you could just reindent the entire file according to
> > > the defaults, like this:
> > >
> > > C-x h
> > > C-M-\
> > >
> > > and then keep making changes without any customizations.
> >
> > That would destroy the possibilities of easily detecting code changes.
>
>
> Detecting code changes is nowadays the job of a VCS. A modern VCS can
> easily show you changes other than whitespace changes. Or you can
> commit the reformatted but otherwise unchanged source first, and then
> examine the changes relative to that.
>
> > 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.
>
>
> If Emacs doesn't satisfy your needs, you are free to use another
> editor, aren't you?

It is not about satisfying my needs.  There exist regulations in the world and 
I cannot modify an entire codebase because some want to use an editor over 
another.  Currently I cannot successfully present my case for the use of emacs 
with the other service branches.  Capish, my dear Eli?



reply via email to

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