emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Preventing inadvertent global modifications


From: Max Nikulin
Subject: Re: Preventing inadvertent global modifications
Date: Wed, 13 Sep 2023 17:50:27 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

On 13/09/2023 15:02, Ihor Radchenko wrote:
Max Nikulin writes:

Yesterday, when I was going to commit changes after editing several
headings in different places of an Org file, I was surprised by huge
diff with hundreds of chunks. Tags spread across the whole file were
adjusted by one or tow spaces. Probably I just accidentally hit C-u
before setting a tag to a new heading by C-c C-q. Of course, I did not
noticed it immediately. I managed to create a commit with real changes
without noise due to tags realignment. However I would like to prevent
similar issues in future.

You can set `org-auto-align-tags' to nil.

I saw it, but from its description I decided that its effect may be to broad. I have tried it and to my surprise it does not affect editing of heading, tags are kept aligned. M-<right> and M-<left> do not realign tags, so the value is not ignored.

C-u C-c C-q still realigns all tags in the buffer, so this option would not save me from getting huge diff.

I suspect there are enough commands having similar global (and so mostly hidden) effect. I may be unaware of them because I do not feel that I need such commands.

I admit that some fraction of users keep their files tidy calling C-u C-c C-q regularly. Perhaps at certain moment I will decide no align tags, but it should be a dedicated commit not mixed with other changes. My opinion that, by default, commands performing massive changes should require reasonable efforts to execute. It should help to avoid calling them unintentionally. Perhaps there is a better approach than annoying `yes-or-no-p'.





reply via email to

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