Fork me on GitHub
#parinfer
<
2018-02-05
>
shaunlebron06:02:10

atom-parinfer 1.22.0 has been published

shaunlebron06:02:59

smart-mode stability stuff for advanced operations requiring multiple changes

shaunlebron17:02:52

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

seancorfield18:02:25

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

shaunlebron18:02:47

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

shaunlebron19:02:05

📣 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/

seancorfield19:02:33

@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.

shaunlebron19:02:25

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

seancorfield19:02:39

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)}))))

seancorfield19:02:35

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

seancorfield19:02:21

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

seancorfield19:02:47

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

shaunlebron19:02:52

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

seancorfield19:02:16

Well, macOS 🙂

seancorfield19:02:44

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.

shaunlebron19:02:56

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

shaunlebron19:02:20

oh, SourceTree is external to Atom

shaunlebron19:02:20

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

tianshu19:02:50

3:47 working on production deployment.😂

seancorfield19:02:21

@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...

tianshu19:02:44

nevermind, just work late...

seancorfield20:02:03

@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.

seancorfield20:02:09

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?

shaunlebron20:02:26

thanks, that’s helpful direction to think about

shaunlebron20:02:49

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

shaunlebron20:02:24

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

shaunlebron20:02:36

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

seancorfield20:02:08

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

shaunlebron20:02:47

yeah, that’ll be hard to know which

shaunlebron20:02:27

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