paetzke / py-autopep8.el

py-autopep8.el integrates autopep8 into Emacs.
GNU General Public License v3.0
79 stars 21 forks source link

File mode specification error: (args-out-of-range 0 0) #29

Open baudilio opened 3 years ago

baudilio commented 3 years ago

After invoking M-x py-autopep8-buffer, the intermediate, temporary file is created Wrote /tmp/autopep80Mlf6X.py. Immediately afterwards, the error kill-append: Args out of range: 0, 0 is raised.

baudilio commented 3 years ago
Debugger entered--Lisp error: (args-out-of-range 0 0)
  get-text-property(0 yank-handler nil)
  kill-append("" nil)
  kill-region(716 716)
  kill-whole-line(7)
  py-autopep8-bf--apply-rcs-patch(#<buffer *autopep8 patch*>)
  py-autopep8-bf--apply-executable-to-buffer("autopep8" py-autopep8--call-executable nil "py")
  py-autopep8-buffer()
  funcall-interactively(py-autopep8-buffer)
  call-interactively(py-autopep8-buffer record nil)
  command-execute(py-autopep8-buffer record)
  execute-extended-command(nil "py-autopep8-buffer" nil)
  funcall-interactively(execute-extended-command nil "py-autopep8-buffer" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command) 
johannes-mueller commented 3 years ago

Same issue here.

ideasman42 commented 2 years ago

This issue is solved by my fork which no longer uses an external diff: https://github.com/ideasman42/py-autopep8.el

ideasman42 commented 2 years ago

Melpa now points to a fork of this package maintained here: https://github.com/ideasman42/emacs-py-autopep8

Diffing is no longer used to apply changes so this bug shouldn't be a problem.