py-autopep8.el icon indicating copy to clipboard operation
py-autopep8.el copied to clipboard

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

Open baudilio opened this issue 4 years ago • 4 comments

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 avatar Jan 26 '21 21:01 baudilio

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) 

baudilio avatar Jan 26 '21 21:01 baudilio

Same issue here.

  • Emacs 27.1
  • plain config (emacs -Q)

johannes-mueller avatar Feb 01 '21 10:02 johannes-mueller

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

ideasman42 avatar Apr 23 '22 06:04 ideasman42

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.

ideasman42 avatar May 03 '22 23:05 ideasman42