[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: |
Mon, 13 Jun 2022 12:12:26 +0000 |
------- Original Message -------
On Monday, June 13th, 2022 at 11:55 PM, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:
> Am 11.06.22 um 22:02 schrieb goncholden:
>
> > ------- Original Message -------
> > On Saturday, June 11th, 2022 at 11:50 PM, Eli Zaretskiieliz@gnu.org wrote:
> >
> > > > Date: Sat, 11 Jun 2022 11:15:59 +0000
> > > > From: goncholdengoncholden@protonmail.com
> > > > Cc:help-gnu-emacs@gnu.org
> > > >
> > > > > 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
> > > > > customizations.
> > > > > Let me rephrase again. Emacs imposes indentation rules by requiring
> > > > > said customisations.
> > >
> > > 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 answer.
> > >
> > > 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
> > > C-M-\
> > >
> > > 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.
Right. Thus the insistence rather than taking the advice of choosing a
different editor. Managed to find what has to be done. Thank you.
- Re: Spaces rather than tabs by a major mode hook, (continued)
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/13
- RE: [External] : Re: Spaces rather than tabs by a major mode hook, Drew Adams, 2022/06/13
- Re: Spaces rather than tabs by a major mode hook, Jean Louis, 2022/06/12
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/12
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/12
- Re: Spaces rather than tabs by a major mode hook, Jean Louis, 2022/06/13
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/13
- Re: Spaces rather than tabs by a major mode hook, Emanuel Berg, 2022/06/13
- RE: [External] : Re: Spaces rather than tabs by a major mode hook, Drew Adams, 2022/06/13
- Re: Spaces rather than tabs by a major mode hook, Andreas Röhler, 2022/06/13
- Re: Spaces rather than tabs by a major mode hook,
goncholden <=
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, Dmitry Gutov, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, Dmitry Gutov, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, Dmitry Gutov, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, goncholden, 2022/06/11
- Re: Spaces rather than tabs by a major mode hook, Emanuel Berg, 2022/06/11