lifelike / decide-mode

Random decisions for emacs, with functions and a minor mode. Roll various types of dice etc.
49 stars 12 forks source link

Can't load table files in Doom Emacs 28.1 #14

Closed seylerius closed 1 week ago

seylerius commented 2 years ago

I'm getting the error Symbol's function definition is void: remove-if-not when I try to load a table file, and the same for remove-if when I try to use one. Switching to the cl- versions of those functions fixes it.

lifelike commented 2 years ago

OK. Do you think the cl-versions will work elsewhere or break some other versions? I am not familiar enough with elisp to know what the implications would be, but since cl-lib is already required and some cl-functions are used I guess it would not be likely to make anything worse?

luqtas commented 1 year ago

running a vanilla 28.2 in Debian 12 & adding the prefix 'cl-' at remove-if-not & remove-if worked for me too!

davemq commented 2 weeks ago

Also broken running 30.0.91 on Fedora 40. I added

(require 'cl-lib)
(defalias 'remove-if-not 'cl-remove-if-not)
(defalias 'remove-if 'cl-remove-if)

to my init.el, restarted Emacs, and then M-x decide-table-load-file worked fine.

lifelike commented 2 weeks ago

Unfortunately I have not seen this in any of the versions of Emacs I use, and I am not familiar enough with elisp or cl-lib to know what the best solution would be. Would happily accept some kind of fix for this. Would it be better to avoid cl-lib?

davemq commented 1 week ago

The problem is cl-lib deprecating and renaming functions. I can see a few solutions:

I don't know which of these is "best." I've dealt with a number of these cl-lib problems over a few years.

I'm willing to create a pull request to fix the parts that broke for me. I don't know if that will cover all of the cl-lib problems.