cursive-ide / emacs-plus

Some patches to make the IntelliJ Emacs+ plugin work correctly with recent versions of IntelliJ.
Other
41 stars 18 forks source link

Lost `C-w` (`kill-region`) after an update to 2020.2 #18

Open jcsims opened 4 years ago

jcsims commented 4 years ago

First - thanks so much for keeping this working with newer versions! It's been a lifesaver in moving from Emacs to Intellij/Cursive 🙏

I recently updated to IntelliJ 2020.2, and noticed that kill-region had stopped working for me. I've tried going back to the packaged default keymap, and it's not working there either. Checking my keymap, it's the only action bound to C-w. Any idea what may have changed there, or other things I can check?

Build info: IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94, built on July 27, 2020 Licensed to Chris Sims Subscription is active until February 3, 2021 Runtime version: 11.0.7+10-b944.20 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.6 GC: ParNew, ConcurrentMarkSweep Memory: 4029M Cores: 8 Registry: ide.tooltip.initialDelay=597 Non-Bundled Plugins: com.arcticicestudio.nord.jetbrains, com.cursive-ide.emacsplus, com.intellij.nativeDebug, com.jetbrains.ChooseRuntime, net.sjrx.intellij.plugins.systemdunitfiles, uk.co.ben-gibson.remote.repository.mapper, org.toml.lang, com.cursiveclojure.cursive, org.rust.lang

Emacs+ Patched version: 0.3.900

Thanks!

bofur commented 4 years ago

I've found this in idea logs:

2020-08-06 11:44:24,752 [ 213325]   WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=de.plushnikov.intellij.plugin.settings.ProjectSettingsPage) 
2020-08-06 11:44:24,769 [ 213342]   WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting 
2020-08-06 11:44:45,343 [ 233916]   WARN - tions.ex.ConfigurableCardPanel - auto-dispose 'Plugins' id=preferences.pluginManager 
2020-08-06 11:44:45,702 [ 234275]   INFO - rationStore.ComponentStoreImpl - Saving appFileTypeManager took 16 ms 
2020-08-06 11:44:45,846 [ 234419]   WARN - com.intellij.util.xmlb.Binding - no accessors for org.jetbrains.kotlin.idea.core.script.configuration.utils.ScriptClassRootsStorage 
2020-08-06 11:44:45,894 [ 234467]   INFO - rationStore.ComponentStoreImpl - Saving Project(name=fiscal-orange-service, containerState=ACTIVE, componentStore=/home/bofur/projects/x5/of-fos)TaskManager took 12 ms, XDebuggerManager took 11 ms 
2020-08-06 11:44:49,208 [ 237781]  ERROR - llij.ide.plugins.PluginManager - Argument for @NotNull parameter 'data' of com/mulgasoft/emacsplus/handlers/YankHandler.paste must not be null 
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'data' of com/mulgasoft/emacsplus/handlers/YankHandler.paste must not be null
    at com.mulgasoft.emacsplus.handlers.YankHandler.$$$reportNull$$$0(YankHandler.java)
    at com.mulgasoft.emacsplus.handlers.YankHandler.paste(YankHandler.java)
    at com.mulgasoft.emacsplus.handlers.YankHandler.yankIt(YankHandler.java:87)
    at com.mulgasoft.emacsplus.actions.edit.Yank$myHandler.executeWriteAction(Yank.java:24)
    at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:980)
    at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:65)
    at com.intellij.openapi.editor.actionSystem.DynamicEditorActionHandler.doExecute(DynamicEditorActionHandler.java:52)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$2(EditorActionHandler.java:191)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:88)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$3(EditorActionHandler.java:190)
    at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:299)
    at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:408)
    at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:308)
    at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:283)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:188)
    at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:89)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:98)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:73)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:610)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:670)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:669)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:620)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:517)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:471)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:220)
    at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:888)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:833)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:450)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:449)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:503)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
doktorstick commented 4 years ago

Yup, I have this problem on PyCharm 2020.2 Community Edition, too.

jcsims commented 4 years ago

Downgrading to IntelliJ 2020.1.4 did give me this functionality back for the moment.

metaturso commented 4 years ago

I recently started trying this plugin on PHPStorm/IDEA and found this issue as well, how can I downgrade to an earlier version?

jcsims commented 4 years ago

@metaturso I use JetBrain's Toolbox app, which allows for easy downgrading of installed apps. I updated my comment above to clarify as well - I downgraded IntelliJ itself, not the plugin.

ufobat commented 3 years ago

I am having the same issues on 2020.02. would be awesome if this could be fixed.

stewSquared commented 2 years ago

For what it's worth, on 2021.2.3, C-w/M-w works for me with the packaged default emacs keymap, but not with emacs+ (0.3.900 -- same as OP).

stewSquared commented 2 years ago

Compare default with this plugin:

https://github.com/JetBrains/intellij-community/blob/master/platform/platform-resources/src/keymaps/Emacs.xml#L77

https://github.com/cursive-ide/emacs-plus/blob/06d3ebc32c5c26d2ec733e2f1cef6a5262e1f560/src/main/resources/Keymap_EmacsPlus.xml#L322

One possible fix is to replace Emacs+.KillRegion with EditorKillRegion and remove the currently faulty implementation of KillRegion (then do similarly SaveRegion vs EditorKillRingSave)

Edit: This seems to happen because of conflicting bindings with the default and emacs+. I solved it temporarily in my own settings by removing C-w from kill-region and assigning it to Kill Selected Region, and removing M-w from kill-ring-save and leaving it on `Save to Kill Ring"