neil-lindquist / lisp-paredit

Paredit for Atom
MIT License
24 stars 5 forks source link

Uncaught TypeError: Cannot read property 'getCursorsOrderedByBufferPosition' of undefined #26

Closed rayk closed 4 years ago

rayk commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.12.2 Electron Version: 1.3.6 System: Mac OS X 10.12.1 Thrown From: lisp-paredit package, v0.5.4

Stack Trace

Uncaught TypeError: Cannot read property 'getCursorsOrderedByBufferPosition' of undefined

At /Users/rayk/.atom/packages/lisp-paredit/lib/edit-commands.coffee:70

TypeError: Cannot read property 'getCursorsOrderedByBufferPosition' of undefined
    at Array.newline (/Users/rayk/.atom/packages/lisp-paredit/lib/edit-commands.coffee:70:21)
    at atom-text-editor.<anonymous> (/Users/rayk/.atom/packages/lisp-paredit/lib/utils.coffee:51:70)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:259:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:584:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:379:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:106:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:59)

Commands

     -2:11.2.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -2:10 lisp-paredit:newline (atom-text-editor.editor.is-focused)
     -2:08.5.0 proto-repl:execute-text-entered-in-repl (atom-text-editor.editor.is-focused)
     -2:08.5.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
     -2:05.3.0 core:move-up (atom-text-editor.editor.is-focused)
 18x -2:04.9.0 core:move-left (atom-text-editor.editor.is-focused)
     -2:02.2.0 core:move-right (atom-text-editor.editor.is-focused)
 10x -2:00.3.0 core:move-left (atom-text-editor.editor.is-focused)
     -1:57.4.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -1:55.3.0 proto-repl:execute-text-entered-in-repl (atom-text-editor.editor.is-focused)
  3x -1:55.3.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
     -0:30 core:copy (atom-text-editor.editor.lisp-paredit-strict.indent-mode-76f60.is-focused)
     -0:08.2.0 autocomplete-plus:cancel (atom-text-editor.editor)
     -0:05.8.0 core:move-up (atom-text-editor.editor.is-focused)
 18x -0:05.5.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:00.0 lisp-paredit:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "background-tips",
      "language-csharp",
      "language-objective-c",
      "language-ruby-on-rails",
      "package-generator",
      "welcome",
      "language-c",
      "dev-live-reload",
      "swackets"
    ],
    "followSymlinks": false,
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_Store",
      "._*",
      "Thumbs.db",
      ".pioenvs",
      ".piolibdeps",
      ".clang_complete",
      ".gcc-flags.json"
    ],
    "projectHome": "~/Projects",
    "telemetryConsent": "limited",
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ],
    "useCustomTitleBar": true
  },
  "lisp-paredit": {
    "indentationForms": [
      "try",
      "catch",
      "finally",
      "let",
      "are",
      "/^def.*/",
      "fn",
      "cond",
      "if",
      "if-let",
      "for",
      "/when.*/",
      "testing",
      "doseq",
      "dotimes",
      "loop",
      "ns"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.29.13 (inactive)
auto-update-packages, v1.0.1 (active)
autoclose-html, v0.23.0 (active)
autocomplete-html-entities, v0.1.0 (active)
autocomplete-java, v1.2.5 (inactive)
bleen-syntax, v0.3.1 (inactive)
borealis-syntax, v0.6.0 (inactive)
clock, v1.7.2 (active)
clojure-plus, v0.1.2 (active)
color-tabs, v0.1.8 (active)
css-clean, v2.15.0 (inactive)
dark-bint-syntax, v0.8.9 (inactive)
dash, v1.7.0 (inactive)
file-icons, v1.7.24 (active)
foldingtext-for-atom, v0.9.2 (active)
genesis-ui, v0.5.0 (inactive)
git-control, v0.8.2 (inactive)
git-log, v0.4.1 (active)
git-status, v0.3.4 (inactive)
git-time-machine, v1.5.3 (inactive)
gitignore-snippets, v0.2.5 (inactive)
golden-ratio, v0.3.0 (inactive)
highlight-line, v0.11.1 (active)
highlight-selected, v0.11.2 (active)
imdone-atom, v2.0.15 (active)
ink, v0.5.3 (active)
jumpy, v3.1.3 (inactive)
language-ini, v1.16.0 (active)
line-count, v0.5.0 (inactive)
line-count-status, v0.0.3 (active)
lines, v0.13.1 (inactive)
linter, v1.11.18 (active)
linter-clojure, v1.1.2 (active)
linter-javac, v1.9.4 (active)
linter-sass-lint, v1.7.4 (active)
lisp-paredit, v0.5.4 (active)
markdown-format, v2.5.1 (active)
northem-dark-atom-syntax, v2.0.0 (inactive)
pane-jump, v0.2.0 (inactive)
Parinfer, v1.16.0 (active)
pigments, v0.37.0 (active)
project-manager, v3.3.3 (active)
proto-repl, v1.4.8 (active)
proto-repl-charts, v0.4.0 (active)
sass-autocompile, v0.13.1 (active)
set-syntax, v0.3.2 (active)
soft-charcoal-syntax, v0.1.0 (inactive)
sort-lines, v0.14.0 (inactive)
Sublime-Style-Column-Selection, v1.7.2 (active)
swackets, v0.12.0 (inactive)
sync-settings, v0.7.2 (active)
tab-switcher, v1.5.4 (active)
tablr, v1.5.5 (active)
tool-bar, v1.0.1 (active)
tool-bar-main, v0.0.10 (active)
tree-view-git-status, v1.2.0 (active)
wakatime, v6.0.10 (active)
atom-dark-syntax, v0.27.0 (active)
atom-dark-ui, v0.52.0 (active)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (inactive)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (inactive)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.13.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.4 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (inactive)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.202.2 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (active)
metrics, v1.1.1 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.4 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.2 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.210.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (inactive)
whitespace, v0.35.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.54.0 (inactive)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.0 (active)
language-csharp, v0.12.1 (inactive)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.46.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (inactive)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages
torbjornvatn commented 7 years ago

I get this all the time as well when i hit enter in the proto-repl REPL instead of shift-enter

MarcAMartin commented 7 years ago

+1, getting this too

pkimbrel commented 7 years ago

+1 - first impressions. Thank you @torbjornvatn for the insight on hitting shift-enter.

nilshae commented 7 years ago

same here is there any progress?

bherrmann7 commented 7 years ago

Ditto. When I hit enter in proto repl I get the "getCursorsOrderedByBufferPosition" error. I just set up a fresh install using https://gist.github.com/jasongilman/d1f70507bed021b48625 - I'm a atom noob

bigkahuna1uk commented 7 years ago

Any ideas, when this is going to be fixed? It's a critical blocker for using Proto-REPL for Clojure development. Atom is unusable with this issue.

nilshae commented 7 years ago

I'm not sure if it's bug in lisp-paredit or proto-repl, because when I disable lisp-paredit I have this issue. Is it the same for you guys? They could be related.

jonspalding commented 7 years ago

Anyone got any steps to reproduce? It's not happening for me.

rayk commented 7 years ago

I am still getting this issue

[Enter steps to reproduce:]

  1. Clojure project, I run the proto REPL
  2. Type the expression I want to eval
  3. If I don't Shift-Enter then I get the exception.
  4. Otherwise if one shift enter then there is no problem, the upshot is that I can not build a nested expression in the REPL until I want to allow it to run on and on....

Atom: 1.15.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.3 Thrown From: lisp-paredit package 0.5.5

Stack Trace

Uncaught TypeError: Cannot read property 'getCursorsOrderedByBufferPosition' of undefined

At /Users/rayk/.atom/packages/lisp-paredit/lib/edit-commands.coffee:70

TypeError: Cannot read property 'getCursorsOrderedByBufferPosition' of undefined
    at Array.newline (/packages/lisp-paredit/lib/edit-commands.coffee:70:21)
    at /packages/lisp-paredit/lib/utils.coffee:51:70)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

  2x -2:27.4.0 core:backspace (input.hidden-input)
     -2:26.2.0 core:save (input.hidden-input)
     -2:24.2.0 proto-repl:clear-repl (input.hidden-input)
     -2:23.7.0 proto-repl:exit-repl (input.hidden-input)
     -2:19 proto-repl:toggle (input.hidden-input)
     -1:56.8.0 core:move-right (input.hidden-input)
 19x -1:56.4.0 core:backspace (input.hidden-input)
     -1:47.9.0 core:move-down (input.hidden-input)
     -1:47.4.0 autocomplete-plus:confirm (input.hidden-input)
     -1:44.4.0 core:move-right (input.hidden-input)
 32x -1:44.1.0 core:backspace (input.hidden-input)
     -1:33.9.0 proto-repl:clear-repl (input.hidden-input)
     -1:33.3.0 proto-repl:exit-repl (input.hidden-input)
     -1:22.2.0 proto-repl:toggle (input.hidden-input)
     -1:10.3.0 lisp-paredit:newline (input.hidden-input)
     -1:05.1.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)

Non-Core Packages

aligner-css 1.2.0 
atom-beautify 0.29.17 
auto-update-packages 1.0.1 
clock 1.9.0 
cssfmt 1.4.0 
file-icons 2.0.17 
git-hide 1.0.0 
git-log 0.4.1 
git-plus 7.3.3 
highlight-selected 0.12.0 
imdone-atom 2.1.22 
imdone-atom-github 0.1.11 
ink 0.6.5 
linter 1.11.23 
linter-clojure 1.1.2 
linter-swagger 0.3.9 
linter-write-good 0.8.0 
lisp-paredit 0.5.5 
markdown-writer 2.6.4 
Parinfer 1.17.0 
platformio-ide-terminal 2.4.0 
pretty-json 1.6.1 
proto-repl 1.4.16 
proto-repl-charts 0.4.0 
set-syntax 0.3.2 
sort-lines 0.14.0 
Sublime-Style-Column-Selection 1.7.3 
swackets 0.26.0 
sync-settings 0.8.1 
tablr 1.8.1 
tool-bar 1.0.1 
tree-view-git-status 1.3.1 
wnr commented 7 years ago
  1. Clojure project, I run the proto REPL
  2. Type the expression I want to eval
  3. Press enter

Atom: 1.14.4 x64 Electron: 1.3.13 OS: Mac OS X 10.12.3 Thrown From: lisp-paredit package 0.5.5

