obsidian-day-planner icon indicating copy to clipboard operation
obsidian-day-planner copied to clipboard

how to solve popup "file has been modified externally, merging changes automatically"

Open yongfanbeta opened this issue 2 years ago • 12 comments

When use day planner plugin in obsidian, that notification popup when I change the day planner file. Other file without day planner is ok. How to stop the popup? thx

yongfanbeta avatar Apr 21 '22 03:04 yongfanbeta

This is also happening for me and it's a bit annoying. I would assume that this happens because Day planner adds more data to the note itself in the background. Any idea how to avoid this?

flaper87 avatar May 09 '22 07:05 flaper87

Got the same issue, but it stops happening once i deactivate Mermaid Gantt option. Still, I like that feature but the notifications make it unusable, it would be nice if it would be fixed

A-Costa avatar Jul 14 '22 15:07 A-Costa

Any updates on this?

Thunderhawke avatar Jul 18 '22 14:07 Thunderhawke

it stops happening once i deactivate Mermaid Gantt option.

Thanks for this, I didn't realize that option was causing it. I do really like the diagram though...

I also get flickering when I'm updating the page. I assume this is the plugin updating the diagram code, unfortunately it happens no matter what part of the page I'm updating, even non-day-planner parts. Since I like to put my day planner on my daily notes page, it makes updating that throughout the day kind of slow and annoying.

adsilcott avatar Jul 28 '22 18:07 adsilcott

This is happening to me with all the extra options (mermaid gantt, now and next, circular progress) turned off. I'm in Command mode.

It seems to happen when I'm editing the timeline and sometimes a space is being deleted as I type. It might be something to do with having a space at the end of a line? (Like, I pressed space and pause to think then the plugin removes the space in the background?)

timmb avatar Aug 03 '22 11:08 timmb

This is happening to me with all the extra options (mermaid gantt, now and next, circular progress) turned off.

Yes, I just tried turning these off because it was driving me crazy, but it's still happening. I frequently have the space issue you've described as well. My words will get mushed together into one.

adsilcott avatar Aug 03 '22 14:08 adsilcott

Just mentioning I am having the same problem. It deletes random spaces.

A few notes; I am using it in command line (without its own page) -- and it is writing into a page that is produced by the extension "Daily Note" -- so maybe there is some conflict there?

I also have obsidian git running backups -- but I don't think this is the problem, because those backups only happen once every 10 minutes, and this causes an issue about once every 5-10 seconds.

trlinden avatar Aug 13 '22 17:08 trlinden

I have having the same problem~ It just randomly happened, no pattern can be recognised~ And it's super annoying

Guisong-Fu avatar Aug 17 '22 07:08 Guisong-Fu

One very hacky solution that I have found (I am using the command line version) - is to write the entirety of the note you want, and then go back and add a timestamp at the beginning afterwards. The problem seems to not occur until after the tool sees a valid time and tries to start registering the entry as a Day Planner Entry...

not sure if this will work if you are using a Day planner page, where the whole thing is supposed to be interpreted as part of the day planner.

trlinden avatar Aug 17 '22 08:08 trlinden

It restarted randomly for me as well

On Wed, Aug 17, 2022 at 3:49 AM Guisong Fu @.***> wrote:

I have having the same problem~ It just randomly happened, no pattern can be recognised~ And it's super annoying

— Reply to this email directly, view it on GitHub https://github.com/lynchjames/obsidian-day-planner/issues/161#issuecomment-1217616206, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACLYZLF5GWMH2EAOSVOTDV3VZSKPTANCNFSM5T5467HA . You are receiving this because you commented.Message ID: @.***>

--


Andrew Natenshon Mobile: +1-617-335-6240 @.***

Thunderhawke avatar Aug 17 '22 10:08 Thunderhawke

Getting it here too, with or without the Mermaid Gantt feature on.

a-trost avatar Aug 19 '22 14:08 a-trost

I have the same issue with spaces being removed. I'm fairly certain it has to do with the Parser using 'trim()' in the transform function. I hacked the plugin main.js to remove the trim() and it removed this annoying behaviour. I am not 100 sure if trim is used for a specific purpose here as it will make a comparison between old and new different, and that might cause the script to write the difference back to the file (which would cause that merge message). Again, not really certain as JS/TS is not my language and I haven't checked too deep what else is going on. For now it seems removing the trim works.

For others who want to try this out, you need to go into your vault and open up (in the hidden directory) .obsidian/plugins/obsidian-day-planner/main.js Then around line 6380 you'll find this line: return new PlanItem(match.index, value.index, isCompleted, isBreak, isEnd, time, `${value.groups.hours.padStart(2, '0')}:${value.groups.minutes}`, (_a = value.groups.text) === null || _a === void 0 ? void 0 : _a.trim(), value[0]); Remove the trim() in there to end up with this: return new PlanItem(match.index, value.index, isCompleted, isBreak, isEnd, time, `${value.groups.hours.padStart(2, '0')}:${value.groups.minutes}`, (_a = value.groups.text) === null || _a === void 0 ? void 0 : _a, value[0]);

(edit) Then you need to restart obsidian

I haven't noticed any side effects yet.

I hope this helps the maintainer to resolve the issue.

dagomar avatar Sep 22 '22 09:09 dagomar

Thank you for this fix, I implemented it today, so far I encountered no side effects.

Edit: Grammar, phrasing, everything. Holy crap.

Gewerd-Strauss avatar Nov 23 '22 14:11 Gewerd-Strauss

I switched back to file mode and created a template for my routine day plan; I can easily insert it into the page using my shortcut. It takes about as much time as it would take to link the daily planner to the daily note each day.

szfkamil avatar Jan 05 '23 18:01 szfkamil

So I was encountering much of the same problems as yourselves and for me it was the fact that I was in Live Preview Mode and my .md was malformed, not malformed that a linter would pick up; but broken in terms of what it does to the internal representation of the document. The culprit? "<".

Day Planner is expecting all the open braces to match up with all the closing braces but the structure has been corrupted by an innocent < . DayPlanner formats the document once every keystroke so every time you press a key, DayPlanner process the structure, throws it's hands in the air when it encounters the < and ends up at the end of the document; every keystroke winds you further down the document.

As for the mermaid charts.... follow the instructions and don't do what I did, I put a cute graphic in front of the KEY

:stupid graphic: Day Planner.

The author is using the string as a key/marker to insert the mermaid code created from the checklists

Hope this helps somebody P.S. Great plugin @lynchjames Thank you!

terrdry avatar Jan 16 '23 06:01 terrdry

Closing this as stale.

ivan-lednev avatar Sep 04 '23 17:09 ivan-lednev