Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external editor's raw note is not being updated with a change if the change comes via the synchronization process #11236

Open
taw00 opened this issue Oct 19, 2024 · 0 comments
Labels
bug It's a bug desktop All desktop platforms medium Medium priority issues

Comments

@taw00
Copy link
Contributor

taw00 commented Oct 19, 2024

Operating system

Linux

Joplin version

3.0.15

Desktop version info

Joplin 3.0.15 (prod, linux)

Client ID: 9959465eea794e60b1b95760c308ca91
Sync Version: 3
Profile Version: 47
Keychain Supported: No

Revision: 598677b

Automatic Backlinks to note: 3.0.3
Backup: 1.4.2
Combine notes: 1.2.2
Conflict Resolution: 1.2.3
Favorites: 1.3.2
Hotfolder: 1.2.0
Inline tags: 1.3.0
Inline TODO: 1.7.1
Kminder Mindmap: 0.8.6
Markmap: 1.7.0
Note list (Preview): 1.1.0
Note overview: 1.7.1
Note Rename: 1.0.0
Note Tabs: 1.4.0
Outline: 1.5.13
Quick Links: 1.3.2
Space Indenter: 0.2.5
Tagging: 1.0.3
Templates: 2.4.0
YesYouKan: 1.0.3

Current behaviour

See also: #8984

The external editor logic of Joplin is pretty simple.

  • User clicks the Toggle External Editing button on a note …
  • Joplin copies a note to ~/.config/joplin-desktop/somehash.md
  • Joplin kicks open the external editor which opens that note.
  • If you edit the note in the editor and save, it updates the view in the Joplin app.
  • If you edit the note in the Joplin app, it will update that somehash.md file in that joplin-desktop folder and the external editor will notice the change to the file it has open to edit.

If you open the note in another instance of Joplin on another computer, Joplin does NOT manage that relationship correctly.

Q: Why does that external editor not get a notification of the update?
A: Because the external editor's copy in ~/.config/joplin-desktop/ is not updated with the change when the change comes from a syncing process.

Solution! If the note changes in Joplin application (no matter the mechanism), update any associated editor copies in ~/.config/joplin-desktop/

Expected behaviour

Expected behavior is described above, but:

If a note is changed via a newer synced version from another instance of Joplin, the notes raw-copy used to enable an external editor needs to reflect the change as well. Today, Joplin behaves like it forgot it had an external editor opened on the note.


SIDE QUESTION: why is the buffered note used by the external editor stored in ~/.config/joplin-desktop/? Shouldn't it be in ~/.var/lib/joplin-desktop or something similar?

Cheers -t

@taw00 taw00 added the bug It's a bug label Oct 19, 2024
@personalizedrefrigerator personalizedrefrigerator added desktop All desktop platforms medium Medium priority issues labels Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms medium Medium priority issues
Projects
None yet
Development

No branches or pull requests

2 participants