Stack Trace

Uncaught TypeError: Cannot read property 'getCursorsOrderedByBufferPosition' of undefined

At /Users/lucas/.atom/packages/lisp-paredit/lib/edit-commands.coffee:70

TypeError: Cannot read property 'getCursorsOrderedByBufferPosition' of undefined
    at Array.newline (/packages/lisp-paredit/lib/edit-commands.coffee:70:21)
    at /packages/lisp-paredit/lib/utils.coffee:51:70)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -0:33.1.0 command-palette:toggle (input.hidden-input)
     -0:31.4.0 core:confirm (input.hidden-input)
     -0:31.4.0 proto-repl:toggle (input.hidden-input)
     -0:27.5.0 lisp-paredit:newline (input.hidden-input)
     -0:20.8.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)
  3x -0:11.7.0 core:backspace (input.hidden-input)
  2x -0:06.6.0 lisp-paredit:newline (input.hidden-input)
     -0:00.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused)

Non-Core Packages

an-old-hope-syntax 1.0.4 
ariake-dark-syntax 0.1.3 
atom-beautify 0.29.17 
atom-material-ui 1.3.9 
aurora-theme 1.2.2 
auto-detect-indentation 1.3.0 
docblockr 0.9.1 
Earthsong 1.0.0 
editorconfig 2.2.2 
firewatch-hot-syntax 1.3.0 
firewatch-syntax 1.1.1 
fizzy 0.21.0 
genesis-syntax 1.0.9 
genesis-ui 0.5.0 
git-blame 0.4.12 
goto 1.8.3 
highlight-selected 0.12.0 
indentation-indicator 1.0.0 
ink 0.6.5 
language-latex 1.0.0 
latex 0.42.3 
line-jumper 0.14.1 
linter 1.11.23 
linter-eslint 8.1.3 
lisp-paredit 0.5.5 
nord-atom-syntax 0.6.0 
nord-atom-ui 0.10.2 
octocat-syntax 1.3.1 
Parinfer 1.17.0 
pretty-json 1.6.1 
proto-repl 1.4.17 
sort-lines 0.14.0 
spacegray-dark-neue-syntax 1.4.2 
split-diff 1.2.0 
tabs-to-spaces 1.0.3 
trailing-spaces 0.4.0 
shyblower commented 7 years ago

I had the same issue and solved it by removing this line 'enter': 'lisp-paredit:newline' which I had copied from some googled atom-clojure-keymap suggestions, from my custom keymap.

wnr commented 7 years ago

Hmm, but then I loose the functionality of having the paredit newline? Even with the default keymap enabled for lisp-paredit, I get this error.

mdgart commented 7 years ago

👍 same problem here

AlJohri commented 7 years ago

Just ran into this. This is the gist @shyblower is probably referring to: https://git.io/atom_clojure_setup

@jasongilman any tips? seems like overriding enter to use lisp-paredit causes issues with proto-repl

AlJohri commented 7 years ago

Fixed by adding this to my keymap.cson:

# Override newline back to original for proto-repl
'.platform-darwin ink-console atom-text-editor[data-grammar~="clojure"]':
  'enter':          'editor:newline'
neil-lindquist commented 4 years ago

I'm not able to reproduce this error. So, I'm going to close this issue, unless it's still happening for some people.