reddit / emacs

FYI for any magit users tracking Emacs 29. Magit currently broken.

nv-elisp · 2022-04-28 03:42
nnreddit-user · 2022-04-28 05:31
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index b3778c07bc..b20415a2d3 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -71,7 +71,7 @@ advice--how-alist (advice--make-how-alist (:around (apply car cdr r)) (:before (apply car r) (apply cdr r)) - (:after (apply cdr r) (apply car r)) + (:after (prog1 (apply cdr r) (apply car r))) (:override (apply car r)) (:after-until (or (apply cdr r) (apply car r))) (:after-while (and (apply cdr r) (apply car r))) -- 2.35.1
[deleted] · 2022-04-28 09:09
[deleted]
a-c-d-w · 2022-04-28 11:07
What does this have to do with Magit? These are all from the Emacs git repo.
jimm · 2022-04-28 11:55
It affects Magit and everything else that uses function advice. The code change means that the return value of advised+after is not that of the advised function, but rather that of the after function. Apparently, this matches the documented behavior and the old code was incorrectly returning the original advused functions return value. I bet that's going to mess up a lot more than just Magit.
paretoOptimalDev · 2022-04-28 13:07
Not sure if cuz of this, but org-babel-tangle-file is broken too because of the file modification time or something. I have to delete the tangled file so the file modification time comparison doesn't happen.
xircon · 2022-04-28 13:28
Something is badly broken, I had to downgrade to 3 versions ago (I use emacs-git from ArchLinuxCN). Was going to post about it tonight, the error message I was getting was arcane to say the least :smile:
MmmCurry · 2022-04-28 15:05
[Fixed on master](https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=799c7e277fc6a37bd8b86fea7494ff6df63f3eb1). If you're affected, try updating to 799c7e277 or later.
a-c-d-w · 2022-04-28 20:44
oh damn, that's huge. i originally opened this post because i was having an issue with pushing using magit, though now i'm thinking about it that might be another issue. ... hm. i'll test more, but thanks! EDIT: well after testing (defun foo () 'foo) (defun bar () 'bar) (advice-add 'foo :after 'bar) `(foo)` returns `foo` and `(bar)` returns `bar`, so from my reading this *could* be the cause of my bug. And of course, *now* the bug refuses to do anything at all. Great. Anyway, thanks for the info!
MmmCurry · 2022-04-29 02:47
The nadvice bug broke `magit-commit` 100% of the time (it could never successfully pop up the commit message editor window), so if you were able to do that you weren't affected. > (foo) returns foo and (bar) returns bar This is the correct behavior from unaffected versions, before the bug was introduced and after it was corrected.
a-c-d-w · 2022-04-30 12:59
Ahh, okay. So my bug was *definitely* something else then. Thanks for your patience and explanation!