Closed nchachereau closed 3 years ago
Hello and thank you for the heads up, @nchachereau!
I think you're right but I will have to investigate it some more since there seems to be some weirdness going on with when-let
. It does compile without subr-x
on 27.2, puzzlingly.
Looking into it, the difference seems rather simple. My copy of subr-x
does not have autoload cookies for when-let
and if-let
, unlike in current Emacs source - current, but since, according to blame, that change was introduced two years ago, I guess it is a part of Emacs 27.
I am no elisp expert, but I guess you might just as well require subr-x
. This would bring support to Emacs 26 and make no difference for users of later versions, since it is going to get loaded anyway due to the autoload cookies. Unless I am mistaken of course.
(Regarding the weirdness you link to, it seems to be a red herring: according to the creator of straight.el on Reddit, "if-let is not obsolete. It was previously planned to be made obsolete between Emacs 25 and Emacs 26, but then the developers changed their mind.").
P.S. I plan upgrading my Emacs soon-ish… I might never have noticed this problem :stuck_out_tongue_closed_eyes:.
P.P.S. What intrigues me a bit is that in my tests it seemed to work when I used org-appear without compiling it. Maybe some other part of my config loads subr-x
, while it wasn't loaded when straight "built" it. I would need to create a minimal test with emacs -Q
, but I am not sure it's worth it.
Well, you've pretty much done my investigation for me :) Thanks for taking the time!
I added an explicit require for subr-x
in 4015980f2c587d61def9e14372b86b1eb053ec2e.
P.S.
Maybe some other part of my config loads
subr-x
, while it wasn't loaded when straight "built" it
This is almost certainly the case.
Well, you've pretty much done my investigation for me :) Thanks for taking the time!
Just a small way of giving back! Just pulled the last commits and tested, works as expected. Thanks!
Hello,
Just installed using straight, and when trying it out I got errors such as
Error in post-command-hook (org-appear--post-cmd): (invalid-function (elem (org-element-context)))
.It seems that the issue are the
when-let
macros that were not correctly understood when org-appear.el got compiled to an .elc file by straight when it "built" the package.Adding
(require 'subr-x)
to the file seems to fix the issue for me. (I'm still on GNU Emacs 26.3, in case that makes any difference.)Thank you for this package, looking forward to using it, now that it works :+1: