Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.14k stars 299 forks source link

K (linuxmint) Some snippets don't work properly #3940

Open ven-u opened 2 years ago

ven-u commented 2 years ago

Short Summary

A certain snippet does not return the insertion point to the file being edited.

Steps to Reproduce

Create the following snippet:

<span class="parno">[[%ask:ParNo:]]</span>

[x] Maintain selected text ...

The snippet is assigned hotkey Ctrl+Alt+Shift+P

Expected results

Edit pane is active, cursor appears to the left of "<span class"

Actual results

I have to manually click in the edit pane.

Platform Information

Komodo Edit 12.0.1 Build 15441 Linuxmint 20., Cinnamon (but this behaviour also appears in LM 19.3)

Additional Information

I restarted Ko Edit at 1547 hrs 25 Oct 21021. Log file follows:

[2021-10-25 15:47:13,387] [INFO] Startup: Welcome to Komodo Edit 12.0.1 build 18441 (platform linux-x86_64, running on Linux 5.4.0-89-generic version #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021) [2021-10-25 15:47:13,388] [INFO] Startup: /usr/bin/python built on Tue Feb 11 02:14:12 2020 [2021-10-25 15:47:13,562] [WARNING] koXMLPrefs: dePickleCache: Can't open file u'/ddr/prog/64/Komodo-Edit-12/lib/support/prefs.xmlc' [2021-10-25 15:47:13,563] [WARNING] koXMLPrefs: the dePickledCache object was None [2021-10-25 15:47:13,664] [INFO] koInitService: Setting LC_CTYPE to utf-8 [2021-10-25 15:47:14,280] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381 [2021-10-25 15:47:14,367] [WARNING] root: [object Object].logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1). @chrome://komodo/content/komodo.js:48:1

[2021-10-25 15:47:14,983] [ERROR] console-logger: bad script XDR magic number (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:15,291] [WARNING] keybindings: [F1] was used for 'cmd_helpHelp', overriding to use 'cmd_toggleInteractiveShell' [2021-10-25 15:47:15,292] [WARNING] keybindings: [Ctrl+0] was used for 'cmd_goToQuickBookmark_0', overriding to use 'cmd_fontZoomReset' [2021-10-25 15:47:16,644] [WARNING] ko.widgets: Pref path doesn't exist: windowWorkspace, 1 [2021-10-25 15:47:16,962] [INFO] koInitService: Adding pre startup service for 'koFileStatusService': '@activestate.com/koFileStatusService;1' [2021-10-25 15:47:17,099] [INFO] elastic_tabstops: Elastic tabstops loaded. [2021-10-25 15:47:17,300] [ERROR] CT::margin.js: couldn't get the insert-color -- EXCEPTION START -- TypeError: this.view.scheme.getInterfaceStyleRaw is not a function

[2021-10-25 15:47:19,280] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:19,912] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:19,913] [ERROR] commando-scope-packages: Unable to retrieve package listing for schemes Traceback from ERROR in 'commando-scope-packages' logger: Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27 this._getAvailablePackagesByKind/<@chrome://scope-packages/content/packages.js:440:17 this.request/req.onreadystatechange@chrome://komodo/content/sdk/ajax.js:75:17 injectOpenHandler/tw.openDialog@chrome://komodo/content/global.js:120:22 openDialogWrap@chrome://komodo/content/komodo.js:654:19 dialog_yesNoCancel@chrome://komodo/content/library/dialogs.js:164:1 project_openProjectFromURL@chrome://komodo/content/project/projectManager.js:1529:26 projectManager.prototype.setState/<@chrome://komodo/content/project/projectManager.js:1396:1 projectManager.prototype.setState@chrome://komodo/content/project/projectManager.js:1395:9 this._restoreWindowWorkspace/<@chrome://komodo/content/workspace.js:470:17 this.waitForProjectManager/</delayFunc@chrome://komodo/content/workspace.js:507:17

[2021-10-25 15:47:20,098] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,099] [ERROR] commando-scope-packages: Unable to retrieve package listing for addons Traceback from ERROR in 'commando-scope-packages' logger: Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27 this._getAvailablePackagesByKind/<@chrome://scope-packages/content/packages.js:440:17 this.request/req.onreadystatechange@chrome://komodo/content/sdk/ajax.js:75:17 injectOpenHandler/tw.openDialog@chrome://komodo/content/global.js:120:22 openDialogWrap@chrome://komodo/content/komodo.js:654:19 dialog_yesNoCancel@chrome://komodo/content/library/dialogs.js:164:1 project_openProjectFromURL@chrome://komodo/content/project/projectManager.js:1529:26 projectManager.prototype.setState/<@chrome://komodo/content/project/projectManager.js:1396:1 projectManager.prototype.setState@chrome://komodo/content/project/projectManager.js:1395:9 this._restoreWindowWorkspace/<@chrome://komodo/content/workspace.js:470:17 this.waitForProjectManager/</delayFunc@chrome://komodo/content/workspace.js:507:17

