[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASS70K6vWz6pxkvgPKmRGYvpt+OwAa2ZZT5OMGW4ZJW_Q@mail.gmail.com>
Date: Thu, 25 Mar 2021 23:09:38 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"John (Warthog9) Hawley" <warthog9@...nel.org>
Subject: Re: [PATCH 2/2] streamline_config.pl: Add softtabstop=4 for vim users
On Thu, Mar 25, 2021 at 10:50 PM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Thu, 25 Mar 2021 15:20:13 +0900
> Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> >
> > The root cause of inconsistency is that
> > you mix up space-indentation and tab-indentation.
> > I do not know if it is a standard way either.
>
> This is the default way emacs has edited perl files for as long as I can
> remember (back to 1996). It became my standard of editing perl files just
> because of that. For everything else, I use tabs.
>
> >
> > For example, scripts/checkpatch.pl uses only tabs,
> > which I think is more robust.
>
> Probably because Joe probably uses vim ;-)
>
> >
> > Unfortunately, we do not have standardized indentation style
> > for scripts yet, and people can go in any direction.
> >
> > The editorconfig patch [1] proposed to always use 4-space
> > indentation for *.pl files.
> > (that is, do not replace 8 spaces with a tab).
>
> I rather have all tabs, or the tab and spaces. I find 8 spaces to be a
> waste of memory and disk space.
>
> >
> > I do not know whether the kernel will adopt .editorconfig or not,
> > but if that patch is applied, your 1/2 will be a step backward.
>
> My 1/2 only made it consistent, as the original code had the tab/spaces mix
> and just a few lines that were modified by others broke it by adding all
> spaces.
>
> >
> > My got-feeling is, you will never reach the goal as long as
> > you adopt a strange indentation style, which is obscure
> > to other contributors.
>
> I'm guessing this is not strange to other perl developers who uses emacs.
>
> >
> > Not all people use vim.
>
> I don't use it either. I was trying to make vim match emacs. Of course for
> those that use something else, it wont help. I'm curious, what's your main
> editor that you use?
I use emacs.
I have some setups in my ~/.emacs
although I am not an expert of emacs lisp.
(defalias 'perl-mode 'cperl-mode)
(add-hook 'cperl-mode-hook
(lambda()
(setq cperl-indent-level 8)
(setq cperl-tab-always-indent t)
(setq tab-width 8)
(setq indent-tabs-mode t)
))
Then, emacs can understand that
my preference is tab-indentation
with 8 character width.
>
> > I am not interested in 1/2 either.
>
> OK.
>
> >
> > If you insist on this patch set, apply it to your tree
> > and send a pull request by yourself.
>
> I'm fine with that.
>
> >
> >
> > [1]: https://lore.kernel.org/lkml/20200703073143.423557-1-danny@kdrag0n.dev/
>
> Thanks for the link.
>
> -- Steve
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists