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

isearch-forward is broken on IntelliJ IDEA 2020.2.3 #19

Open mpqc74 opened 3 years ago

mpqc74 commented 3 years ago

Hello,

I've recently started working with in IntelliJ and was glad to find your Emacs+ patched plugin to feel a little more at home. :)

Unfortunately, the isearch-forward is broken and only allows me to find the very first occurence after which any subsequent C-s does nothing. Curiously, isearch-backwards works as expected.

Here's are the two kinds of errors I've found in the idea.log that might help you figure out what's going on:

2020-10-15 14:16:29,070 [65967848]  ERROR - ij.ide.IdeEventQueue.typeahead - JDK: 11.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2020-10-15 14:16:29,071 [65967849]  ERROR - ij.ide.IdeEventQueue.typeahead - OS: Mac OS X 
2020-10-15 14:16:29,071 [65967849]  ERROR - ij.ide.IdeEventQueue.typeahead - Last Action: Emacs+.ISearchForward 

and

java.lang.NullPointerException
    at com.mulgasoft.emacsplus.actions.search.ISearchForward.before(ISearchForward.java:121)
    at com.mulgasoft.emacsplus.actions.EmacsPlusAction$EmacsPlusCommandListener.commandStarted(EmacsPlusAction.java:56)
    at com.intellij.openapi.command.impl.CoreCommandProcessor$1.commandStarted(CoreCommandProcessor.java:73)
    at jdk.internal.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:632)
    at com.intellij.util.messages.impl.MessageBusImpl.executeOrAddToQueue(MessageBusImpl.java:245)
    at com.intellij.util.messages.impl.CompositeMessageBus$ToDirectChildrenMessagePublisher.publish(CompositeMessageBus.java:115)
    at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:183)
    at com.sun.proxy.$Proxy39.commandStarted(Unknown Source)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.fireCommandStarted(CoreCommandProcessor.java:408)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
    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:890)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:835)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:452)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:451)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:505)
    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)
2020-11-09 13:28:21,608 [974618784]  ERROR - .intellij.openapi.command.impl - IntelliJ IDEA 2020.2.3  Build #IU-202.7660.26 
2020-11-09 13:28:21,608 [974618784]  ERROR - .intellij.openapi.command.impl - JDK: 11.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2020-11-09 13:28:21,608 [974618784]  ERROR - .intellij.openapi.command.impl - OS: Mac OS X 
2020-11-09 13:28:21,609 [974618785]  ERROR - .intellij.openapi.command.impl - Plugin to blame: Emacs+ Patched version: 0.3.900 
2020-11-09 13:28:21,609 [974618785]  ERROR - .intellij.openapi.command.impl - Last Action: Emacs+.ISearchForward 
2020-11-09 13:28:21,609 [974618785]  ERROR - .intellij.openapi.command.impl - Current Command: isearch-forward 

I'm currently unable to reproduce what causes these messages to show up in the logs (failing isearch-forward doesn't systematically produce an entry), but I'm willing to collaborate with you in order to have this fixed.

Thanks!

Martin