pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.62k stars 410 forks source link

[F] Autocomplete name of note when linking it #2903

Open luisyaxmedrano opened 10 months ago

luisyaxmedrano commented 10 months ago

Expected behaviour

My request is that when linking a note by using <> and typing a letter QOwnNotes would show suggestions of notes that begin with that letter in their title. And so on, so, if I were to write an entire word within the <> QOwnNotes would also suggest notes that begin with that word in their title. So it's a sort of an Autocomplete feature that improves the speed in which notes can be linked.

Actual behaviour

The feature does not exist.

Steps to reproduce

Steps to reproduce would be regular linking steps. Using <> and putting the name of a note in it.

Relevant log output in the Log panel

Expand ``` [00:20:28] [debug] updatePanelMenu - 'updatePanelMenu' ```

Information about the application, settings and environment

Expand QOwnNotes Debug Information =========================== ## General Info **Current Date**: `mar. nov. 14 00:20:37 2023` **Version**: `23.11.1` **Build date**: `Nov 10 2023` **Build number**: `1062` **Platform**: `windows` **Operating System**: `Windows 10 Version 2009` **Build architecture**: `x86_64` **Current architecture**: `x86_64` **Release**: `GitHub Actions` **Qt Version (build)**: `5.15.2` **Qt Version (runtime)**: `5.15.2` **Portable mode**: `no` **Settings path / key**: `\HKEY_CURRENT_USER\Software\PBE\QOwnNotes` **Application database path**: `C:\Users\luisy\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite` **Application arguments**: `C:\Program Files\QOwnNotes`, `\QOwnNotes.exe`, `--after-update` **Qt Debug**: `0` **Locale (system)**: `es_GT` **Locale (interface)**: *empty* **Primary screen resolution**: `1920x1080` **Icon theme**: `breeze-dark-qownnotes` **Notes in current note folder**: `7` **Calendar items**: `0` **Enabled scripts**: `0` ## Server Info **serverUrl**: *empty* **appIsValid**: `yes` **notesPathExists**: *empty* **serverVersion**: *empty* **appVersion**: *empty* ## Spellchecking **Enabled**: `true` **Selected language**: `auto` **Language codes**: `en_US, es_ANY` **Language names**: `American English (United States), español de España (España)` **Application dictionaries path**: ## Note folders **currentNoteFolderId**: `1` ### Note folder `predeterminado` **id**: `1` **isCurrent**: `yes` **activeTagId**: `-1` **localPath**: `D:\Programas\QOwnNotes` **remotePath**: `Notes` **cloudConnectionId**: `1` **isShowSubfolders**: `yes` **isUseGit**: `no` **allowDifferentNoteFileName**: `no` **activeNoteSubFolder name**: `Carrera` **database file**: `D:\Programas\QOwnNotes\notes.sqlite` ## Cloud connections ### Cloud connection `Predeterminado` **id**: `1` **isCurrent**: `yes` **serverUrl**: *empty* **username**: *empty* **accountId**: *empty* ## Enabled scripts ## Settings **ActiveNoteHistoryItem** (NoteHistoryItem): `` **AttachmentDialog/geometry** (QByteArray): `` **Debug/fakeOldVersionNumber** (QString): `false` **Debug/fileLogging** (QString): `false` **DictionaryManagerDialog/geometry** (QByteArray): `` **DictionaryManagerDialog/mainSplitterState** (QByteArray): `` **DistractionFreeMode/isEnabled** (QString): `false` **DistractionFreeMode/menuBarGeometry** (QByteArray): `` **DistractionFreeMode/menuBarHeight** (int): `34` **DistractionFreeMode/menuBarVisible** (QString): `true` **DistractionFreeMode/windowState** (QByteArray): `` **Editor/CurrentSchemaKey** (QString): `EditorColorSchema-cdbf28fc-1ddc-4d13-bb21-6a4043316a2f` **Editor/autoBracketClosing** (QString): `true` **Editor/autoBracketRemoval** (QString): `true` **Editor/disableCursorBlinking** (QString): `false` **Editor/editorWidthInDFMOnly** (QString): `true` **Editor/highlightCurrentLine** (QString): `true` **Editor/indentSize** (int): `4` **Editor/removeTrailingSpaces** (QString): `false` **Editor/showLineNumbers** (QString): `false` **Editor/useTabIndent** (QString): `false` **Editor/vimMode** (QString): `false` **IssueAssistantDialog/geometry** (QByteArray): `` **LastUpdateCheck** (QDateTime): `2023-11-13T23:45:08.486` **LinkDialog/geometry** (QByteArray): `` **LogWidget/criticalLog** (QString): `true` **LogWidget/debugLog** (QString): `true` **LogWidget/fatalLog** (QString): `true` **LogWidget/infoLog** (QString): `true` **LogWidget/scriptingLog** (QString): `true` **LogWidget/statusLog** (QString): `true` **LogWidget/warningLog** (QString): `true` **MainWindow/geometry** (QByteArray): `` **MainWindow/mainToolBar.iconSize** (int): `30` **MainWindow/menuBarGeometry** (QByteArray): `` **MainWindow/noteSubFolderTreeWidgetExpandState-1** (QStringList): `Carrera` **MainWindow/noteTextEdit.code.font** (QString): `Courier New,12,-1,5,50,0,0,0,0,0,Normal` **MainWindow/noteTextEdit.font** (QString): `MS Shell Dlg 2,12,-1,5,50,0,0,0,0,0,Normal` **MainWindow/noteTextView.code.font** (QString): `Courier New,9,-1,2,50,0,0,0,0,0` **MainWindow/noteTextView.font** (QString): `MS Shell Dlg 2,7.8,-1,5,50,0,0,0,0,0` **MainWindow/noteTextView.ignoreCodeFontSize** (QString): `true` **MainWindow/noteTextView.refreshDebounceTime** (int): `100` **MainWindow/noteTextView.rtl** (QString): `false` **MainWindow/noteTextView.underline** (QString): `true` **MainWindow/noteTextView.useEditorStyles** (QString): `true` **MainWindow/noteTextView.useInternalExportStyling** (QString): `true` **MainWindow/showNotesFromAllNoteSubFolders** (QString): `false` **MessageBoxOverride/windows-dark-mode** (int): `65536` **NoteFolder-1/NoteTabNameList** (QStringList): `Rubiaceae` **NoteFolder-1/NoteTabStickinessList** (QStringList): *empty* **NoteFolder-1/NoteTabSubFolderPathDataList** (QStringList): `Carrera` **NoteHistory-1** (QVariantList): `` **NoteHistoryCurrentIndex-1** (int): `14` **PiwikClientId** (QString): `` **ScriptRepositoryDialog/mainSplitterState** (QByteArray): `` **SearchEngineId** (int): `2` **SettingsDialog/geometry** (QByteArray): `` **SettingsDialog/mainSplitterState** (QByteArray): `` **ShowSystemTray** (QString): `false` **StartHidden** (QString): `false` **UpdateDialog/geometry** (QByteArray): `` **WelcomeDialog/geometry** (QByteArray): `` **acceptAllExternalModifications** (QString): `false` **allowNoteEditing** (QString): `true` **allowOnlyOneAppInstance** (QString): `true` **appMetrics/disableAppHeartbeat** (QString): `true` **appMetrics/disableTracking** (QString): `true` **appMetrics/notificationShown** (QString): `true` **autoReadOnlyMode** (QString): `false` **autoReadOnlyModeTimeout** (int): `30` **automaticNoteFolderDatabaseClosing** (QString): `false` **checkSpelling** (QString): `true` **closeTodoListAfterSave** (QString): `false` **cryptoKey** (qlonglong): `` **currentNoteFolderId** (int): `1` **currentWorkspace** (QString): `4XwAWdQY2rb9` **cursorWidth** (int): `1` **darkMode** (QString): `true` **darkModeColors** (QString): `true` **darkModeIconTheme** (QString): `true` **darkModeTrayIcon** (QString): `true` **defaultNoteFileExtension** (QString): `md` **demoNotesCreated** (QString): `true` **disableAutomaticUpdateDialog** (QString): `true` **disableSavedSearchesAutoCompletion** (QString): `false` **dockWasInitializedOnce** (QString): `true` **enableNoteTree** (QString): `false` **enableSocketServer** (QString): `true` **enableWebAppSupport** (QString): `false` **externalEditorPath** (QString): *empty* **fullyHighlightedBlockquotes** (QString): `false` **gitCommitInterval** (int): `30` **gitExecutablePath** (QString): *empty* **gitLogCommand** (QString): *empty* **guiFirstRunInit** (QString): `true` **ignoreAllExternalModifications** (QString): `false` **ignoreAllExternalNoteFolderChanges** (QString): `false` **ignoreNoteSubFolders** (QString): `^\.` **ignoredNoteFiles** (QString): *empty* **imageScaleDown** (QString): `false` **imageScaleDownMaximumHeight** (int): `1024` **imageScaleDownMaximumWidth** (int): `1024` **initialLayoutIdentifier** (QString): `minimal` **insertTimeFormat** (QString): *empty* **interfaceFontSize** (int): `20` **interfaceLanguage** (QString): *empty* **internalIconTheme** (QString): `false` **itemHeight** (int): `20` **legacyLinking** (QString): `false` **localTrash/autoCleanupDays** (int): `30` **localTrash/autoCleanupEnabled** (QString): `true` **localTrash/supportEnabled** (QString): `true` **markdownHighlightingEnabled** (QString): `true` **navigationPanelAutoSelect** (QString): `true` **navigationPanelHideSearch** (QString): `false` **networking/ignoreSSLErrors** (QString): `true` **networking/proxyType** (int): `2` **newNoteAskHeadline** (QString): `true` **noteEditIsCentralWidget** (QString): `false` **noteFileExtensionList** (QStringList): `md, txt` **noteListPreview** (QString): `false` **noteSaveIntervalTime** (int): `10` **noteSubfoldersPanelDisplayAsFullTree** (QString): `true` **noteSubfoldersPanelHideSearch** (QString): `false` **noteSubfoldersPanelOrder** (int): `0` **noteSubfoldersPanelShowFullPath** (QString): `false` **noteSubfoldersPanelShowNotesRecursively** (QString): `false` **noteSubfoldersPanelShowRootFolderName** (QString): `true` **noteSubfoldersPanelSort** (int): `0` **noteSubfoldersPanelTabsUnsetAllNotesSelection** (QString): `false` **notesPanelOrder** (int): `0` **notesPanelSort** (int): `1` **notesPath** (QString): `D:/Programas/QOwnNotes` **notifyAllExternalModifications** (QString): `false` **overrideInterfaceFontSize** (QString): `true` **ownCloud/supportEnabled** (QString): `false` **ownCloud/todoCalendarBackend** (int): `3` **ownCloud/todoCalendarCalDAVPassword** (QString): `` **ownCloud/todoCalendarCalDAVServerUrl** (QString): *empty* **ownCloud/todoCalendarCalDAVUsername** (QString): *empty* **ownCloud/todoCalendarCloudConnectionId** (int): `1` **ownCloud/todoCalendarDisplayNameList** (QStringList): *empty* **ownCloud/todoCalendarEnabledList** (QStringList): *empty* **ownCloud/todoCalendarEnabledUrlList** (QStringList): *empty* **ownCloud/todoCalendarUrlList** (QStringList): *empty* **ownCloudInfo/appIsValid** (QString): `true` **ownCloudInfo/connectionErrorMessage** (QString): *empty* **ownCloudInfo/notesPathExistsText** (QString): *empty* **ownCloudInfo/serverVersion** (QString): *empty* **previousWorkspace** (QString): `initial` **restoreCursorPosition** (QString): `true` **restoreLastNoteAtStartup** (QString): `true` **restoreNoteTabs** (QString): `true` **savedSearches/noteFolder-1** (QStringList): `Botanica 2023-11-02T20.40.57, Note 2023-11-02T18.08.17, Note 2023-11-01T23.17.28, Note 2023-11-01T15.45.15, Note 2023-10-31T16.55.35, Note 2023-10-31T16.47.52` **showMatches** (QString): `true` **showMenuBar** (QString): `true` **showStatusBar** (QString): `true` **spellCheckLanguage** (QString): `auto` **startInReadOnlyMode** (QString): `false` **systemIconTheme** (QString): `false` **tagWasAddedToNote** (QString): `true` **taggingShowNotesRecursively** (QString): `false` **tagsPanelHideNoteCount** (QString): `false` **tagsPanelHideSearch** (QString): `false` **tagsPanelOrder** (int): `0` **tagsPanelSort** (int): `0` **todoCalendarSupport** (QString): `false` **toolbar/1/items** (QStringList): `action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionShow_Todo_List` **toolbar/1/name** (QString): `mainToolBar` **toolbar/1/title** (QString): `barra de herramientas principal` **toolbar/2/items** (QStringList): `actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote` **toolbar/2/name** (QString): `formattingToolbar` **toolbar/2/title** (QString): `barra de formato` **toolbar/3/items** (QStringList): `actionInsert_text_link, actionInsert_image, actionInsert_current_time` **toolbar/3/name** (QString): `insertingToolbar` **toolbar/3/title** (QString): `barra de inserción` **toolbar/4/items** (QStringList): `action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note` **toolbar/4/name** (QString): `encryptionToolbar` **toolbar/4/title** (QString): `barra de cifrado` **toolbar/5/items** (QStringList): `actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size` **toolbar/5/name** (QString): `windowToolbar` **toolbar/5/title** (QString): `barra de ventana` **toolbar/6/items** (QStringList): `action_Quit` **toolbar/6/name** (QString): `quitToolbar` **toolbar/6/title** (QString): `quitar barra` **toolbar/size** (int): `6` **useNoteFolderButtons** (QString): `false` **useSoftWrapInNoteEditor** (QString): `true` **useUNIXNewline** (QString): `false` **webAppClientService/serverUrl** (QString): `wss://app.qownnotes.org` **webAppClientService/token** (QString): `` **webSocketServerService/bookmarksNoteName** (QString): `Bookmarks` **webSocketServerService/bookmarksTag** (QString): `bookmarks` **webSocketServerService/commandSnippetsNoteName** (QString): `Commands` **webSocketServerService/commandSnippetsTag** (QString): `commands` **webSocketServerService/port** (int): `22222` **workspace-4XwAWdQY2rb9/name** (QString): `Completo` **workspace-4XwAWdQY2rb9/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-4XwAWdQY2rb9/windowState** (QByteArray): `` **workspace-BYZ5C5sPp8MZ/name** (QString): `Mínimo` **workspace-BYZ5C5sPp8MZ/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-BYZ5C5sPp8MZ/windowState** (QByteArray): `` **workspace-f6ea6491-3202-4a06-94ed-b240ed47c964/name** (QString): `Vista previa de notas` **workspace-f6ea6491-3202-4a06-94ed-b240ed47c964/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-f6ea6491-3202-4a06-94ed-b240ed47c964/windowState** (QByteArray): `` **workspace-initial/name** (QString): `Edición de notas` **workspace-initial/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-initial/windowState** (QByteArray): `` **workspaces** (QStringList): `initial, f6ea6491-3202-4a06-94ed-b240ed47c964, 4XwAWdQY2rb9, BYZ5C5sPp8MZ` ## System environment **AGSDESKTOPJAVA**: `D:\Programas\ArcGIS 10.8\2\Desktop10.8\` **ALLUSERSPROFILE**: `C:\ProgramData` **APPDATA**: `C:\Users\luisy\AppData\Roaming` **CommonProgramFiles**: `C:\Program Files\Common Files` **CommonProgramFiles(x86)**: `C:\Program Files (x86)\Common Files` **CommonProgramW6432**: `C:\Program Files\Common Files` **COMPUTERNAME**: `LAPTOP-HHAJBPKE` **ComSpec**: `C:\WINDOWS\system32\cmd.exe` **destination**: `"C:\Program Files\QOwnNotes"` **DriverData**: `C:\Windows\System32\Drivers\DriverData` **FPS_BROWSER_APP_PROFILE_STRING**: `Internet Explorer` **FPS_BROWSER_USER_PROFILE_STRING**: `Default` **HOMEDRIVE**: `C:` **HOMEPATH**: `\Users\luisy` **K2PDFOPT_CUSTOM0**: `Last Settings;-dev kol -wrap- -o C:\Users\luisy\Desktop\%b_k2opt -nt -60 -ocrlang eng-fast -ocr t;` **K2PDFOPT_CUSTOM1**: `2-column paper;-mode 2col;` **K2PDFOPT_CUSTOM2**: `Trim Margins;-mode fw;` **K2PDFOPT_WINPOS**: `-8 -8 1037 856` **LOCALAPPDATA**: `C:\Users\luisy\AppData\Local` **LOGONSERVER**: `\\LAPTOP-HHAJBPKE` **NUMBER_OF_PROCESSORS**: `8` **OneDrive**: `C:\Users\luisy\OneDrive` **OnlineServices**: `Online Services` **OS**: `Windows_NT` **Path**: `C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Calibre2\;C:\Users\luisy\AppData\Local\Microsoft\WindowsApps` **PATHEXT**: `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC` **platformcode**: `KV` **PROCESSOR_ARCHITECTURE**: `AMD64` **PROCESSOR_IDENTIFIER**: `AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD` **PROCESSOR_LEVEL**: `23` **PROCESSOR_REVISION**: `1801` **ProgramData**: `C:\ProgramData` **ProgramFiles**: `C:\Program Files` **ProgramFiles(x86)**: `C:\Program Files (x86)` **ProgramW6432**: `C:\Program Files` **PROMPT**: `$P$G` **PSModulePath**: `C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules` **PUBLIC**: `C:\Users\Public` **qownnotesCommand**: `"C:\Program Files\QOwnNotes"\QOwnNotes.exe -- **RegionCode**: `LA` **SESSIONNAME**: `Console` **source**: `C:\Users\luisy\AppData\Local\Temp\QOwnNotes-ykiEhN.zip` **SystemDrive**: `C:` **SystemRoot**: `C:\WINDOWS` **USERDOMAIN**: `LAPTOP-HHAJBPKE` **USERDOMAIN_ROAMINGPROFILE**: `LAPTOP-HHAJBPKE` **USERNAME**: `luisy` **USERPROFILE**: `C:\Users\luisy` **windir**: `C:\WINDOWS`
pbek commented 10 months ago

In the script engine, there would be https://www.qownnotes.org/scripting/hooks.html#autocompletionhook to control the autocompletion. https://github.com/pbek/QOwnNotes/blob/main/docs/scripting/examples/autocompletion.qml is a good example on what you can do with it.

luisyaxmedrano commented 10 months ago

I'm a little bit confused. This doesn't add an autocomplete feature, does it? It's like a function for me to script the feature, right? Because I added the script and it did nothing in QOwnNotes.

pbek commented 10 months ago

No, the script is just an example on how to use the autocompletionhook. One would need to implement a script looking for notes with a name starting with the characters already entered...