Closed benstroud closed 9 years ago
Hi,
I tried to reproduce this by mixing the encodings in a single file but failed on Ubuntu. What is the encoding of your file?
For the test I posted...
1 -- iso-latin-1-dos (alias: iso-8859-1-dos latin-1-dos)
ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1).
Type: charset (charset)
EOL type: CRLF
This coding system encodes the following charsets:
iso-8859-1
My mode line reads 1\---
. Please let me know how to provide additional details if needed. Thanks.
I am seeing the same thing. Using emacs-24.3.1 on Windows 7. It runs fine on Linux Mint 17, but not on Windows. If you need more information or want try out a fix, let me know.
Could you try this? https://github.com/paetzke/py-autopep8.el/tree/fix-encoding
Sorry for the delay. This did not appear to work. When I save I still get the ^M on the end of the line. A second save removes the end of line from each line making the code unreadable.
A quick hack that looks better so far is to comment out coding-system-for-read and coding-system-for-write. The ^M goes away and the buffer gets fixed up. I do not know enough elisp to know the side effects from this.
Removing the coding-systems works also for me, but not on travis:
https://travis-ci.org/paetzke/py-autopep8.el/builds/38704424
What is the cassou PPA for emacs? How is this different from the default one? I am using the default one in Mint. I took that step out of test.bash and the test cases passed on my Linux Mint 17 PC.
Phil
On Wed, Oct 22, 2014 at 6:03 AM, Friedrich Paetzke <notifications@github.com
wrote:
Removing the coding-systems works also for me, but not on travis:
https://travis-ci.org/paetzke/py-autopep8.el/builds/38704424
— Reply to this email directly or view it on GitHub https://github.com/paetzke/py-autopep8.el/issues/8#issuecomment-60080797 .
The PPA is just for Travis CI. The build server is an Ubuntu 12.04 with Emacs 23. From the PPA I install an Emacs 24. I modified the test.bash to add the PPA only on Travis.
I have this on windows7 64 bit latest emacs 24 running emacs using https://github.com/purcell/emacs.d This was the only alteration to that default configuration.
Could you try this branch? https://github.com/paetzke/py-autopep8.el/tree/fix-encoding
Patch is merged
Using py-autopep8 on Windows:
test.py (saved with DOS-style EOL, but same results when saving as UNIX EOL)
Becomes the following after M-x py-autopep8:
Is there a way to avoid the extra ^M being added? When running autopep8 from cmdline I don't get the extra characters. Thanks