Skip to content

Fix compatibility with polymode after pm--visible-buffer-name removal #925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

natsirtguy
Copy link
Contributor

Summary

This PR fixes compatibility with recent polymode changes that removed the pm--visible-buffer-name function in commit 32d0d6d.

Problem

The pm--visible-buffer-name function was removed from polymode and replaced with pm--buffer-name. This caused ein to fail when loading poly-ein.el with an "undefined function" error.

Solution

Replace all instances of pm--visible-buffer-name with pm--buffer-name() in poly-ein.el.

The pm--buffer-name function:

  • When called without arguments: pm--buffer-name() - returns the visible buffer name (equivalent to old pm--visible-buffer-name)
  • When called with 'hidden: pm--buffer-name('hidden) - returns the hidden buffer name (equivalent to old pm--hidden-buffer-name)

Changes

  • Updated poly-ein--record-window-buffer function
  • Updated ido-make-buffer-list-hook lambda function
  • Updated function documentation strings

Testing

  • Code compiles without errors using make test-compile
  • Tested functionality in Emacs with Jupyter notebooks
  • Buffer switching between polymode buffers works correctly

Compatibility

This change maintains backward compatibility while fixing the issue with polymode >= commit 32d0d6d.

Fixes compatibility with polymode commit: polymode/polymode@32d0d6d

Replace pm--visible-buffer-name with pm--buffer-name to maintain
compatibility with polymode commit 32d0d6d which removed the
pm--visible-buffer-name function and replaced it with pm--buffer-name.

The pm--buffer-name function takes an optional 'hidden parameter:
- pm--buffer-name() returns the visible buffer name (equivalent to old pm--visible-buffer-name)
- pm--buffer-name('hidden) returns the hidden buffer name (equivalent to old pm--hidden-buffer-name)

This change fixes the issue where ein would fail to load due to the
undefined pm--visible-buffer-name function.

Fixes compatibility with polymode >= commit 32d0d6d.
### Notes

- Update actions/checkout from v2 to v4
- Update actions/setup-python from v2 to v4
- Update actions/cache from v2 to v4 (both instances)

### Testing

This addresses the workflow failure caused by deprecated action versions.
The updated actions are the current stable releases and should resolve
the CI pipeline issues.

### Issues
* Fixes GitHub Actions deprecation warnings in CI workflow
### Notes

- Change python-version from 3.7 to 3.8 in test matrix
- Python 3.7 reached end-of-life and is no longer available on Ubuntu 24.04
- Python 3.8 is widely supported and compatible with the project requirements

### Testing

This addresses the CI failure where Python 3.7 was not found in the local cache
for Ubuntu 24.04. Python 3.8 should be available and allow the workflow to proceed.

### Issues
* Fixes Python version availability issue in GitHub Actions workflow
### Notes

- Remove emacs_version 26.3 from test matrix
- Keep testing on 27.2, 28.2, and 29.1
- Dependencies now require Emacs 27.1+ (magit and others have updated minimum requirements)

### Testing

This addresses the CI failure where packages required Emacs 27.1 but the workflow
was testing on 26.3. The remaining Emacs versions should be compatible with
current package dependencies.

### Issues
* Fixes Emacs version compatibility issue in GitHub Actions workflow
@bjodah
Copy link

bjodah commented Jun 22, 2025

I've tried these proposed changes and can confirm that it resolves the error with the missing function pm--visible-buffer-name.

As an aside, I ran make dist based on this branch to create my own tarball. But in order to make that build pass with emacs 30.1 I had to apply some other changes too. @natsirtguy I don't know if those additions look relevant to you (perhaps not in this PR), but if you are curious you can see those here:
https://github.com/natsirtguy/emacs-ipython-notebook/compare/fix-polymode-compatibility...bjodah:emacs-ipython-notebook:fix-polymode-compatibility?expand=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants