Plugin: Resume Note [v0.2.5, 2024-11-30]

v0.2.2

  • added: setting Delay before starting the plugin (in ms)

With this plugin enabled, also with the latest version, it's almost impossible to

  • rename or create a new notebook (EDITED: I wrongly wrote note)
  • change a note title

since the focus periodically goes to the note content.

I do not have these issues. Curious how your system is different.

I cannot reproduce this either, @bj-286, so more information on your Joplin client would help. The normal behaviour is: When opening or creating a note, the focus changes to the editor (in order to show the cursor), but if you press the title you should be able to edit it. This happens once after opening the note. (Are you editing multiple notes in multiple windows?)

In my previous post I wrongly typed "rename or create a new note" but I meant "rename or create a new notebook".
Instead, the change note title persists. While I type the title, if I stop after a few milliseconds the cursor goes to the note content.

These are the plugins I use on MacOS 14.7

Joplin 3.1.24 (prod, darwin)

Backup: 1.4.2
Cursor Sync: 2.1.0
Joplin Calendar: 1.2.0
Resume Note: 0.2.2
Rich Markdown: 0.15.1
Tagging: 1.0.3
Toggle Editor Menu & Keyboard Shortcut: 1.0.1

Sorry @bj-286, I couldn't reproduce these problems on Joplin 3.2.1 (macOS 14.7.1) with the same plugins installed (and I didn't encounter such problems in Joplin 3.1.24, but I didn't have these plugins then). What are your Resume Note settings?

BUG. Or just "interesting" behavior.

  1. If there is a Home Note configured, and you exit and then return to the application, you are returned to the Home Note. Presumable this is intended behavior, but I have thoughts on that. See bullet 3.
  2. If I am somewhere else in the application and click Note then Go to home note, I will be returned to the notebook of the Home Note and not necessarily the Home Note itself. I.e., it takes me back to the last opened note in the notebook that houses the Home Note.
  3. I would like a Home Note configured, but not have Joplin return me to that note upon restart. I want to stay where I left off. If I want to go back to the Home Note, that is why we now have that wonderful "Go to home note" feature now. :slight_smile:

Thanks for a welcome addition to the suite of plugins.

UPDATE: Interestingly, when I click on a saved note via the Note Tabs plugin, I am also sent to the notebook and last opened note in that notebook and not the note I asked for. Same is true for the Favorites plugin.

1 Like

Thanks for the feedback, @t0dd.

I'll start with this:

This is something that I haven't found a way to address yet. What happens is that whenever the user opens a note, the plugin checks whether the folder changed. If the folder changed, the last active note is switched to. The reason for this approach is that there is no separate event for clicking on a folder (note and folder selection are coupled), so the only way to keep track of folders it to wait for a change in the selection of a note. The order of events in both scenarios is similar:

Select a folder --> Joplin loads a note --> Plugin sees a new folder --> Plugin changes to last active note

Select a tab --> Joplin loads a note --> Plugin sees a new folder --> Plugin changes to last active note

I could not find a way to distinguish a click on a tab from a click on the list of folders, they both produce the same event. The reason that you don't experience this when using the note list (and when you switch to a tab within the same folder), is that if you change to a different note within the same folder, the plugin does not try to restore the last active note. To be honest, my solution was to disable Save the last active note in each folder on my client and use only saved cursor positions, but this is what you wanted the plugin for in the first place.

Given the explanation above, you can probably see why this happens. I can try to solve this in this particular case because the plugin can distinguish between a click on Go to home note and a change of note due to other user actions, so stay tuned.

Sure, I'll add a setting for this.

1 Like

All that makes sense. Interesting coarse dial that Joplin gives you there. Thank you for the explanation.

Yeah, a setting for that Home Note behavior upon restart would be welcome.

v0.2.4

  • added: setting Go to home note on startup
  • fixed: ensure that go to home opens the home note
1 Like

One more thing regarding this, is that clicking twice on the tab / favourite should work (the first time the plugin opens the folder, and second time it switches to the right note).

1 Like

example of the issue: Proton Drive

Configs are the defaults one: Proton Drive

First, I would like to thank you, shikuz, for excellent plugin. I was looking for such a plugin from the first moments I started to use Joplin.

Secondary, I found some possible glitch, which may be introduced by the Resume Note.
When I try to create a new notebook while the plugin is running, the popup window is active only 0-3 seconds, then it disactivates. I can click on the notebook title again and it activates. Next, in 0-3 seconds it disactivates again.

Once I disabled the Resume Note and restarted Joplin, the dialog started to work as expected.
Joplin_eAqqWieM5z

I hope that it is something easy to fix.

Thank you again for your plugin.

1 Like

@bj-286 and @smelnich, thank you both for your bug reports (you appear to have the same issue).

I've tried to reproduce this on multiple Joplin clients, unsuccessfully so far.

@smelnich could you try to disable all plugins and restart Joplin with only Resume Note active? if this resolves your issue, try to activate other plugins one by one until the issue returns. there could be a conflict between Resume Note and other plugins. also, could you please check your logs for messages / errors from sticky-note? (this is the internal plugin name)

Hi @shikuz

As you requested

  1. all plugins were disabled, then I restarted the app, creation of notebooks works as expected
  2. enabled Resume note only, restarted app, creation of notebooks does not work
  3. enabled the debugging log, which I am attaching

See some errors in the Console:

22:10:19: PluginService: Not running disabled plugin: "joplin.plugin.templates"
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: PluginService: Loading plugin from C:/Users/trader/.config/joplin-desktop/cache/shufo.markdown-prettier
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: PluginService: Not running disabled plugin: "shufo.markdown-prettier"
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: PluginService: Loading plugin from C:/Users/trader/.config/joplin-desktop/cache/io.github.jackgruber.backup
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: PluginService: Not running disabled plugin: "io.github.jackgruber.backup"
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: SpellCheckerServiceDriverNative: Set effective languages to "en-US"
C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:233 Uncaught TypeError: Cannot set properties of null (setting 'width')
at C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:233:25
at Immer.produce (C:\Program Files\Joplin\resources\app.asar\node_modules\immer\dist\immer.cjs.development.js:775:16)
at MainScreenComponent.updateRootLayoutSize (C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:231:51)
at MainScreenComponent.window_resize (C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:178:14)
(anonymous) @ C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:233
produce @ C:\Program Files\Joplin\resources\app.asar\node_modules\immer\dist\immer.cjs.development.js:775
updateRootLayoutSize @ C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:231
window_resize @ C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:178
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: useFormNote: Loading existing note cd00801fa69744f180c66cb26e5229ec
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: DecryptionWorker: cannot start because no master key is currently loaded.
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: PluginRunner: Got message (3): joplin.plugins.register {onStart: ƒ}
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: joplin.plugins: Starting plugin: joplin.plugin.alondmnt.sticky-note
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: useFormNote: Loaded note: {id: 'cd00801fa69744f180c66cb26e5229ec', parent_id: '0f2737dd55fb42d0b6605633d39f64aa', title: 'Mark Minervini - doing things backwards', body: "Minervini:\n\n it did not start that way. When …the market's pretty good. And everything changed.", created_time: 1725223347000, …}
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: useFormNote: Initializing note state
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:19: useFormNote: Resource info and form note set.
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.settings.registerSection resumenote {label: 'Resume Note', iconName: 'fas fa-i-cursor'}
C:\Program Files\Joplin\resources\app.asar\gui\NoteEditor\NoteBody\TinyMCE\TinyMCE.js:331 Loading script C:\Program Files\Joplin\resources\app.asar/vendor/lib/tinymce/tinymce.min.js
C:\Program Files\Joplin\resources\app.asar\gui\utils\loadScript.js:9 Loading script: {src: 'C:\Program Files\Joplin\resources\app.asar/vendor/lib/tinymce/tinymce.min.js', id: 'tinyMceScript', loaded: false}
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: Preparing scheduled sync
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.settings.registerSettings {resumenote.folderNoteMap: {…}, resumenote.saveFolderNote: {…}, resumenote.noteCursorMap: {…}, resumenote.lastNoteId: {…}, resumenote.homeNoteId: {…}, …}
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: Starting scheduled sync
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: Synchronizer: Sync: starting: Starting synchronisation to target 2... supportsAccurateTimestamp = false; supportsMultiPut = false} [1732936220059]
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: Synchronizer: Indexing resources...
C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: ResourceService::indexNoteResources: Start
C:\Program Files\Joplin\resources\app.asar\gui\NoteEditor\NoteBody\TinyMCE\TinyMCE.js:331 Loading script gui/NoteEditor/NoteBody/TinyMCE/plugins/lists.js
C:\Program Files\Joplin\resources\app.asar\gui\utils\loadScript.js:9 Loading script: {src: 'gui/NoteEditor/NoteBody/TinyMCE/plugins/lists.js', id: 'tinyMceListsPluginScript', loaded: false}
tinymce.min.js:9 The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See List of upcoming changes for TinyMCE 6 | TinyMCE Documentation for more information.

