Skip to content

Commit edaef62

Browse files
committed
NoteHelpers v1.1.1
1 parent d553e1f commit edaef62

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

jgclark.NoteHelpers/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ For more details see the [plugin's README](https://github.com/NotePlan/plugins/t
66
- ??? Look at spinning out Index... commands to separate plugin
77
- -->
88

9+
## [1.1.1] - 2025-03-06
10+
- fix to opening new notes in **new note** commands.
11+
912
## [1.1.0] - 2025-02-19
1013
- new **list published notes** command, that generates a list in the new 'Publlished Notes' note of all notes that have been published to published to the internet through NotePlan.
1114

jgclark.NoteHelpers/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"plugin.author": "Jonathan Clark & Eduard Metzger",
88
"plugin.url": "https://github.com/NotePlan/plugins/tree/main/jgclark.NoteHelpers/",
99
"plugin.changelog": "https://github.com/NotePlan/plugins/blob/main/jgclark.NoteHelpers/CHANGELOG.md",
10-
"plugin.version": "1.1.0",
11-
"plugin.lastUpdateInfo": "1.1.0: new 'list published notes' command.\n1.1.0: added 'write modified' command to write the modified date to frontmatter (on each save). Can be run by hand or can be included as a trigger using the 'add trigger to note' command. Small improvements to \"new note from selection\".\n1.0.0: move '/new note from ...' commands here from Filer plugin, and revived '/new note' command.\n0.20.3: New 'printEditorDetailed' command to log all paragraph details as well.\n0.20.2: 'printNote' extended to cover backlinks.\n0.20.1: new command 'printNote' for debugging purposes.\n0.20.0: new commands \"unlinked note finder\" and \"delete note\". Bug fix to \"rename note filename\" command.\n0.19.2: fix edge cases with \"add trigger to note\".\n0.19.1: \"add trigger to note\" command can now be run from template. Added migration message about 'open note' commands.\n0.19.0: fix to '/rename inconsistent filename' command. Moved 'open note' functions to WindowTools plugin. Updated the display of the 'index folders' command. Removed 'Show month/quarter/year' commands as they are now in the main NP menus.",
10+
"plugin.version": "1.1.1",
11+
"plugin.lastUpdateInfo": "1.1.1: bug fix.\n1.1.0: new 'list published notes' command.\n1.1.0: added 'write modified' command to write the modified date to frontmatter (on each save). Can be run by hand or can be included as a trigger using the 'add trigger to note' command. Small improvements to \"new note from selection\".\n1.0.0: move '/new note from ...' commands here from Filer plugin, and revived '/new note' command.\n0.20.3: New 'printEditorDetailed' command to log all paragraph details as well.\n0.20.2: 'printNote' extended to cover backlinks.\n0.20.1: new command 'printNote' for debugging purposes.\n0.20.0: new commands \"unlinked note finder\" and \"delete note\". Bug fix to \"rename note filename\" command.\n0.19.2: fix edge cases with \"add trigger to note\".\n0.19.1: \"add trigger to note\" command can now be run from template. Added migration message about 'open note' commands.\n0.19.0: fix to '/rename inconsistent filename' command. Moved 'open note' functions to WindowTools plugin. Updated the display of the 'index folders' command. Removed 'Show month/quarter/year' commands as they are now in the main NP menus.",
1212
"plugin.dependencies": [],
1313
"plugin.script": "script.js",
1414
"plugin.commands": [

jgclark.NoteHelpers/src/newNote.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export async function newNote(): Promise<void> {
4040
}
4141
}
4242

43-
if (await showMessageYesNo('New Note created. Open it now?', ['Yes', 'No'], `New Note`) === 'Yes') {
43+
const res = (await showMessageYesNo('New Note created. Open it now?', ['Yes', 'No'], `New Note`)
44+
if (res === 'Yes') {
4445
await Editor.openNoteByFilename(filename)
4546
}
4647
} else {
@@ -83,7 +84,8 @@ export async function newNoteFromClipboard(): Promise<void> {
8384
const filename = (await DataStore.newNoteWithContent(content, currentFolder)) ?? ''
8485
logDebug(pluginJson, ` -> filename: ${filename}`)
8586

86-
if (await showMessageYesNo('New Note created. Open it now?', ['Yes', 'No'], `New Note from Clipboard`) === 'Yes') {
87+
const res = (await showMessageYesNo('New Note created. Open it now?', ['Yes', 'No'], `New Note from Clipboard`)
88+
if (res === 'Yes') {
8789
await Editor.openNoteByFilename(filename)
8890
}
8991
} else {
@@ -160,7 +162,8 @@ export async function newNoteFromSelection(): Promise<void> {
160162
if (insertBackLink) {
161163
newNote.appendParagraph(`^ Moved from [[${origFile}]]:`, 'text')
162164
}
163-
if ((await showMessageYesNo('New Note created. Open it now?', ['Yes', 'No'], `New Note from Selection`)) === 'Yes') {
165+
const res2 = await showMessageYesNo('New Note created. Open it now?', ['Yes', 'No'], `New Note from Selection`)
166+
if (res2 === 'Yes') {
164167
await Editor.openNoteByFilename(filename)
165168
}
166169
} else {

0 commit comments

Comments
 (0)