DarwinAwardWinner / ido-completing-read-plus

Fancy completion all over Emacs, not just for buffers and files.
GNU General Public License v3.0
241 stars 31 forks source link

Cons INITIAL-INPUT no longer working in Emacs 27 #169

Closed phst closed 4 years ago

phst commented 4 years ago

Minimal reproduction:

emacs -Q -l ./ido-completing-read+.el -eval '(ido-completing-read+ "Prompt: " (quote ("blue" "yellow" "green")) nil nil (cons "gr" 2))'

With Emacs 26 this prompts as expected, with Emacs 27 it prints an error "end of buffer."

phst commented 4 years ago

So I guess the issue is just the version comparison in https://github.com/DarwinAwardWinner/ido-completing-read-plus/blob/master/ido-completing-read%2B.el#L712, which breaks with the pretest.

DarwinAwardWinner commented 4 years ago

I see that your test case is copied from the test suite. Does the same test fail when running the rest suite?

DarwinAwardWinner commented 4 years ago

Also, can you tell me exactly what emacs-version is on the offending Emacs? I'm actually not super familiar with the pre-release version numbering scheme that Emacs uses.

phst commented 4 years ago

I see that your test case is copied from the test suite. Does the same test fail when running the rest suite?

Yes, that's how I got it.

I've already sent a PR to fix the version comparison. emacs-version of the pretest is 27.0.90, i.e., before 27.1.

DarwinAwardWinner commented 4 years ago

Ok, I'm getting on a plane now but I'll check into this when I can. I just need to double check why I chose that specific version threshold before changing it.

phst commented 4 years ago

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27807#18 said explicitly it would be 27.1. However, it's already fixed in 27.0.90 (the pretest). That makes sense given that the pretest will become 27.1 if there are no bugs. Of course there's the question how much unreleased versions such as pretests should be supported at all. However, this change adds support for the pretest, and doesn't change the behavior w.r.t. to the released version.

DarwinAwardWinner commented 4 years ago

Ideally, it would be nice to find some way to test this at load time to figure out whether the bug is present. I might take a stab at that soon, but in the meantime, I guess I'll just merge the fixed version check.