Settings:

  • images_dataimg_filter
    ev @ tinymce.min.js:9
    Tx @ tinymce.min.js:9
    n @ tinymce.min.js:9
    (anonymous) @ tinymce.min.js:9
    ce @ tinymce.min.js:9
    t @ tinymce.min.js:9
    ci.executeHandlers @ tinymce.min.js:9
    o @ tinymce.min.js:9
    r @ tinymce.min.js:9
    (anonymous) @ tinymce.min.js:9
    ci.bind @ tinymce.min.js:9
    V @ tinymce.min.js:9
    init @ tinymce.min.js:9
    loadEditor @ C:\Program Files\Joplin\resources\app.asar\gui\NoteEditor\NoteBody\TinyMCE\TinyMCE.js:602
    (anonymous) @ C:\Program Files\Joplin\resources\app.asar\gui\NoteEditor\NoteBody\TinyMCE\TinyMCE.js:763
    commitHookEffectListMount @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:23189
    commitPassiveMountOnFiber @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24965
    commitPassiveMountEffects_complete @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24930
    commitPassiveMountEffects_begin @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24917
    commitPassiveMountEffects @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24905
    flushPassiveEffectsImpl @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:27078
    flushPassiveEffects @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:27023
    (anonymous) @ C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:26808
    workLoop @ C:\Program Files\Joplin\resources\app.asar\node_modules\scheduler\cjs\scheduler.development.js:266
    flushWork @ C:\Program Files\Joplin\resources\app.asar\node_modules\scheduler\cjs\scheduler.development.js:239
    performWorkUntilDeadline @ C:\Program Files\Joplin\resources\app.asar\node_modules\scheduler\cjs\scheduler.development.js:533
    processImmediate @ node:internal/timers:478
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: models/Setting: Saving settings...
    C:\Program Files\Joplin\resources\app.asar\gui\NoteEditor\utils\useMessageHandler.js:19 Got ipc-message: noteRenderComplete null
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.commands.register {name: 'resumenote.clearUserData', label: 'Clear Resume Note user data', execute: ƒ}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.commands.register {name: 'resumenote.clearSettingsData', label: 'Clear Resume Note settings data', execute: ƒ}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.commands.register {name: 'resumenote.setHomeNote', label: 'Set as home note', execute: ƒ}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.commands.register {name: 'resumenote.goToHomeNote', label: 'Go to home note', iconName: 'fas fa-home', execute: ƒ}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.commands.register {name: 'resumenote.resetHomeNote', label: 'Reset home note', execute: ƒ}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.views.menuItems.create resumenote.setHomeNoteMenuItem resumenote.setHomeNote note
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.views.menuItems.create resumenote.goToHomeNoteMenuItem resumenote.goToHomeNote note
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.views.menuItems.create resumenote.resetHomeNoteMenuItem resumenote.resetHomeNote note
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: PluginRunner: Got message (3): joplin.settings.value resumenote.startupDelay
    C:\Program Files\Joplin\resources\app.asar\gui\NoteEditor\utils\useMessageHandler.js:19 Got ipc-message: noteRenderComplete null
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: models/Setting: Settings have been saved.
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: ResourceService::indexNoteResources: Completed
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: models/Folder: updateFolderShareIds: {shareUpdateCount: 0, unshareUpdateCount: 0}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: models/Folder: updateNoteShareIds: notes to update: 0
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: FileApi: get G:\My Drive\joplin/info.json
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: Synchronizer: Sync target remote info: {version: 3, e2ee: {…}, activeMasterKeyId: {…}, masterKeys: Array(0), ppk: {…}, …}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: Synchronizer: Sync target is already setup - checking it...
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: Synchronizer: Sync target local info: {version: 3, e2ee: {…}, activeMasterKeyId: {…}, masterKeys: Array(0), ppk: {…}, …}
    C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: FileApi: list G:\My Drive\joplin

C:\Program Files\Joplin\resources\app.asar\node_modules@joplin\utils\dist\Logger.js:259 22:10:20: FileApi: put G:\My Drive\joplin/temp/timeCheck967299.txt null

Thank you

Thanks!

@smelnich & @bj-286, please try the next release v0.2.5, hopefully it will solve your problem.

v0.2.5

  • fixed: do not try to get cursor in the rich text editor

Thank you very much, Shikuz! It works very well.

1 Like