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: Juan Manuel Macías
Subject: Re: whitespace in org source files
Date: Sat, 13 Nov 2021 12:57:25 +0000

Hi,

excalamus--- via "General discussions about Org-mode." writes:

> 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.

I agree with Tim that running whitespace-cleanup is usually a bad idea
within a Git repository. I also have, like you, whitespace-cleanup
hooked to before-save-hook, like a relic of my first Emacs setups. In
case it helps, I have added to my init this function:

(defun my-whitespace-cleanup-no-git ()
    (let ((buf (buffer-file-name)))
      (when (not (vc-git-responsible-p buf))
        (whitespace-cleanup))))

and then:

(add-hook 'before-save-hook 'my-whitespace-cleanup-no-git)

Best regards,

Juan Manuel 



reply via email to

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