emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: whitespace in org source files
Date: Sat, 13 Nov 2021 13:15:15 +1100	[thread overview]
Message-ID: <87a6i8n6fr.fsf@gmail.com> (raw)
In-Reply-To: <MoLHe5v--3-2@tutanota.com>


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	other threads:[~2021-11-13  2:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 22:35 excalamus--- via General discussions about Org-mode.
2021-11-13  2:15 ` Tim Cross [this message]
2021-11-13 12:57 ` Juan Manuel Macías

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6i8n6fr.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: whitespace in org source files' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).