spacecowboy / spacecowboy/NotePad

Org syncing might have issues with Org-like syntax in notes?

Open
#540 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
409
Forks
161
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

It seems like using * can cause one note to be split up when syncing is enabled. Additionally, I think I observed a # on the start of the second line of a note causing that line to be omitted when syncing is enabled.

At least, these are the two cases I observed. There might be other patterns that get misread as Org syntax.

While trying to figure out how to transfer my notes to a new device, I enabled syncing briefly before realizing that the backup mechanism was what I needed. Later on, I realized several notes were split up, I thought this might be an issue with the backup process but when checking my old device the issue was there too. The splitting corresponded with *s in the original notes, after investigating what enabling syncing does and looking at the Org syntax, I strongly suspect something in the Org-sync process is interpreting this content as part of the syntax causing multiple notes to be created (thankfully, I figured out how to copy out the org files from my old device and it looks like they have the information to reconstruct my original notes).

how To Reproduce

I will try to test this after I finish reconstructing my notes, but I suspect this would reproduce the issue:
This reproduces the issue:

  1. Create a multi-line note with the second line starting with # as well as additional lines some of which start with *.
    e.g.

    My test note
    # Line starting with hash
    some text
    * some
    * bullet
    * points
    more text
    
  2. Enable syncing:

    1. Toggle on "Enable synchornization" and "SD card sync" under ⋮->Settings->Syncing.
    2. Go back to main view and select "Sync" from the menu.
  3. See note split at every * into a separate note and the second line with # missing entirely.

(note this doesn't require an SD card to be present to reproduce, but the SD card sync setting needs to be toggled on afaict)

The expected result is for the note content to be fully preserved. While waiting for a fix and/or if there are significant feasibility issues with fixing it, it could be useful to include a warning about this when enabling syncing.

Technical information
  • Device: OnePlus Nord N200
  • OS: Android 12
  • app version: 7.1.8 (installed from F-Droid)

P.S. Thanks for this software, I hope this report is helpful!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the documented multi-line note, with SD card sync enabled, then inspect the Org-sync path that processes note content. Compare the synced result with the original, focusing on lines beginning with # and * . Done means note content is preserved without splitting or omission, with a regression test if the project provides a suitable test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.