Not sure how this is happening yet, but I suspect that BeOrg is involved. I tend to put my .org files into CVS. Lately, I've been noticing that CVS sometimes reports the only change is the position of the Tags on the Header line. For awhile, I assumed that it was something in the settings of Orgmode in Emacs, but I couldn't find anything. In theory, Orgmode should always be positioning the tags such that they end at a certain column (haven't found the variable yet), so, if I don't change the tags, there should be no change for CVS to pick up. This last time, I noticed that a file that I Rsynced over from my BeOrg Dropbox area had changed the position of the tags. I think it was the only file that I had looked at in BeOrg Files -- I don't think I had changed anything. A diff on the file with my backup showed the only difference was the position of the tags on the header lines. Looking at it even further, it appears that not every header line with tags was affected (perhaps the ones that were affected were the ones that were unfolded?) and that those that were affected had extra space added.
As I said, this is a little strange and I'm making some guesses that maybe you'll spot something from the inside.
Yeah, just figured out a test case -- that's what's happening. Your algorithm for writing the tags back to the file is putting them into a different location than Emacs puts them in. That happens even if you just look at the file. That's causing it to be a constant change to CVS.
I'll take a look to see why beorg is updating the file even if no changes have been made.
Both Org mode and beorg use the variable org-tags-column to determine how to align the tags. Try making sure this is the same in both your Org mode configuration and in beorg - let me know if beorg still isn't doing the right thing.
I've encountered this issue, and I think it is because I use "clean view" in emacs, which causes nested headlines of level N to be intended by 2N (+ constant) places instead of just N (+ constant) places. So I can make the tags line up properly for any one chosen level of indentation, but then all other levels are off in proportion to level of intending. Potentially a lisp variable could indicate whether one wants tag positions to be calculated assuming default view vs clean view?
I shall look at improving the tag output in a future version based on org-indent-mode minor mode being turned on. Thanks for mentioning this!
Could it be that Org is lining the tags up on the last character of the list of tags whereas BeOrg is lining them up on the first character?
beorg should do the same as Emacs (although not necessarily in clean view). If you think it isn't please send Emacs config snippet and the beorg init.org snippet.
Got around to testing this again. Stripped everything out of my Emacs setup on Cygwin (removed .emacs.d and .emacs). Then I just loaded a recent version of org-mode into the clean Emacs and created a simple Org file with some headers that had some tags. After that, the test is to copy the file to my Dropbox sync directory, load the file into BeOrg, browse around the file (but don't change anything), and save the file back. I then copy the file back down from Dropbox and diff it with the original file. I find that there are changes to the file, but the only changes are the position of the tags on the header line. NOTE: I am not using an init file for BeOrg and my .emac file only has a "require" for 'org-mode'.
For some reason, BeOrg is realigning the tags in the file...
Ah, it looks as though the default for Org mode is -77 whereas beorg is defaulting to 80. I'll change the default in beorg. However if you want to see this before the next release create an init.org and add:
* Fix tag alignment (set! org-tags-column -77)
I haven't tested this, but I think that Org-Mode aligns the list of tags at the right edge whereas BeOrg aligns the list of tags at the left edge. That is, the tags will *end* at column 77 in Org, but begin at 77 in BeOrg.
OH! BTW, why is BeOrg doing any changes to the file when I haven't changed anything? It seems that just the act of unfolding/folding in BeOrg sets the file as having been updated. Also note that only the lines that I unfold/fold have the tags updated (I think).
Ideally beorg shouldn't be updating the file when nothing has changed, I will look to improve this behaviour.
Hi Matthew and David Masterson,
re the comment "Org-Mode aligns the list of tags at the right edge whereas BeOrg aligns the list of tags at the left edge" - from emacs documentation:
"org-tags-column is a variable defined in ‘org.el’. Its value is -77
The column to which tags should be indented in a headline. If this number is positive, it specifies the column. If it is negative, it means that the tags should be flushright to that column. For example, -80 works well for a normal 80 character screen. When 0, place tags directly after headline text, with only one space in
So, rather than change the value to be -77, which seems like it wouldn't work correctly, you could set them both to be 0 in your init.el (for emacs) and init.org (for beorg).