Discussion:
[Twisted-Python] A little present for emacs / flycheck users
Tristan Seligmann
2016-02-09 07:12:06 UTC
Permalink
You may find this to be of use:

https://gist.github.com/mithrandi/15fca4367e878b6b88cd

Is there somewhere I should be submitting this as a PR or something? (I
guess I could release the checker as an emacs package, it's somewhat
specific though)
Jonathan Lange
2016-02-09 13:17:02 UTC
Permalink
Thanks! https://launchpad.net/twisted-emacs is the best I could find re PRs.

Do you have a way to make this conditional? There's precisely one Python
project where I care about using the twistedchecker linter :)
Post by Tristan Seligmann
https://gist.github.com/mithrandi/15fca4367e878b6b88cd
Is there somewhere I should be submitting this as a PR or something? (I
guess I could release the checker as an emacs package, it's somewhat
specific though)
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Tristan Seligmann
2016-02-09 13:26:58 UTC
Permalink
The 'python-mode-hook is just a function, so you can put whatever code you
want in there. I'm not sure exactly what the best mechanism to control this
would be, though; maybe a directory variable?
Post by Jonathan Lange
Thanks! https://launchpad.net/twisted-emacs is the best I could find re PRs.
Do you have a way to make this conditional? There's precisely one Python
project where I care about using the twistedchecker linter :)
Post by Tristan Seligmann
https://gist.github.com/mithrandi/15fca4367e878b6b88cd
Is there somewhere I should be submitting this as a PR or something? (I
guess I could release the checker as an emacs package, it's somewhat
specific though)
_______________________________________________
Post by Tristan Seligmann
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Terry Jones
2016-02-09 17:10:28 UTC
Permalink
There used to be some elisp in Twisted, called something like
twisted-dev-mode.el (written, I think, by Glyph or JP). That added a
find-file-hook based on the prefix of the path of the file you were about
to edit. I still use it, and some small modifications, for a customized dev
mode in various projects. That code could be dug up, or maybe it's still in
Twisted (I took a quick look, didn't see it). Actually, this is probably it
- https://launchpad.net/twisted-emacs

Terry
Post by Tristan Seligmann
The 'python-mode-hook is just a function, so you can put whatever code you
want in there. I'm not sure exactly what the best mechanism to control this
would be, though; maybe a directory variable?
Post by Jonathan Lange
Thanks! https://launchpad.net/twisted-emacs is the best I could find re PRs.
Do you have a way to make this conditional? There's precisely one Python
project where I care about using the twistedchecker linter :)
Post by Tristan Seligmann
https://gist.github.com/mithrandi/15fca4367e878b6b88cd
Is there somewhere I should be submitting this as a PR or something? (I
guess I could release the checker as an emacs package, it's somewhat
specific though)
_______________________________________________
Post by Tristan Seligmann
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Glyph Lefkowitz
2016-02-09 19:17:56 UTC
Permalink
https://gist.github.com/mithrandi/15fca4367e878b6b88cd <https://gist.github.com/mithrandi/15fca4367e878b6b88cd>
Is there somewhere I should be submitting this as a PR or something? (I guess I could release the checker as an emacs package, it's somewhat specific though)
The right place, I think, would be to submit a PR to MELPA, with a new package under the name 'flymake-python-twisted':

https://github.com/melpa/melpa/search?utf8=✓&q=flymake&type=Code

This would be super useful for working on Tubes - https://github.com/twisted/tubes - because it's at zero twistedchecker warnings. But I haven't turned on something like this for working on Twisted because it would drive me bananas to see errors in every file that were not actually relevant to what I was working on. Is there any way to persist a twistedchecker run from current trunk and compare against that? I know twistedchecker has an option but it never seems to work right for me.

-glyph

Loading...