emacs-orgmode
[Top][All Lists]
Advanced

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

Re: whitespace in org source files


From: Tim Cross
Subject: Re: whitespace in org source files
Date: Sat, 13 Nov 2021 13:15:15 +1100
User-agent: mu4e 1.7.5; emacs 28.0.60

excalamus--- via "General discussions about Org-mode." <emacs-orgmode@gnu.org> 
writes:

> I'm hacking on ob-shell.el and I see that the source has mixed tabs and 
> spaces.
> If I were to contribute changes, would it be an issue if tabs were converted 
> to
> whitespace?
>
> I've not used the email contribution style before and have had whitespace 
> issues
> in the past with GitHub PRs.  I typically run whitespace-cleanup with the
> before-save-hook which changes tabs to spaces.

It is usually a bad idea to change whitespace in this manner. It will
not improve readibility but will cause lots of change which will likely
make merging and tracking/reviewing changes harder than necessary.

Ideally, git itslef would be configured to deal with this automatically.
Unfortunately, the tab v space arguments can often reach the level of
religious war and represents something which is difficult to get
consensus on.

My recommendation would be to use dir local variable settings to make
Emacs use the same formatting style (i.e. with tabs) for working with
org-mode sources if your normal/wider preference is just for spaces.
this will prevent Emacs from making unnecessary whitespace changes.



reply via email to

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