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

editing a note changes the note name and destroys all text formatting #36

Open
lelutin opened this issue Dec 10, 2020 · 2 comments
Open

Comments

@lelutin
Copy link
Owner

lelutin commented Dec 10, 2020

I've just tried using the edit subcommand with gnote and was surprised by the result:

  • the note was renamed to "note name (system:notebook:thenameofthenotebook"
  • all text formatting disappeared

Both of those details are linked to what the following returns:

old_content = self.interface.get_note_content(notes[0])

In the Scout.get_note_content method, the two things are visible:

https://github.com/lelutin/scout/blob/master/src/scout/core.py#L153

the comment on that line mentions that bullet points disappear when splitting lines.

there's probably more to it though since there can be bold text, striked out text and other forms of formatting which will probably be completely invisible to the terminal.

The only way this could be fixed is if the dbus API provided some way to get the note contents with all markup for the formatting. Then we could use the version with markup for the edit action.

@lelutin
Copy link
Owner Author

lelutin commented Dec 10, 2020

interesting, I can see here:

https://gitlab.gnome.org/GNOME/gnote/-/blob/master/src/dbus/remotecontrol.hpp#L59

that one of GetNoteCompleteXml() or GetNoteContentsXml() could be what we want to use.

edit: fix the URL to get the line that points to the function names

@lelutin
Copy link
Owner Author

lelutin commented Dec 13, 2020

this is linked to #26 : that other ticket mentions the idea of implementing xml in/out for more commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant