Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested patch to handle syntax errors #17

Open
ghost opened this issue Nov 18, 2017 · 0 comments
Open

Suggested patch to handle syntax errors #17

ghost opened this issue Nov 18, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 18, 2017

Thank you for this excellent module!

I just have a suggestion: if there are any python syntax errors that occur during formatting, we currently simply get the message "Buffer is already yapfed". Instead of that, I believe it would be helpful to see these syntax errors. Therefore, I suggest this following patch, or something similar ...

--- py-yapf.el.orig	2017-11-18 12:36:18.017017290 -0500
+++ py-yapf.el	2017-11-18 12:36:27.086994492 -0500
@@ -139,7 +139,7 @@
         (if (zerop (call-process-region (point-min) (point-max) "diff" nil
                                         patchbuf nil "-n" "-" tmpfile))
             (progn
-              (kill-buffer errbuf)
+	      (switch-to-buffer errbuf)
               (pop kill-ring)
               (message (format "Buffer is already %sed" executable-name)))

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants