From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 4302bc9b0f1: Allow --debug-init to debug all errors in init files Date: Mon, 26 Jun 2023 17:48:12 +0300 Message-ID: <83v8fawa8j.fsf@gnu.org> References: <168735410313.21082.15347717294570895563@vcs2.savannah.gnu.org> <20230621132823.6C945C06C79@vcs2.savannah.gnu.org> <83bkh2xz1h.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6398"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 26 16:48:49 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qDnWK-0001Uk-OD for ged-emacs-devel@m.gmane-mx.org; Mon, 26 Jun 2023 16:48:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDnVT-000348-FP; Mon, 26 Jun 2023 10:47:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDnVQ-00033b-QJ for emacs-devel@gnu.org; Mon, 26 Jun 2023 10:47:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDnVP-0000iP-NO; Mon, 26 Jun 2023 10:47:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VABgd1eeBA+kroHBtLEuIItJNLiJzjglI90RfDASL/s=; b=BIi0oTk//7AW icVDg1Y2tHxBMkmvn2sjnb6OHYo3Yld5gyTOMoGMIqF5iTl7RPv6Z0BCj1PTv3pwXfKP2n9jQwCsK LxhbLb4x/VJheCwn25msB8lD29z39LgEgxX4sc/NrRC+akTs6MTsrFWjZdnZphCna8W8Sp0h2csgB ub1EZDbpy4kp4WfIqdj2zny2Q4Y5506JMN+H8pjoBsjmnRhtj+43AFRsnOhTm84LTg6CDphYbllFm 1L3iySUfKP9/BoZraPAWeWLzqKZReY+mAjqq7lrcKlQ0RF4NqGZVAeLBviT/eLBMmMDCCMNCETppl NcsYpaZkORfSt1MUKx3s8A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDnVP-00074W-7x; Mon, 26 Jun 2023 10:47:51 -0400 In-Reply-To: (message from Stefan Monnier on Mon, 26 Jun 2023 09:57:08 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307234 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Mon, 26 Jun 2023 09:57:08 -0400 > > >> Now the changes I make to `debug-ignored-errors` in my `init.el` are > >> thrown away :-( > > > > They are? AFAIU, the code only overrides the value of > > debug-ignored-errors if Emacs was invoked with --debug-init, and > > otherwise honors whatever value you set in your init files. Or what > > am I missing? > > There's a let-binding of `debug-ignored-errors` around the `load`, so > the old value is restored when we finish `load` :-( Feel free to fix that, but please don't rename the variables. > BTW, another difference is that you seem to have that offending code in > 3 places whereas the setting of `debug-on-error` happens only once That's because you explicitly asked this to be in effect only during loading the init files. My original suggestion used just one let-binding.