wyuenho / emacs-pet

Tracks down the correct Python tooling executables from your virtualenvs so you can glue the binaries to Emacs and delete code in init.el
GNU General Public License v3.0
105 stars 13 forks source link

fix an issue with non-file visiting buffers #40

Closed abougouffa closed 1 month ago

abougouffa commented 1 month ago

Hello and thank you for this package.

This MR is a quick fix for an issue I'm facing with pet-mode.

In some cases, there we can have temporary/special buffers with python-mode that doesn't visit a file (buffer-file-name is nil). In these cases, the current pet-mode gets called and cause an error.

This has been observed in mmm-mode when python-mode is used as a sub-mode, although, it can happen in other situations.

abougouffa commented 1 month ago

Closed because I was using a slightly old revision of pet-mode