[2021-10-25 15:47:20,389] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,409] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,410] [ERROR] commando-scope-packages: Unable to retrieve package listing for macros Traceback from ERROR in 'commando-scope-packages' logger: Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27 this._getAvailablePackagesByKind/<@chrome://scope-packages/content/packages.js:440:17 this.request/req.onreadystatechange@chrome://komodo/content/sdk/ajax.js:75:17 injectOpenHandler/tw.openDialog@chrome://komodo/content/global.js:120:22 openDialogWrap@chrome://komodo/content/komodo.js:654:19 dialog_yesNoCancel@chrome://komodo/content/library/dialogs.js:164:1 project_openProjectFromURL@chrome://komodo/content/project/projectManager.js:1529:26 projectManager.prototype.setState/<@chrome://komodo/content/project/projectManager.js:1396:1 projectManager.prototype.setState@chrome://komodo/content/project/projectManager.js:1395:9 this._restoreWindowWorkspace/<@chrome://komodo/content/workspace.js:470:17 this.waitForProjectManager/</delayFunc@chrome://komodo/content/workspace.js:507:17

[2021-10-25 15:47:20,422] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,423] [ERROR] commando-scope-packages: Unable to retrieve package listing for toolbox Traceback from ERROR in 'commando-scope-packages' logger: Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27 this._getAvailablePackagesByKind/<@chrome://scope-packages/content/packages.js:440:17 this.request/req.onreadystatechange@chrome://komodo/content/sdk/ajax.js:75:17 injectOpenHandler/tw.openDialog@chrome://komodo/content/global.js:120:22 openDialogWrap@chrome://komodo/content/komodo.js:654:19 dialog_yesNoCancel@chrome://komodo/content/library/dialogs.js:164:1 project_openProjectFromURL@chrome://komodo/content/project/projectManager.js:1529:26 projectManager.prototype.setState/<@chrome://komodo/content/project/projectManager.js:1396:1 projectManager.prototype.setState@chrome://komodo/content/project/projectManager.js:1395:9 this._restoreWindowWorkspace/<@chrome://komodo/content/workspace.js:470:17 this.waitForProjectManager/</delayFunc@chrome://komodo/content/workspace.js:507:17

[2021-10-25 15:47:20,428] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,432] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,434] [ERROR] commando-scope-packages: Unable to retrieve package listing for skins Traceback from ERROR in 'commando-scope-packages' logger: Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27 this._getAvailablePackagesByKind/<@chrome://scope-packages/content/packages.js:440:17 this.request/req.onreadystatechange@chrome://komodo/content/sdk/ajax.js:75:17 injectOpenHandler/tw.openDialog@chrome://komodo/content/global.js:120:22 openDialogWrap@chrome://komodo/content/komodo.js:654:19 dialog_yesNoCancel@chrome://komodo/content/library/dialogs.js:164:1 project_openProjectFromURL@chrome://komodo/content/project/projectManager.js:1529:26 projectManager.prototype.setState/<@chrome://komodo/content/project/projectManager.js:1396:1 projectManager.prototype.setState@chrome://komodo/content/project/projectManager.js:1395:9 this._restoreWindowWorkspace/<@chrome://komodo/content/workspace.js:470:17 this.waitForProjectManager/</delayFunc@chrome://komodo/content/workspace.js:507:17

[2021-10-25 15:47:20,438] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,438] [ERROR] commando-scope-packages: Unable to retrieve package listing for languages Traceback from ERROR in 'commando-scope-packages' logger: Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27 this._getAvailablePackagesByKind/<@chrome://scope-packages/content/packages.js:440:17 this.request/req.onreadystatechange@chrome://komodo/content/sdk/ajax.js:75:17 injectOpenHandler/tw.openDialog@chrome://komodo/content/global.js:120:22 openDialogWrap@chrome://komodo/content/komodo.js:654:19 dialog_yesNoCancel@chrome://komodo/content/library/dialogs.js:164:1 project_openProjectFromURL@chrome://komodo/content/project/projectManager.js:1529:26 projectManager.prototype.setState/<@chrome://komodo/content/project/projectManager.js:1396:1 projectManager.prototype.setState@chrome://komodo/content/project/projectManager.js:1395:9 this._restoreWindowWorkspace/<@chrome://komodo/content/workspace.js:470:17 this.waitForProjectManager/</delayFunc@chrome://komodo/content/workspace.js:507:17

[2021-10-25 15:47:20,443] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,444] [ERROR] commando-scope-packages: Unable to retrieve package listing for keybinds Traceback from ERROR in 'commando-scope-packages' logger: Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27 this._getAvailablePackagesByKind/<@chrome://scope-packages/content/packages.js:440:17 this.request/req.onreadystatechange@chrome://komodo/content/sdk/ajax.js:75:17 injectOpenHandler/tw.openDialog@chrome://komodo/content/global.js:120:22 openDialogWrap@chrome://komodo/content/komodo.js:654:19 dialog_yesNoCancel@chrome://komodo/content/library/dialogs.js:164:1 project_openProjectFromURL@chrome://komodo/content/project/projectManager.js:1529:26 projectManager.prototype.setState/<@chrome://komodo/content/project/projectManager.js:1396:1 projectManager.prototype.setState@chrome://komodo/content/project/projectManager.js:1395:9 this._restoreWindowWorkspace/<@chrome://komodo/content/workspace.js:470:17 this.waitForProjectManager/</delayFunc@chrome://komodo/content/workspace.js:507:17

[2021-10-25 15:47:20,449] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,453] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,456] [ERROR] console-logger: An error occurred during a connection to community.komodoide.com:443.

Unknown code ___f 30 (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,460] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,468] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,473] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,476] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,481] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,484] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,489] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,494] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,496] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,500] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:20,619] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///ddr/prog/64/Komodo-Edit-12/lib/mozilla/components/koamAddonManager.js:138 [2021-10-25 15:47:21,164] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:21,346] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:21,794] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:21,994] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:22,223] [ERROR] console-logger: community.komodoide.com:443 uses an invalid security certificate.

The certificate is not trusted because the issuer certificate has expired. (0) in :0 Traceback (most recent call last): File "", line 0, in

[2021-10-25 15:47:29,565] [INFO] koInitService: Adding pre startup service for 'KoMemoryReporter': '@activestate.com/koMemoryReporter;1' [2021-10-25 15:47:29,572] [INFO] koInitService: Adding pre startup service for 'koCommandmentService': '@activestate.com/koCommandmentService;1' [2021-10-25 15:48:01,645] [WARNING] console-logger: Key event not available on GTK2: key="u" modifiers="control,shift" (1) in chrome://komodo/content/komodo.xul:0 [2021-10-25 15:49:11,827] [WARNING] console-logger: Key event not available on GTK2: key="u" modifiers="control,shift" (1) in chrome://komodo/content/tail/tail.xul:0

ven-u commented 2 years ago

Also, snippets such as

<hr>
[[%(w:else:)]]

work fine.

This is the only snippet I have that asks for user input.

th3coop commented 2 years ago

Hi @ven-u, can you right click on the snippet in your toolbox and select Edit Tool (Advanced) and share that in your next comment?

ven-u commented 2 years ago

I have further information which may indicate a bug in Komodo Edit

I'm running KE 12 on linuxmint 20.2.

I like to run dclock in a script with some parameters set by wmctrl (no taskbar, 'always on top').

When I run dclock without wmctrl, snippets with the [[%ask:QUESTION:DEFAULT]] variable work properly; the insertion point returns to the active window. But when wmctrl is part of the script, the insertion point does not appear in the editing pane, even though Komodo Edit is active.

I have workarounds in place, but these sacrifice the 'on-top and no-taskbar' attributes.

For th3coop: // komodo tool: ParaNum // ==================== // auto_abbreviation: false // indent_relative: false // is_clean: true // keyboard_shortcut: Ctrl+Alt+Shift+P // language: Text // set_selection: true // treat_as_ejs: false // type: snippet // version: 1.1.5 // ==================== !@#_currentPos[[%ask:ParNo:]]!@#_anchor

Thanks Ven-U

ven-u commented 2 years ago

It now develops that if any other window is set to "always on top" via right-clicking the title bar, the [[ask]] snippet doesn't return control to the active pane.

Looks like a bug.

th3coop commented 2 years ago

Before we dig further, have you tried this in Komodo IDE? Your snippet works as expected in IDE.

Follow up questions:

FYI, it's best if we find a workaround for this. Even if we determine it's a bug in Komodo, there won't be a fix coming any time soon.