parinfer

shaunlebron 2018-02-05T06:04:10.000190Z

atom-parinfer 1.22.0 has been published

👍 1
👏 2
shaunlebron 2018-02-05T06:04:59.000080Z

smart-mode stability stuff for advanced operations requiring multiple changes

shaunlebron 2018-02-05T17:51:52.000540Z

📰 Posted a general status update on parinfer: https://www.patreon.com/posts/16810914

seancorfield 2018-02-05T18:12:25.000217Z

(I'll let you know if I run into anything weird but it all sounds very promising from that blog post!)

shaunlebron 2018-02-05T18:23:47.000648Z

@seancorfield thanks! i really appreciate your bug reports. super helpful

shaunlebron 2018-02-05T19:26:05.000302Z

📣 Also, I created a *Parinfer forum* for easier discussions, since GitHub issues aren’t ideal and this chat disappears all the time: http://parinfer.trydiscourse.com/

seancorfield 2018-02-05T19:35:33.000076Z

@shaunlebron Run into my first "odd" behavior with the new parinfer. I have code like this

(cond (not member)
                  (api/invalid-argument req)
                  (or (:suspended member)
                      (:deleted member))
                  (api/invalid-argument req)
                  :else
              (do
                (timbre/logged-future
                 (business/login! req member)
                 (log/write-log :logxxx
                                {:siteid (or (get-in req [:params :xxxxxx])
                                             (u/site-id member))
                                 :userid (:id member)
                                 :event  "xxxxxx"}
                                req))
                (resp/response {:code (xxx xxx)}))))
and I put my cursor just before the (do and start pressing the space key. As the form moves to the right, the code inside the do is indented by one more space than it needs to be each time.

shaunlebron 2018-02-05T19:36:05.000145Z

sweet

shaunlebron 2018-02-05T19:36:25.000595Z

i’m not getting that behavior here, i wonder how we can tell what’s different

seancorfield 2018-02-05T19:36:39.000701Z

After four spaces, to line up (do under the :else, I have

(do
                        (timbre/logged-future
                         (business/login! req member)
                         (log/write-log :logxxx
                                        {:siteid (or (get-in req [:params :xxxxxx])
                                                     (u/site-id member))
                                         :userid (:id member)
                                         :event  "xxxxxx"}
                                        req))
                        (resp/response {:code (xxx xxx)}))))

seancorfield 2018-02-05T19:37:35.000697Z

If I just use the auto-indent hot key, it moves over and is all indented correctly.

seancorfield 2018-02-05T19:38:21.000474Z

(that's lisp-paredit:indent tho')

seancorfield 2018-02-05T19:38:47.000572Z

Interesting... Do you have lisp-paredit as well?

shaunlebron 2018-02-05T19:39:52.000392Z

yeah, i had installed just to try to repro your cases in #94

shaunlebron 2018-02-05T19:40:45.000192Z

what OS?

seancorfield 2018-02-05T19:42:12.000024Z

Mac OS X

seancorfield 2018-02-05T19:42:16.000464Z

Well, macOS 🙂

seancorfield 2018-02-05T19:44:44.000537Z

Also, when I try to revert changes from SourceTree, Parinfer is fighting the editor and attempting to redo some of the changes. It took several goes at reverting changes to get back where I was originally.

shaunlebron 2018-02-05T19:45:56.000554Z

interesting, so we need to turn off Parinfer when SourceTree is active?

shaunlebron 2018-02-05T19:46:20.000316Z

oh, SourceTree is external to Atom

shaunlebron 2018-02-05T19:47:20.000231Z

and Atom is loading in file changes as they appear in the filesystem, after which parinfer processes them as normal user changes

tianshu 2018-02-05T19:47:50.000347Z

3:47 working on production deployment.😂

shaunlebron 2018-02-05T19:48:22.000525Z

@doglooksgood?

seancorfield 2018-02-05T19:49:21.000018Z

@shaunlebron Yeah, I suspect it's the multi-change code thinking the user is making a copy'n'paste and trying to deal with it? Whereas it's just Atom trying to load in file changes...

tianshu 2018-02-05T19:53:44.000117Z

nevermind, just work late...

seancorfield 2018-02-05T20:14:03.000618Z

@shaunlebron I've also noticed that if I do some big multi-change (like the above indentation) and then hit cmd-z to undo, Parinfer seems to repeat the indent/undent operations that the editor is making as part of the undo, so some lines move further right (or left) than they should have done -- breaking the structure of the code.

seancorfield 2018-02-05T20:15:09.000322Z

I suspect that what is needed here, is if you can tell that the changes are editor-initiated, you need Parinfer to behave as if it is in Paren mode and never change code structure? Or just not attempt to process editor-initiated changes?

shaunlebron 2018-02-05T20:17:26.000426Z

thanks, that’s helpful direction to think about

shaunlebron 2018-02-05T20:17:49.000591Z

i just tried undo here after the indentation operation you described above

shaunlebron 2018-02-05T20:18:24.000197Z

that still works as expected, so I think the larger problem of interference from another plugin is at play here

shaunlebron 2018-02-05T20:19:36.000283Z

lemme know if you have a lead on what plugin might be, or if you just wanna send me a list of plugins you’re using with:

apm list --installed --bare

seancorfield 2018-02-05T20:23:34.000103Z

advanced-open-file@0.16.7
atom-clock@0.1.16
autocomplete-cfml@0.5.0
busy-signal@1.4.3
git-plus@7.10.0
highlight-selected@0.13.1
ink@0.8.2
intentions@1.1.5
language-cfml@0.17.1
linter@2.2.0
linter-joker@0.1.4
linter-ui-default@1.6.10
lisp-paredit@0.6.0
parinfer@1.22.0
proto-repl@1.4.22
proto-repl-charts@0.4.1
rainbow-delimiters@2.1.2
set-syntax@0.4.0
tool-bar@1.1.4

seancorfield 2018-02-05T20:24:08.000623Z

Happy to disable any you think might interfere in order to debug this.

shaunlebron 2018-02-05T20:24:47.000546Z

yeah, that’ll be hard to know which

shaunlebron 2018-02-05T20:25:27.000145Z

i can easily install these from command line to recreate the environment for debugging

shaunlebron 2018-02-05T20:28:54.000336Z

tracking here: https://github.com/oakmac/atom-parinfer/issues/100

1