GNU bug report logs - #51140
28.0.50; cl-letf appears not to work with native-comp (at least for process-exit-status and other builtins)

Previous Next

Package: emacs;

Reported by: Robert Irelan <rirelan <at> gmail.com>

Date: Mon, 11 Oct 2021 22:38:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 51140 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Robert Irelan <rirelan <at> gmail.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 51140 <at> debbugs.gnu.org,
 Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#51140: 28.0.50; cl-letf appears not to work with native-comp
 (at least for process-exit-status and other builtins)
Date: Mon, 18 Oct 2021 22:31:32 -0700
Robert Irelan <rirelan <at> gmail.com> writes:

>     (defun +ivy--always-return-zero-exit-code-a (fn &rest args)
>       (let ((process-exit-status-orig
>              (symbol-function 'process-exit-status)))
>         (cl-letf* (((symbol-function 'process-exit-status)
>                     (lambda (_proc)
>                       (let ((code (funcall process-exit-status-orig _proc)))
>                         (if (= code 2) 0 code)))))
>           (apply fn args)))
>     (advice-add #'counsel-rg :around #'+ivy--always-return-zero-exit-code-a)

Thanks, copying in Andrea here.

> On Tue, Oct 12, 2021 at 3:35 PM Stefan Kangas <stefan <at> marxist.se> wrote:
>
>  Robert Irelan <rirelan <at> gmail.com> writes:
>
>  > Ah, I see what you mean. I get the same error when I fix the free
>  > variables in the lambda.
>
>  Could you provide a fixed recipe for this bug?




This bug report was last modified 2 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.