Received: (at 65763) by debbugs.gnu.org; 10 Sep 2023 17:53:01 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 10 13:53:01 2023 Received: from localhost ([127.0.0.1]:51276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfOcG-0005By-Pp for submit <at> debbugs.gnu.org; Sun, 10 Sep 2023 13:53:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qfOcF-0005Bl-73 for 65763 <at> debbugs.gnu.org; Sun, 10 Sep 2023 13:53:00 -0400 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 <eliz@HIDDEN>) id 1qfOc6-0001AK-8C; Sun, 10 Sep 2023 13:52:50 -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=8h43bEps8fhdMNohZl2LxVgHJFWCNaqxIzQayGqfkB4=; b=Mch65Bt3UNQu bAeWB7VBUFEdeNAQtW45wADlDKLWYNEVDDzUiFiOR7KHFtTDjy6CgaCUh8SNK+Dn2diCj/HzYFgyh guVN8qOhmr93VaB+PQvHBAqLDkGy8CZp4+ZKAEK1dEdhSjMItZSMWcF2Bru39ejBZDizd170+X1OU 7OhN3MIwvQip10fmAuTlZf7ynE1pNEJKQ2Fy36zKWI9Gnlw4zW6WlYnsMX3ng4PmkcxQDZUeDMNYU ubWJmiZ0WpGcY/CyIMeuVHzfa7yYncPholzTrZtzmvAD0Sk6w8x/0xWSmV0Egjk4aeDjhi1v745Q0 hU66hAbERFB63Prhuou/Gw==; Date: Sun, 10 Sep 2023 20:52:27 +0300 Message-Id: <83zg1trk4k.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Paul Pogonyshev <pogonyshev@HIDDEN> In-Reply-To: <CAG7Bpap+XcXwkLoxk1b2tjvGwQkpj+Gxn6trPfSMipkBQRVPMQ@HIDDEN> (message from Paul Pogonyshev on Sun, 10 Sep 2023 19:36:47 +0200) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> <83jzt31ez5.fsf@HIDDEN> <6a42daae-db48-4c81-8121-79515ac94bf9@HIDDEN> <83zg1usfwm.fsf@HIDDEN> <74306db9-aaa8-186e-0e3c-9d5c3935281f@HIDDEN> <837coyrvtb.fsf@HIDDEN> <CAG7Bpap+XcXwkLoxk1b2tjvGwQkpj+Gxn6trPfSMipkBQRVPMQ@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: dmitry@HIDDEN, 65763 <at> debbugs.gnu.org, monnier@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Paul Pogonyshev <pogonyshev@HIDDEN> > Date: Sun, 10 Sep 2023 19:36:47 +0200 > Cc: Dmitry Gutov <dmitry@HIDDEN>, monnier@HIDDEN, 65763 <at> debbugs.gnu.org > > - ((setq backend (with-demoted-errors "VC refresh error: %S" > - (vc-backend buffer-file-name))) > + ((setq backend (let (debug-on-error) > + (with-demoted-errors "VC refresh error: %S" > + (vc-backend buffer-file-name)))) > > From my experience, you should always comment such things. Or add an automated test ensuring it. > Or even better, do both. It is extremely non-obvious why this is needed at all and someone can easily > undo your changes a few years later. Yes, if this (or anything like it) goes in, we will comment it. We just haven't yet decided whether this will be the solution.
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 10 Sep 2023 17:37:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 10 13:37:12 2023 Received: from localhost ([127.0.0.1]:51230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfOMy-0004hY-0U for submit <at> debbugs.gnu.org; Sun, 10 Sep 2023 13:37:12 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:54622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pogonyshev@HIDDEN>) id 1qfOMu-0004hH-RK for 65763 <at> debbugs.gnu.org; Sun, 10 Sep 2023 13:37:11 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2bce552508fso60554921fa.1 for <65763 <at> debbugs.gnu.org>; Sun, 10 Sep 2023 10:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694367419; x=1694972219; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cP23kXM5qhYrZ255a2YCbvaMINOSEbPBoq/w9HbnuSc=; b=qZIHRmAHDPI1B7xpLV3Vm2y1kki9FnwCOVvRFEEfkh9/sWeslaZB8l5fbTSDWd93jr Vn4L/eDT+bTNBtlvN25ftI8rI0idRTKpBH0XimUeoWLBns7OKc8iF7BqgDVLGvA0zuQo nOIb/hQQM4Otrz0BSENlnxbOekYn7tQsrvBRWkFL9DZDHzkBwWq4D9a5P70dKePciCZn 80vQ+FECGDh8IWW/nspRb+PaeC3iy5WDCB5FqXNLUt8lKo8x4QQYhBFuau70YpMT4909 q5jrEA+LUW+2FBCW40GR8xGrhHfD0dN8Qz1+FwsqitDHQWu78U8VHbyJcgO3tD6s/E2E vhOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694367419; x=1694972219; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cP23kXM5qhYrZ255a2YCbvaMINOSEbPBoq/w9HbnuSc=; b=oRm/Qp5XFjh8sGsbBtQEkASGT6viNVDyEl9lAmPuT7uJ2n5yc6cgSs/lBa9oMjst1+ gnwMb1BJPhSzYnYt1/2p32VGTGkCTbRnA55SxLVadVgNt8/+PfuQ9J4IbAVnyozKMWhe 1wdzNGs8I0Wk9n8WaSnD2c9svDlAWnztoTN83C5MKqYZY7+QYbVkE+tZEPtUDr11t3mu 3PcHawO1uflAbdln1ohu00z1ozZc+GbDZufANC/UeuaDMVVgkrtcaglMsSHgZ8SgK1g5 r8+3ZTfbKN0BJmKiRwDBGm/Q+NuPe3i8Ud8CBluKQCGyjP0w9lUPBsIDtyCUNn2O/DfV s9vQ== X-Gm-Message-State: AOJu0YwZou/XThKCa/4bY3zCJsfppatger9D3ysIg0nCgFo/i23hOEwB 1Mo6RdUKKWv4OKd2L3C+FTWlFOeAa41Vf1NgkG8sDPPUUw== X-Google-Smtp-Source: AGHT+IFMCyOu0v16si9EBA2T+u4PF7722qXHWobQJjYaKzYjRo/in8zoY1349xBXA3EEqdiHx89LHiATu7kCWqYsevc= X-Received: by 2002:a2e:88d4:0:b0:2bc:cee6:4342 with SMTP id a20-20020a2e88d4000000b002bccee64342mr5892861ljk.13.1694367418955; Sun, 10 Sep 2023 10:36:58 -0700 (PDT) MIME-Version: 1.0 References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> <83jzt31ez5.fsf@HIDDEN> <6a42daae-db48-4c81-8121-79515ac94bf9@HIDDEN> <83zg1usfwm.fsf@HIDDEN> <74306db9-aaa8-186e-0e3c-9d5c3935281f@HIDDEN> <837coyrvtb.fsf@HIDDEN> In-Reply-To: <837coyrvtb.fsf@HIDDEN> From: Paul Pogonyshev <pogonyshev@HIDDEN> Date: Sun, 10 Sep 2023 19:36:47 +0200 Message-ID: <CAG7Bpap+XcXwkLoxk1b2tjvGwQkpj+Gxn6trPfSMipkBQRVPMQ@HIDDEN> Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed To: Eli Zaretskii <eliz@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000203cab060504a8a3" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65763 Cc: Dmitry Gutov <dmitry@HIDDEN>, 65763 <at> debbugs.gnu.org, monnier@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000203cab060504a8a3 Content-Type: text/plain; charset="UTF-8" - ((setq backend (with-demoted-errors "VC refresh error: %S" - (vc-backend buffer-file-name))) + ((setq backend (let (debug-on-error) + (with-demoted-errors "VC refresh error: %S" + (vc-backend buffer-file-name)))) From my experience, you should always comment such things. Or add an automated test ensuring it. Or even better, do both. It is extremely non-obvious why this is needed at all and someone can easily undo your changes a few years later. Paul On Sun, 10 Sept 2023 at 15:40, Eli Zaretskii <eliz@HIDDEN> wrote: > > Date: Sun, 10 Sep 2023 16:21:00 +0300 > > Cc: pogonyshev@HIDDEN, 65763 <at> debbugs.gnu.org > > From: Dmitry Gutov <dmitry@HIDDEN> > > > > On 10/09/2023 09:26, Eli Zaretskii wrote: > > > diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el > > > index a4de0a6..0715236 100644 > > > --- a/lisp/vc/vc-hooks.el > > > +++ b/lisp/vc/vc-hooks.el > > > @@ -799,7 +799,7 @@ vc-refresh-state > > > (add-hook 'vc-mode-line-hook #'vc-mode-line nil t) > > > (let (backend) > > > (cond > > > - ((setq backend (with-demoted-errors "VC refresh error: %S" > > > + ((setq backend (ignore-errors > > > (vc-backend buffer-file-name))) > > > ;; Let the backend setup any buffer-local things he needs. > > > (vc-call-backend backend 'find-file-hook) > > > > This seems to work better: > > That'd be fine by me, but I'd still want to understand why > ignore-errors didn't work. > > Thanks. > --000000000000203cab060504a8a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><span class=3D"gmail-im" style=3D"color:rgb(80,0,80)">-=C2= =A0 =C2=A0 =C2=A0 =C2=A0((setq backend (with-demoted-errors "VC refres= h error: %S"<br></span>-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (vc-backend buffer-file-name)))<br>+= =C2=A0 =C2=A0 =C2=A0 =C2=A0((setq backend (let (debug-on-error)<br>+=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (with-demoted-errors "VC refresh error: %S"<div>+=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (vc-backend buffer-file-name))))<span class=3D"gmail-im" style=3D"co= lor:rgb(80,0,80)"><br></span><div><br></div><div>From my experience, you sh= ould always comment such things. Or add an automated test ensuring it. Or e= ven better, do both. It is extremely non-obvious why this is needed at all = and someone can easily undo your changes a few years later.</div><div><br><= /div><div>Paul</div></div></div><br><div class=3D"gmail_quote"><div dir=3D"= ltr" class=3D"gmail_attr">On Sun, 10 Sept 2023 at 15:40, Eli Zaretskii <= <a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>> wrote:<br></div><block= quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1= px solid rgb(204,204,204);padding-left:1ex">> Date: Sun, 10 Sep 2023 16:= 21:00 +0300<br> > Cc: <a href=3D"mailto:pogonyshev@HIDDEN" target=3D"_blank">pogonysh= ev@HIDDEN</a>, <a href=3D"mailto:65763 <at> debbugs.gnu.org" target=3D"_blank= ">65763 <at> debbugs.gnu.org</a><br> > From: Dmitry Gutov <<a href=3D"mailto:dmitry@HIDDEN" target=3D"_= blank">dmitry@HIDDEN</a>><br> > <br> > On 10/09/2023 09:26, Eli Zaretskii wrote:<br> > > diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el<br> > > index a4de0a6..0715236 100644<br> > > --- a/lisp/vc/vc-hooks.el<br> > > +++ b/lisp/vc/vc-hooks.el<br> > > @@ -799,7 +799,7 @@ vc-refresh-state<br> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0(add-hook 'vc-mode-line-hook #'= vc-mode-line nil t)<br> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0(let (backend)<br> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cond<br> > > -=C2=A0 =C2=A0 =C2=A0 =C2=A0((setq backend (with-demoted-errors &= quot;VC refresh error: %S"<br> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0((setq backend (ignore-errors<br> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(vc-backend buffer-file-name)))<br> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Let the backend setup = any buffer-local things he needs.<br> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(vc-call-backend backend = 'find-file-hook)<br> > <br> > This seems to work better:<br> <br> That'd be fine by me, but I'd still want to understand why<br> ignore-errors didn't work.<br> <br> Thanks.<br> </blockquote></div> --000000000000203cab060504a8a3--
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 10 Sep 2023 13:40:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 10 09:40:33 2023 Received: from localhost ([127.0.0.1]:49274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfKfx-00076D-6k for submit <at> debbugs.gnu.org; Sun, 10 Sep 2023 09:40:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qfKfv-00075z-EE for 65763 <at> debbugs.gnu.org; Sun, 10 Sep 2023 09:40:32 -0400 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 <eliz@HIDDEN>) id 1qfKfk-0000tD-Ih; Sun, 10 Sep 2023 09:40:21 -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=rBW02yZ3U5geBMz41DyeHQLPNkdJ00h8RHc9S69y/AA=; b=SGM+eEbI1R4m BfVZkEWp3ljuPhIO+h5XysFBNnuqF37wK97EIH6KY2XAjuhAdxJnNfzSpDSC6nvKY25UA8+52zhY6 5vfCMRqt7F0NuGiWwD7nK/3pAFWTx519Y1uAUPdRW7M4pdQtJ03rS4tZ7K9BsWAI0f+d1wYTREHd6 WU8DBm4wyJ6BN1OIhDYTs4Pb/lISlDwkPiMrjYFOKXEY4eoPtkCYUJy3tLUF1iC9VEfh5Nwpxyie/ CcXWmN8uogSTtwfjFPEn9grO1yUK4csa5nC4ARD+HSt8Wux2g3mmmzn4XFou+klrn/eb9QlkeXxzR DAgSWtVRg2Yk+BAKWQ9Dlw==; Date: Sun, 10 Sep 2023 16:40:00 +0300 Message-Id: <837coyrvtb.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <74306db9-aaa8-186e-0e3c-9d5c3935281f@HIDDEN> (message from Dmitry Gutov on Sun, 10 Sep 2023 16:21:00 +0300) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> <83jzt31ez5.fsf@HIDDEN> <6a42daae-db48-4c81-8121-79515ac94bf9@HIDDEN> <83zg1usfwm.fsf@HIDDEN> <74306db9-aaa8-186e-0e3c-9d5c3935281f@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org, monnier@HIDDEN, pogonyshev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Sun, 10 Sep 2023 16:21:00 +0300 > Cc: pogonyshev@HIDDEN, 65763 <at> debbugs.gnu.org > From: Dmitry Gutov <dmitry@HIDDEN> > > On 10/09/2023 09:26, Eli Zaretskii wrote: > > diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el > > index a4de0a6..0715236 100644 > > --- a/lisp/vc/vc-hooks.el > > +++ b/lisp/vc/vc-hooks.el > > @@ -799,7 +799,7 @@ vc-refresh-state > > (add-hook 'vc-mode-line-hook #'vc-mode-line nil t) > > (let (backend) > > (cond > > - ((setq backend (with-demoted-errors "VC refresh error: %S" > > + ((setq backend (ignore-errors > > (vc-backend buffer-file-name))) > > ;; Let the backend setup any buffer-local things he needs. > > (vc-call-backend backend 'find-file-hook) > > This seems to work better: That'd be fine by me, but I'd still want to understand why ignore-errors didn't work. Thanks.
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 10 Sep 2023 13:21:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 10 09:21:17 2023 Received: from localhost ([127.0.0.1]:49236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfKNI-0006fD-To for submit <at> debbugs.gnu.org; Sun, 10 Sep 2023 09:21:17 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:37315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1qfKNF-0006ey-4o for 65763 <at> debbugs.gnu.org; Sun, 10 Sep 2023 09:21:16 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 873985C006D; Sun, 10 Sep 2023 09:21:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 10 Sep 2023 09:21:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694352064; x=1694438464; bh=kuqKShl/QGHWQd4f6wUj8A1x1gc3eNlEGL6 Flz1+Dpw=; b=O5KEQZqfPjB5otdZgPk2iA/a+O7EPqz/yJTEHkNmGN1WVoWqVBG bOgzvYmZD28l4x8Hwh3Ok3h3IyEh271IScHLFdSYTNDKt2bCuIPV3YOVb5T/ZAcV eInXjL9+3yZqdr/4nsaRfe/8Qir5XvvSjqf9ZGB2YhYN1gXn5Ahzq+hW9QjB7Tlm k96OgWYzE0rPU51/FXcuR+2dwGkWxiHdgc/9GSFQ/rRVCiw9v89OL60SFs4xghBI YAuHTQ75cJnt1jv1D6nqU8UY/sG46jCAtOlstwnhpbw7vkpGkvcndKAyLZ6t3Z5G /XM1P/+T+sqsCf93X0OsD1nJG3jscpYXJ4w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694352064; x=1694438464; bh=kuqKShl/QGHWQd4f6wUj8A1x1gc3eNlEGL6 Flz1+Dpw=; b=To3oN1S8H4lJKhSb+ehTIg6upG5Io9M43sqzAx/bSbeQU8H6jJR qmgLXAzRgPfgTj8K9yy0lv2x87pKvQ6cgtyhDu6ZfGbomQeSKUVnZskJfEFuNk9l WSh8cSLM8HOX/ICL1fHQK0+escal1p3HSOn4eq+iSyZuxk1y6WTtunSp2Mv/sxi4 d7djvFhe2fjkPz3bpLWzU42tFvjImfdls5tXtSnj3Pkk34zCIccegrjq+fuGb8R9 wZErZ4lvUgiAcDncJJsJ1bfEyVGHYHAAcCX0nl6etzk22W+T+W8B13TsbAzRhny9 P6/CdWDszrtz8lhhTUbGOwPUUvhmzA+gmiA== X-ME-Sender: <xms:v8L9ZOQvk10C3NLTn9JTgfz0cq-6dIZC23iK4wBuldg2fdOoVlO0lQ> <xme:v8L9ZDxY2DpXdtPtYP0TC7q4U0LC2JUcAhNj5O1oOsoDfLC6brSiPk57EKvcKN1LS ejQth9ayK_JcJPwZuk> X-ME-Received: <xmr:v8L9ZL3RE8Q0CwecvSMSuchjn7mZh3wy90WlSRHOJysCnBhxJEzOV0dtGFTGB40> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeivddgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: <xmx:wML9ZKCH_89trbZECShSqjJVTogF6nPX1Z8opAc4Xth-i_bcmW56Hg> <xmx:wML9ZHhDaieX2-Je-gOY6JU5k2SJ_4J6a9IItafXdJDzo5jF9ohTPw> <xmx:wML9ZGomYwT1uswbXONcr7ww4JfnrUivUgWpI0MvqKg57qfFmrZB5g> <xmx:wML9ZKtHvRnpUuXhwBl7SlZ36kDy-WjNu2L9y9mA6zvdJl5xHK97AQ> Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 10 Sep 2023 09:21:02 -0400 (EDT) Message-ID: <74306db9-aaa8-186e-0e3c-9d5c3935281f@HIDDEN> Date: Sun, 10 Sep 2023 16:21:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed Content-Language: en-US To: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN> References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> <83jzt31ez5.fsf@HIDDEN> <6a42daae-db48-4c81-8121-79515ac94bf9@HIDDEN> <83zg1usfwm.fsf@HIDDEN> From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <83zg1usfwm.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org, pogonyshev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.2 (---) On 10/09/2023 09:26, Eli Zaretskii wrote: > diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el > index a4de0a6..0715236 100644 > --- a/lisp/vc/vc-hooks.el > +++ b/lisp/vc/vc-hooks.el > @@ -799,7 +799,7 @@ vc-refresh-state > (add-hook 'vc-mode-line-hook #'vc-mode-line nil t) > (let (backend) > (cond > - ((setq backend (with-demoted-errors "VC refresh error: %S" > + ((setq backend (ignore-errors > (vc-backend buffer-file-name))) > ;; Let the backend setup any buffer-local things he needs. > (vc-call-backend backend 'find-file-hook) This seems to work better: diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index a4de0a6e791..53271d9d3c2 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -799,8 +799,9 @@ vc-refresh-state (add-hook 'vc-mode-line-hook #'vc-mode-line nil t) (let (backend) (cond - ((setq backend (with-demoted-errors "VC refresh error: %S" - (vc-backend buffer-file-name))) + ((setq backend (let (debug-on-error) + (with-demoted-errors "VC refresh error: %S" + (vc-backend buffer-file-name)))) ;; Let the backend setup any buffer-local things he needs. (vc-call-backend backend 'find-file-hook) ;; Compute the state and put it in the mode line.
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 10 Sep 2023 06:26:32 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 10 02:26:32 2023 Received: from localhost ([127.0.0.1]:48842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfDtv-0002LT-RL for submit <at> debbugs.gnu.org; Sun, 10 Sep 2023 02:26:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qfDtr-0002LF-Lh for 65763 <at> debbugs.gnu.org; Sun, 10 Sep 2023 02:26:29 -0400 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 <eliz@HIDDEN>) id 1qfDti-00044n-Ry; Sun, 10 Sep 2023 02:26:18 -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=hnsykYnf/KW99dSpApNIuY3e0wAhyI4KDGhrl0CsfY4=; b=S7phvedHt7G8 +ZIDsD3oFpCIfarEEm5a5SwVEqK04xRHWlaLNrDP2XERWfckHxbLQ3qURdFAdTGo3+SFX6p1gzxM8 JxXw+gVrR25nF1+x+ZpSBy7fTj8KrP6VQ0JFu80ERj/FW+A7ZJ2M9vruFgRxsTm7EAagpmIz5FYCj 7vvc9iAyMjxS9ifnb976KXT9kQt6Qm5nBhSiDTXotoG7COPwl6KHaOT0jtGaEkBZJnuXlQVYMCKa5 PQWAOR5GRJqA5J0t3pBi+4UgSJBxegrArNsJ6cA+5292x9F0Zev+LacsFP0j4UwGbNTYZa89Jsyfr Wx0UQfzkImpt4AdRcSGsSQ==; Date: Sun, 10 Sep 2023 09:26:01 +0300 Message-Id: <83zg1usfwm.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN>, Stefan Monnier <monnier@HIDDEN> In-Reply-To: <6a42daae-db48-4c81-8121-79515ac94bf9@HIDDEN> (message from Dmitry Gutov on Wed, 6 Sep 2023 18:59:00 +0300) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> <83jzt31ez5.fsf@HIDDEN> <6a42daae-db48-4c81-8121-79515ac94bf9@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org, pogonyshev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Wed, 6 Sep 2023 18:59:00 +0300 > Cc: pogonyshev@HIDDEN, 65763 <at> debbugs.gnu.org > From: Dmitry Gutov <dmitry@HIDDEN> > > On 06/09/2023 18:46, Eli Zaretskii wrote: > > I prefer to emit the messages, just make them more user-friendly > > ("searching for program" "no such file or directory" is not very > > friendly, IMO), and suppress the error signaling even when > > debug-on-error is non-nil. The reason is simple: we are talking only > > about Git not being installed or accessible here, but the problems > > could be different and more obscure: Git could be present but > > inoperable for some weird misconfiguration reason, or some other > > problem could happen. So "if it is not installed, just silently don't > > do anything" is not a complete solution, and the "silently" part loses > > information which users may wish to have presented to them. > > That also sounds good to me. There's something strange going on here: even if I wrap the call to vc-backend with ignore-errors (see the patch below), I still see the error message, and running with debug-on-error enters the debugger: ./emacs --batch --eval "(let ((debug-on-error t)) (setf vc-git-program \"git-is-not-installed\") (find-file-noselect \"README\"))" Debugger entered--Lisp error: (file-missing "Searching for program" "No such file or directory" "git-is-not-installed") call-process("git-is-not-installed" nil (t nil) nil "--no-pager" "ls-files" "-c" "-z" "--" "src/README") apply(call-process "git-is-not-installed" nil (t nil) nil ("--no-pager" "ls-files" "-c" "-z" "--" "src/README")) process-file("git-is-not-installed" nil (t nil) nil "--no-pager" "ls-files" "-c" "-z" "--" "src/README") apply(process-file "git-is-not-installed" nil (t nil) nil "--no-pager" "ls-files" ("-c" "-z" "--" "src/README")) vc-git--call((t nil) "ls-files" "-c" "-z" "--" "src/README") apply(vc-git--call (t nil) "ls-files" ("-c" "-z" "--" "src/README")) vc-git--out-ok("ls-files" "-c" "-z" "--" "src/README") vc-git-registered("d:/gnu/git/emacs/trunk/src/README") vc-git-registered("d:/gnu/git/emacs/trunk/src/README") apply(vc-git-registered "d:/gnu/git/emacs/trunk/src/README") vc-call-backend(Git registered "d:/gnu/git/emacs/trunk/src/README") #f(compiled-function (b) #<bytecode 0x1b9bb8e1e734a02c>)(Git) mapc(#f(compiled-function (b) #<bytecode 0x1b9bb8e1e734a02c>) (RCS CVS SVN SCCS SRC Bzr Git Hg)) vc-registered("d:/gnu/git/emacs/trunk/src/README") vc-backend("d:/gnu/git/emacs/trunk/src/README") vc-refresh-state() run-hooks(find-file-hook) after-find-file(nil t) find-file-noselect-1(#<buffer README> "d:/gnu/git/emacs/trunk/src/README" nil nil "d:/gnu/git/emacs/trunk/src/README" (8444249302351936 1817014650)) find-file-noselect("README") (let ((debug-on-error t)) (setf vc-git-program "git-is-not-installed") (find-file-noselect "README")) eval((let ((debug-on-error t)) (setf vc-git-program "git-is-not-installed") (find-file-noselect "README")) t) command-line-1(("--eval" "(let ((debug-on-error t)) (setf vc-git-program \"gi...")) command-line() normal-top-level() It looks like condition-case is not working in this case? Or what am I missing? Stefan, can you help? Here's the patch I installed to try this, and it still produces the backtrace shown above, which clearly tells the error was signaled by subroutines called by vc-backend: diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index a4de0a6..0715236 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -799,7 +799,7 @@ vc-refresh-state (add-hook 'vc-mode-line-hook #'vc-mode-line nil t) (let (backend) (cond - ((setq backend (with-demoted-errors "VC refresh error: %S" + ((setq backend (ignore-errors (vc-backend buffer-file-name))) ;; Let the backend setup any buffer-local things he needs. (vc-call-backend backend 'find-file-hook)
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 15:59:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 11:59:17 2023 Received: from localhost ([127.0.0.1]:37194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qduw1-0005sS-0D for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 11:59:17 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:56323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1qduvv-0005sB-5h for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 11:59:14 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DA77E5C01A4; Wed, 6 Sep 2023 11:59:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 06 Sep 2023 11:59:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694015944; x=1694102344; bh=AEXLFU1dRcmoswiIJBzaUGmMjgxTT5jK5ky KtOgqX5A=; b=rgmg76+hXxGUwYIzXvyefKTaGfUzm4h+SZWIoA8fR5QAmeQFaMQ l1nW6EpTGD43v8uEOoe7mNm/dtomVEgHllN3FSMOql+x2Kj/TldL5N1Iz5CvCOX6 7yzvCHlarDdAocZED7CEUV/2RL26MbkrHouKHqcMuOaMs5Xkm+zGYOGlDtA2Gqw/ Y9XQahjxBUwHrt3KY4xGQjPdJ3kTdhOdc/Hwis516I7ZI8zvOl8dvgwGBt7YKwy2 c9yOghtZW3qNBnScaY5VGpVciDm++IH5T6FpdG1kh+OZyWuU7Xkp2VdE/xN3jpGQ HNXQ4N595F/12j9UgAmtw/g3ACbKJmXFVQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694015944; x=1694102344; bh=AEXLFU1dRcmoswiIJBzaUGmMjgxTT5jK5ky KtOgqX5A=; b=Ls7xSFT1GPQSmHo8F8MB74dOu1DbAO3qI9vARDbAoGgcDnbxXld Cti5dbRY27ozZ71qzDmM0oXDzNeKnjfoVfh1uZ8fXslmD/942jsZnZLwGPLiFmaB LvnvRoKBntild83uLWRg/JGwePJ3LS9L01hz7ZgCDFEbcTiAl+hph2vDBYQm6A0o KygQ/OQvnhOMCYB7dTrLl+TzhO/aM8LRg5ABSPc5chz5tBT2OSrPIe45pydBr0ZL I/zvQR9FUyXB7oIenmcfNvIcBbDjsnYd0PB9jeleJtPwHC0Q4Z+0c9vy1OQE5XBd nJZrG0y9D34lGmFWT8bIylv/xICD7YLN4xg== X-ME-Sender: <xms:yKH4ZBeZdldZXm1C8dSErmpG64amY5v2pRhf9smwalEH6LWkimmt2A> <xme:yKH4ZPP0Mybgzr71QtoAiUzuDBeQnhUBM7SyBgGQ75NmFsyss1s_7xCCJ6SpwilsI UJi16j0b7gAgX2eqI4> X-ME-Received: <xmr:yKH4ZKj1lXN0gRIdX6ew2Ew9D2SqI2ee40y41QmeRF1Elzwkf1QBCvUvN4KeJ-U> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehfedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: <xmx:yKH4ZK_0UV1gvQv0OG6Y7sadyagD4W6FkQ-t0qvOkL0bqkG-jvvuNA> <xmx:yKH4ZNssUu0PLl-2vCuS_lixh5TCQLVa1lGeiMmGETrfnZJ65YUOVA> <xmx:yKH4ZJF3FKUmHwbnK716CibGL_T7k6f0JqmRqX2fF9RqHYQbA9Utkw> <xmx:yKH4ZOVGKxjZ0YsVDwqSNDFTU2_o-1poAa-h_tRY6UUFi3rzRasAjw> Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 11:59:02 -0400 (EDT) Message-ID: <6a42daae-db48-4c81-8121-79515ac94bf9@HIDDEN> Date: Wed, 6 Sep 2023 18:59:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed Content-Language: en-US To: Eli Zaretskii <eliz@HIDDEN> References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> <83jzt31ez5.fsf@HIDDEN> From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <83jzt31ez5.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org, pogonyshev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.2 (---) On 06/09/2023 18:46, Eli Zaretskii wrote: > I prefer to emit the messages, just make them more user-friendly > ("searching for program" "no such file or directory" is not very > friendly, IMO), and suppress the error signaling even when > debug-on-error is non-nil. The reason is simple: we are talking only > about Git not being installed or accessible here, but the problems > could be different and more obscure: Git could be present but > inoperable for some weird misconfiguration reason, or some other > problem could happen. So "if it is not installed, just silently don't > do anything" is not a complete solution, and the "silently" part loses > information which users may wish to have presented to them. That also sounds good to me.
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 15:47:18 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 11:47:18 2023 Received: from localhost ([127.0.0.1]:37179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdukP-0005V5-JA for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 11:47:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qdukN-0005Ur-JQ for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 11:47:16 -0400 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 <eliz@HIDDEN>) id 1qdukG-0002nj-Ld; Wed, 06 Sep 2023 11:47:08 -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=kj29AlizXiDtK5gWMa4nf/azIu9IxlQj0wHd9I3XGnU=; b=aXm3hCceAxct eL+JZzDN5JsUufHQLz9qBkPHZ2bPXhpNaoE5b9/rQi+nVWWS3vMEuFg4/keq3Fu7eW/v1kdfA9DV/ CkKb1XUB1dm9gMGLY7CVvgiTpBfTgY64rCMlhSe4kcKwgakBeq2kiRwPj3VsIGfRa/T5NX/xuHhbZ 8Aq/uL45I0Zg+0NO+kAOLBsuN9oQkygNXMP807GBRRGIq4nXnDJfBMai96wcUDKc7ZDNZKWXNVYJq m/0d45IDpbZ0jO5MoZ5wyFwTTb0WurNwhUNHYgqUP5XvrhKIEMzhatV71bA14R7xdSw9NDjgGVSiD UMJDibeLxdxHqF9TXCAfcw==; Date: Wed, 06 Sep 2023 18:46:54 +0300 Message-Id: <83jzt31ez5.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> (message from Dmitry Gutov on Wed, 6 Sep 2023 17:31:05 +0300) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org, pogonyshev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Wed, 6 Sep 2023 17:31:05 +0300 > Cc: Eli Zaretskii <eliz@HIDDEN>, 65763 <at> debbugs.gnu.org > From: Dmitry Gutov <dmitry@HIDDEN> > > On 06/09/2023 16:11, Paul Pogonyshev wrote: > > Also consider this from a user point of view. Let's say I have nothing > > to do with programming at all and don't have Git installed. Someone > > emails me a cool Emacs package as a tarball and accidentally archives > > `.git' along, because he is a developer. I unpack it, open some file and > > now my Emacs warns me that Git is not installed. But why? I didn't even > > ask it to do anything. It /itself/ decided to do something (because it > > saw a `.git' directory), failed (Git is not installed), and now warns > > /me/. From my point of view, if there is a failure for action that > > wasn't direct result of user order, Emacs should stay silent. > > There was a previous discussion on this on the bug tracker which I can't > find now. If someone is more able than me, it would be a welcome help. > > I think Lars was involved, and the general argument was that if .git is > present, the user is plausibly interested in using our VC features and > might not understand which programs might be needed to be installed for > that to work. Or just forget about that aspect e.g. on a new machine. So > we help them with those warnings. > > > In other words, I think there are two sane options here: > > > > 1) Simply check if Git is installed before doing anything Git-related > > from `find-file-hook' callback. If it is not installed, just silently > > don't do anything. Reserve errors and warnings until the user actually > > ask you to do something Git-related, not simply to open a file. > > I don't mind this solution as well, and it has its logic. > > So if others like this approach we could do such change (roughly, we'd > need to capture errors in all 'registered' functions at least, reraise > as vc-backend-program-missing, and then catch them -- and only them -- > silently at the top level). I prefer to emit the messages, just make them more user-friendly ("searching for program" "no such file or directory" is not very friendly, IMO), and suppress the error signaling even when debug-on-error is non-nil. The reason is simple: we are talking only about Git not being installed or accessible here, but the problems could be different and more obscure: Git could be present but inoperable for some weird misconfiguration reason, or some other problem could happen. So "if it is not installed, just silently don't do anything" is not a complete solution, and the "silently" part loses information which users may wish to have presented to them.
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 14:31:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 10:31:19 2023 Received: from localhost ([127.0.0.1]:37116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdtYt-0000n8-0I for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 10:31:19 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1qdtYr-0000mw-4X for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 10:31:18 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id EC15A5C00C1; Wed, 6 Sep 2023 10:31:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 06 Sep 2023 10:31:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694010669; x=1694097069; bh=oS4feDPh0NFmrHRbaZywfuWdnFAPDU7fmLB JgdpgtZ4=; b=k7zjYjpqE/J0XIaj5yab7PAHqNsjVtK4KEcTffqSk4Uihmalz4E L5JswONZuhZ5l/khK+AoxyypRYobOEUi8DGkAHFA/5ORuYbuvielnivn7YvAwmV7 xwh2QFC/xy55sWUmhCOjh/z8c+dGUMH+X/QVwFvxS8YAfmT3CYAdaT3yUlnoW07V l/GriZ3vgYCTLLNqJqYub9XGgT1jRj0vZGXDAph7agvLzEAMZtqeK4dyAr3Np3Xs A/BewxGRKdvZ56ELB/ktesCoA5J0uQiB4jfRlRFJqAaGOYnfzetf0Y+MyCZUAaX+ a7phLb+fYglw+iFazvfI2UKX18UiZ1rVNzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694010669; x=1694097069; bh=oS4feDPh0NFmrHRbaZywfuWdnFAPDU7fmLB JgdpgtZ4=; b=S4NFcX6wuW3kD7mM6s9HnF4jSiiAydAVGWx5RirsUyaAMAmLPsT YsSh/OxIoqVLmCdFfcDzide0BxBKJgbwGPku6qJqS4OEmnwNtu/uokxHnIYKVyjW 0AbMmTZo9piMaVDTuXA9OJjVW7hAL4g2P4RCHZ1A89T3aBDsD96EEBjpoGcLoZHY q6mnyuSRkG3NhY0s8lXiBe0pjWH9zXkMBohHcz+3hmIARLncFYqDQl0/2zssb3SF 2dUxWd6FyUKPHkdUhiERJPAixH+jn7F3FmE9rJQkydnkCPIQTexwSm7FIq47li2p +yBiVDOHSgqhpQzLicF1r+F3BzMCmpHTCAw== X-ME-Sender: <xms:LY34ZFg49LSbyYDInNjjubDdlp03s3khpzYxCnyisRQ8tRlvXuLYiA> <xme:LY34ZKApsf8geyv53yVMqvHow-XKHfoRcVA7kZqDa5Lb4G9KixmA1hdCR-933_0pZ -Ei-N8NOeHuNYZz4ss> X-ME-Received: <xmr:LY34ZFHRtCCARWHd4oA_vK8vQ90sXRY6xwlsu5jSGqq4zxk_FvDCogCQOuo_gPY> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehfedgjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnheptefffeekgffffffhfeetffeutddvudfgjeejffdugeetiedutefgffejfeeu geelnecuffhomhgrihhnpegrnhihthhhihhnghdrihhtnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: <xmx:LY34ZKRRm9r6pk4i_uR-zjtZIJ44HKk1TwlQYj9Ms-cEjJvQENJ5QQ> <xmx:LY34ZCzf7larhTS3UpySLKhamoT_8owoHEBrbAfaSayQ6cik5vCZdA> <xmx:LY34ZA4qrQWzgkjMS2YNlLBIrBPnC6Bnm36nVDGSqQ9LGO3rhYjMYw> <xmx:LY34ZHptxWkA8EROTi7WLAghX3vrdZomFCrNekjgdZXFm973zD1Maw> Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 10:31:07 -0400 (EDT) Message-ID: <7fa60b9c-ae00-5fdd-4805-aa55cb4094e3@HIDDEN> Date: Wed, 6 Sep 2023 17:31:05 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed Content-Language: en-US To: Paul Pogonyshev <pogonyshev@HIDDEN> References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 65763 Cc: Eli Zaretskii <eliz@HIDDEN>, 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.2 (---) On 06/09/2023 16:11, Paul Pogonyshev wrote: > Also consider this from a user point of view. Let's say I have nothing > to do with programming at all and don't have Git installed. Someone > emails me a cool Emacs package as a tarball and accidentally archives > `.git' along, because he is a developer. I unpack it, open some file and > now my Emacs warns me that Git is not installed. But why? I didn't even > ask it to do anything. It /itself/ decided to do something (because it > saw a `.git' directory), failed (Git is not installed), and now warns > /me/. From my point of view, if there is a failure for action that > wasn't direct result of user order, Emacs should stay silent. There was a previous discussion on this on the bug tracker which I can't find now. If someone is more able than me, it would be a welcome help. I think Lars was involved, and the general argument was that if .git is present, the user is plausibly interested in using our VC features and might not understand which programs might be needed to be installed for that to work. Or just forget about that aspect e.g. on a new machine. So we help them with those warnings. > In other words, I think there are two sane options here: > > 1) Simply check if Git is installed before doing anything Git-related > from `find-file-hook' callback. If it is not installed, just silently > don't do anything. Reserve errors and warnings until the user actually > ask you to do something Git-related, not simply to open a file. I don't mind this solution as well, and it has its logic. So if others like this approach we could do such change (roughly, we'd need to capture errors in all 'registered' functions at least, reraise as vc-backend-program-missing, and then catch them -- and only them -- silently at the top level).
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 13:11:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 09:11:25 2023 Received: from localhost ([127.0.0.1]:33416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdsJY-0000tt-Og for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 09:11:25 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:49512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pogonyshev@HIDDEN>) id 1qdsJU-0000tb-BX for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 09:11:23 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so54948681fa.3 for <65763 <at> debbugs.gnu.org>; Wed, 06 Sep 2023 06:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694005872; x=1694610672; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=689sCBTBRVRXwG3uLahuGSilvBME3OnRfg0SnaJyLVU=; b=asU/g9wN+5G740vhRgL+1IQkIKZFFP52tfA63TPgBtX/G0DqUFAJUSt1NY7yYqJPRs rAX0YWf/V5UTHdOZiNly6UcXdCD1QJKARjOBpsR5G9WxIVJ9Y0De7RkuuZvjxCauyqWa Ve0La+60ZdGf6uqtZ1z1BHxwixmphZcGHLbir2q5xSgU3M97AQ1Yra4eGMjF7iO459Uh PUrwSebSWDb/qyt1d7ejVtpsPFcgKwWvzI2mHFl4Sdm9txJo0XREojIRVXyQFme/tMU6 osaLmvxEQqFRg3njiBIZZSbXpIMc4zg3luj/dwSu5EODevhnW/1jclGMe27CJhRFmrP3 WdvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694005872; x=1694610672; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=689sCBTBRVRXwG3uLahuGSilvBME3OnRfg0SnaJyLVU=; b=h60iF9WUUkcj/UM2u1/an6VHn0BGZV9DFUJcr6cSZD3PoA/Eb8ohu9JbbQk7y36Fhc lT4/JmO4DbGDiONgtEwHj7ZqM7BJTNDixNyqU+T8vbu28MF+vfahrWupoQ8lIi9iMyIA kfwz5FUGV/i6cR0DpvvKggkYFFL9+8ITlwluyDmJhPv+YBO3Nk0NgDw5AmWdAT7cAcgi kC2cDkdCSaSqVm2aEMx1QEd5EmUmDNBSgLkBXS7Fc5vtqpBZy7FS6cWcGiJ6NkCiUSG5 wUMKaHFbRtocyPWncAcONK5BpzyqHaJ+Uqtr6vwDGTRMRkIauvzgd4U2MZSSs/CV7JSh Jp4Q== X-Gm-Message-State: AOJu0YzJ4cFPbJiKO6TLUJM1UhxqaA5riAT628j5SE5smCvcKffDIJ9v 56QIhyHk/XUeRFtlEQLjj+eYFQ19Tx69d4Ba+g== X-Google-Smtp-Source: AGHT+IEJLZO46xjmEbPlbgN1UW7cXfNwlsJdc8xWw/hxWIN+JUrGKZLJmyA2cfR6c+25Ruvl89mEUtWiVEn8Aw83L0A= X-Received: by 2002:a2e:b701:0:b0:2bc:c89e:d8df with SMTP id j1-20020a2eb701000000b002bcc89ed8dfmr2517565ljo.48.1694005872168; Wed, 06 Sep 2023 06:11:12 -0700 (PDT) MIME-Version: 1.0 References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> In-Reply-To: <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> From: Paul Pogonyshev <pogonyshev@HIDDEN> Date: Wed, 6 Sep 2023 15:11:00 +0200 Message-ID: <CAG7Bpaqbj4jhRnXn8=6BiFLJpkb6s4rqe=ELCKLrchaHJ+6YgA@HIDDEN> Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed To: Dmitry Gutov <dmitry@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000042138c0604b07a99" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65763 Cc: Eli Zaretskii <eliz@HIDDEN>, 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --00000000000042138c0604b07a99 Content-Type: text/plain; charset="UTF-8" I doubt ERT can be changed, it probably sets `debug-on-error' for a reason, i.e. without it it simply couldn't work. As far as I can tell, the only good option is to never trigger an error just because a directory looks like it might be Git, but Git is not installed. Also consider this from a user point of view. Let's say I have nothing to do with programming at all and don't have Git installed. Someone emails me a cool Emacs package as a tarball and accidentally archives `.git' along, because he is a developer. I unpack it, open some file and now my Emacs warns me that Git is not installed. But why? I didn't even ask it to do anything. It *itself* decided to do something (because it saw a `.git' directory), failed (Git is not installed), and now warns *me*. From my point of view, if there is a failure for action that wasn't direct result of user order, Emacs should stay silent. In other words, I think there are two sane options here: 1) Simply check if Git is installed before doing anything Git-related from `find-file-hook' callback. If it is not installed, just silently don't do anything. Reserve errors and warnings until the user actually ask you to do something Git-related, not simply to open a file. 2) Make sure that this error is always demoted to a warning, even if `debug-on-error' is t. I like option 1 better. Paul On Wed, 6 Sept 2023 at 14:52, Dmitry Gutov <dmitry@HIDDEN> wrote: > On 06/09/2023 15:49, Paul Pogonyshev wrote: > > It feels conceptually wrong to require all tests that open files to > > rebind `vc-handled-backends'. This is not what they are testing. It also > > depends on knowing particular Emacs quirks (which I, for example, didn't > > know one day earlier). If those were to change in some way, would all > > tests everywhere need to accomodate? > > But does that mean that VC needs to be changed, or ERT? > > E.g. ERT has an interactive mode where it drops into a debugger for the > user ('d'), but does it need to enable the debugger for its simple runs > as well? > --00000000000042138c0604b07a99 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I doubt ERT can be changed, it probably sets `debug-on-err= or' for a reason, i.e. without it it simply couldn't work. As far a= s I can tell, the only good option is to never trigger an error just becaus= e a directory looks like it might be Git, but Git is not installed.<div><br= ></div><div>Also consider this from a user point of view. Let's say I h= ave nothing to do with programming at all and don't have Git installed.= Someone emails me a cool Emacs package as a tarball and accidentally archi= ves `.git' along, because he is a developer. I unpack it, open some fil= e and now my Emacs warns me that Git is not installed. But why? I didn'= t even ask it to do anything. It <i>itself</i> decided to do something (bec= ause it saw a `.git' directory), failed (Git is not installed), and now= warns <i>me</i>. From my point of view, if there is a failure for action t= hat wasn't direct result of user order, Emacs should stay silent.</div>= <div><br></div><div>In other words, I think there are two sane options here= :</div><div><br></div><div>1) Simply check if Git is installed before doing= anything Git-related from `find-file-hook' callback. If it is not inst= alled, just silently don't do anything. Reserve errors and warnings unt= il the user actually ask you to do something Git-related, not simply to ope= n a file.</div><div><br></div><div>2) Make sure that this error is always d= emoted to a warning, even if `debug-on-error' is t.</div><div><br></div= ><div>I like option 1 better.</div><div><br></div><div>Paul</div></div><br>= <div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 6 = Sept 2023 at 14:52, Dmitry Gutov <<a href=3D"mailto:dmitry@HIDDEN">dm= itry@HIDDEN</a>> wrote:<br></div><blockquote class=3D"gmail_quote" st= yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd= ing-left:1ex">On 06/09/2023 15:49, Paul Pogonyshev wrote:<br> > It feels conceptually wrong to require all tests that open files to <b= r> > rebind `vc-handled-backends'. This is not what they are testing. I= t also <br> > depends on knowing particular Emacs quirks (which I, for example, didn= 't <br> > know one day earlier). If those were to change in some way, would all = <br> > tests everywhere need to accomodate?<br> <br> But does that mean that VC needs to be changed, or ERT?<br> <br> E.g. ERT has an interactive mode where it drops into a debugger for the <br= > user ('d'), but does it need to enable the debugger for its simple = runs <br> as well?<br> </blockquote></div> --00000000000042138c0604b07a99--
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 13:06:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 09:06:28 2023 Received: from localhost ([127.0.0.1]:33412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdsEm-0000mc-1S for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 09:06:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qdsEj-0000mP-Of for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 09:06:26 -0400 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 <eliz@HIDDEN>) id 1qdsEd-0003Qp-76; Wed, 06 Sep 2023 09:06:19 -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=DyWrIrI3QZS9v1jfYz4kuTDU9bBJXHgDlGJAbSEfYaQ=; b=XxuQ/b/cpRYN meIa51iT5O5XaVWGcLRiigPomZfrmR73zyC3CkoAJ6LCu71X8fXerik8l3BxMCkeLNF+OdI2J0T72 C3dMyxYYVaKKOU5wudBBBP16abdqUf0t6B+Kus0HVrKvlMDzvW4rLPfjnZKIvgWI8BmD+ZbtB29ne 6wGHmRMD9FqJR9/DRjNO08jtXxW/zyqVM/hapPpH6z3gvCc1SSQd2h/7SaFZkD3givP4aTkBJPr3U jOsFsBFe6eGABmxjbmeGwItTcxCbAC1Yro8wBX2s/YgWjDtpOhY8ASYIIU5gJ4SOeVrBx1DprpNxu MNtV9NtYeUWmhh46uYyUUA==; Date: Wed, 06 Sep 2023 16:06:04 +0300 Message-Id: <83sf7r1mf7.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> (message from Dmitry Gutov on Wed, 6 Sep 2023 15:35:33 +0300) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org, pogonyshev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Wed, 6 Sep 2023 15:35:33 +0300 > Cc: 65763 <at> debbugs.gnu.org > From: Dmitry Gutov <dmitry@HIDDEN> > > On 06/09/2023 15:13, Eli Zaretskii wrote: > > Well, we could then protect the execution of the problematic form "by > > hand" by using condition-case-unless-debug. Dmitry, WDYT? > > Maybe the solution is to use the straight condition-case rather than > condition-case-unless-debug? Because otherwise as long as > condition-case-unless-debug is used, we would always have this problem. Sorry, I forgot that debug-on-error affects condition-case-unless-debug as well. > Rewriting with-demoted-errors is not an option, of course, but we could > create a special, shorted version of it for vc. Yes, something like that. Shouldn't be hard, I think. > Another option, though, is to rewrite the ERT tests in question: e.g. to > bind vc-handled-backends to nil, or to some other value if the presence > of certain VC programs is known and expected in advance. Yes, but that needs to be done in every test...
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 12:52:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 08:52:30 2023 Received: from localhost ([127.0.0.1]:33396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qds1G-0000R3-2M for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:52:30 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1qds1D-0000Qq-Vo for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:52:28 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B9C525C0048; Wed, 6 Sep 2023 08:52:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 06 Sep 2023 08:52:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694004741; x=1694091141; bh=RykLt3JWjzY5F+N30XP5P8bJ6f8lhItus89 BTuIgKd4=; b=X3JzNFTsllgECBiGwqsqiuIrnB8DkDkRr8d11ICmLggOnULlKeI MpunD7cW6iCYjqaxJJ+BIHKCUCNGd7uDmXl5DsyS3jmDxdJI44oC2AJcwPcOO1r8 4SAD7tkEtvFddVZ72yIzK8EekUZeyazPNUmoBsdXLvwLgQQdeMqs+7Nz5oiMGdIQ /DApQVv6KNleA4HgYEspI2/FKijO0nxCOhkfg+Zp9FsRqBqUUER7VKHEnJX4fv4W HA8PoWK/JBdTahdGXTSF5VlBQoL9HYd5qP7DDWMW4etRvJcpDZYm20rvgQDjzkYU rUdF44iyzwxKBLrt2KvLknLGGZac6D7Wovg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694004741; x=1694091141; bh=RykLt3JWjzY5F+N30XP5P8bJ6f8lhItus89 BTuIgKd4=; b=JPyUe70BU902RSGMG3bF8WtiayujsjHBmklha/g9GvFHJ33Dgfv 8eP2Yor4UOsf2NqPd6BfsTADoYVmSJlz+9IpUYBMRycy7c3z7ASJ/4zLNXQHw8MS B/uexiBc3rotK0TxKLZN65jLncC/w4dFKdau5t6Ap3DYeI5epYW9GY8Eg0CJzwd6 DW6l4bSwlKgK0VerR+mdadAsH5Rr3V1TGmiusTtv+V3DUDJxv51lsJoKmdF0okw1 ERlAjNL7CsR7N/ZXJqaYMTUdqDIlKkIV2EckvMrSOjxym/1MOhFHqBQybFNSTwK6 LFfvV/PFii3wzaq79eQXfJiCM+UwA9eLYXQ== X-ME-Sender: <xms:BXb4ZH4jnnBczvJBLxoFY7LIFs4j8ktgDR625mMQwu7pxjbT_6_aEg> <xme:BXb4ZM5sVks796XD7yYTnydjsXXmnxSfdIqcSs1Dgl3fAr0uEMIn69RDpk-Pn7YTB xgR1QiZXycB5kXLQHM> X-ME-Received: <xmr:BXb4ZOe_1aJe2wgydsHL9ylVuGhA82hQqYdkM27RzpywGMQkNbR2k4VN4JuCjK8> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehfedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: <xmx:BXb4ZIKrQ98wtyCJXg_h9Z-8HIPAtxqmBuX_TWGldYyA2A60ePRxaw> <xmx:BXb4ZLKWAvA8vmSKceXKHd9-Tl38sggS9Ux5lIPKFsWGkxByoPSUaw> <xmx:BXb4ZByyfE13IRdyQLX2s7EM74P-eE_OfVZK-ss0ArUCTEK-dumXpg> <xmx:BXb4ZBjlX3LIp2k5qmuJPIxVnaW6bFEHF58tcfT5QX3kp9Cwo3YLgQ> Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 08:52:20 -0400 (EDT) Message-ID: <ca0ff246-5945-506e-1b10-5617849f9ef7@HIDDEN> Date: Wed, 6 Sep 2023 15:52:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed Content-Language: en-US To: Paul Pogonyshev <pogonyshev@HIDDEN> References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 65763 Cc: Eli Zaretskii <eliz@HIDDEN>, 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.2 (---) On 06/09/2023 15:49, Paul Pogonyshev wrote: > It feels conceptually wrong to require all tests that open files to > rebind `vc-handled-backends'. This is not what they are testing. It also > depends on knowing particular Emacs quirks (which I, for example, didn't > know one day earlier). If those were to change in some way, would all > tests everywhere need to accomodate? But does that mean that VC needs to be changed, or ERT? E.g. ERT has an interactive mode where it drops into a debugger for the user ('d'), but does it need to enable the debugger for its simple runs as well?
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 12:49:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 08:49:35 2023 Received: from localhost ([127.0.0.1]:33384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdryQ-0000M3-VQ for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:49:35 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:62655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pogonyshev@HIDDEN>) id 1qdryO-0000Lp-MC for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:49:33 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-501b9f27eb2so1114085e87.0 for <65763 <at> debbugs.gnu.org>; Wed, 06 Sep 2023 05:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694004565; x=1694609365; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+PaQDZnn4igpjGWLn7Ulmk0s4iTQftyIddHxhsW8rHc=; b=oz/pn2UBx43qyZdD1vINGYrswy2eEPBTqfAuQKypbbVyDPE2RcAWufowGkaHjO6DVv xDWNwiez6ZJczlK4GofsSsB3W2ohZhOkCzOTFB23HNl+m4XBtruBruQiHuBdx8vMP2S1 oP0uKbbQutGjVFK9HvF2S7/4rz/PslSOcP6OWpvZI68keLctWhq7plej/UwPUXyP68Mn /Lru1BTGygwMEzQREPZEUGvuJ4ywhS+DP8UbdRlpNXnhuxaQjKCCsbksODn6xaxhU4Uq Mm4RY3VtnA1AQ8Q8MhpxBuQ0iXyfgR6BCW8skLJMhQAwuNIXX79pnA6OFpnNaaeg6cKj SG3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694004565; x=1694609365; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+PaQDZnn4igpjGWLn7Ulmk0s4iTQftyIddHxhsW8rHc=; b=ExgtWKaWjUvNzSJbB+Ld/fmzRpS184lDqvAvY7mYRsReFrnLFBh28YUh2F4aNZjxJ9 DU02tmEBkpTA2rPY8LCbffL79y+hjOW4f5t1+1oZTIXmACruRCWgAzstdmDHSyv6kXjh P5bmzj/YIR24AFFjeSMjJy6gsiwDVF6MpqkLO5gIoiIO/3JXYlqpBahIZBFWTtkIuQvE BeWoE2A3spW1IpDN7ktjJ1t6ILmSsVallXnLRUxm7lcN7REPEeEB+KnZPl0cMBHG5Gc5 N9mX/WjRaYBq5Sac2iXOP27OU6eSzdybzsVlinquOy38vd9OdKKL5ip8RksT3j3zlxYM F77g== X-Gm-Message-State: AOJu0YyP2fvZH6F/I96QpilWBmDNZINHHFJxu05W8ncsKW77OvgaZMhh JMOdF3MynxZ9nOx8tH/V2Ez0mcvA83kAKQb98A== X-Google-Smtp-Source: AGHT+IE/qP36PMkoSyt59/yf+r9p3vvxvuuK4iIXXL2OYHvoqxOxcedthOkQM+DxpGFVHZK63zFEh+UAAD3EoLFR6NY= X-Received: by 2002:a05:6512:4020:b0:500:ae25:cd46 with SMTP id br32-20020a056512402000b00500ae25cd46mr1242166lfb.11.1694004565090; Wed, 06 Sep 2023 05:49:25 -0700 (PDT) MIME-Version: 1.0 References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> In-Reply-To: <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> From: Paul Pogonyshev <pogonyshev@HIDDEN> Date: Wed, 6 Sep 2023 14:49:13 +0200 Message-ID: <CAG7BpaoWA9xnzYu+K=6m5yyTi7oLH7noMZiJLLJtKadQUV719g@HIDDEN> Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed To: Dmitry Gutov <dmitry@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000059a78d0604b02c3d" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65763 Cc: Eli Zaretskii <eliz@HIDDEN>, 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --00000000000059a78d0604b02c3d Content-Type: text/plain; charset="UTF-8" > Another option, though, is to rewrite the ERT tests in question: e.g. to > bind vc-handled-backends to nil, or to some other value if the presence > of certain VC programs is known and expected in advance. Test in question does not need or use Git in any way. It fails only because Emacs under it decides to die with an exception when Git is not installed, `debug-on-error' happens to be t (because of ERT, test itself doesn't even set it explicitly) and current directory is structured in a particular way. It feels conceptually wrong to require all tests that open files to rebind `vc-handled-backends'. This is not what they are testing. It also depends on knowing particular Emacs quirks (which I, for example, didn't know one day earlier). If those were to change in some way, would all tests everywhere need to accomodate? Paul On Wed, 6 Sept 2023 at 14:35, Dmitry Gutov <dmitry@HIDDEN> wrote: > On 06/09/2023 15:13, Eli Zaretskii wrote: > >> From: Paul Pogonyshev<pogonyshev@HIDDEN> > >> Date: Wed, 6 Sep 2023 09:29:59 +0200 > >> Cc:65763 <at> debbugs.gnu.org > >> > >> The problem appears to be only with `debug-on-error'. However, there > are cases where you cannot > >> control it at all, e.g. with ERT (probably also Buttercup or any other > testing framework). In effect, an > >> ERT test fails for a "random" reason, depending on which machine it is > executed, i.e. it fails inside > >> that Docker container. > > I see. > > > > Well, we could then protect the execution of the problematic form "by > > hand" by using condition-case-unless-debug. Dmitry, WDYT? > > Maybe the solution is to use the straight condition-case rather than > condition-case-unless-debug? Because otherwise as long as > condition-case-unless-debug is used, we would always have this problem. > > Rewriting with-demoted-errors is not an option, of course, but we could > create a special, shorted version of it for vc. > > Another option, though, is to rewrite the ERT tests in question: e.g. to > bind vc-handled-backends to nil, or to some other value if the presence > of certain VC programs is known and expected in advance. > --00000000000059a78d0604b02c3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">> Another option, though, is to rewrite the ERT tests i= n question: e.g. to<br>>=C2=A0bind vc-handled-backends to nil, or to som= e other value if the presence<br>>=C2=A0of certain VC programs is known = and expected in advance.<br><div><br></div><div>Test in question does not n= eed or use Git in any way. It fails only because Emacs under it decides to = die with an exception when Git is not installed, `debug-on-error' happe= ns to be t (because of ERT, test itself doesn't even set it explicitly)= and current directory is structured in a particular way.</div><div><br></d= iv>It feels conceptually wrong to require all tests that open files to rebi= nd `vc-handled-backends'. This is not what they are testing. It also de= pends on knowing particular Emacs quirks (which I, for example, didn't = know one day earlier). If those were to change in some way, would all tests= everywhere need to accomodate?<div><br></div><div>Paul</div></div><br><div= class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 6 Sept= 2023 at 14:35, Dmitry Gutov <<a href=3D"mailto:dmitry@HIDDEN">dmitry= @gutov.dev</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex">On 06/09/2023 15:13, Eli Zaretskii wrote:<br> >> From: Paul Pogonyshev<<a href=3D"mailto:pogonyshev@HIDDEN" t= arget=3D"_blank">pogonyshev@HIDDEN</a>><br> >> Date: Wed, 6 Sep 2023 09:29:59 +0200<br> >> <a href=3D"mailto:Cc%3A65763 <at> debbugs.gnu.org" target=3D"_blank">Cc= :65763 <at> debbugs.gnu.org</a><br> >><br> >> The problem appears to be only with `debug-on-error'. However,= there are cases where you cannot<br> >> control it at all, e.g. with ERT (probably also Buttercup or any o= ther testing framework). In effect, an<br> >> ERT test fails for a "random" reason, depending on which= machine it is executed, i.e. it fails inside<br> >> that Docker container.<br> > I see.<br> > <br> > Well, we could then protect the execution of the problematic form &quo= t;by<br> > hand" by using condition-case-unless-debug.=C2=A0 Dmitry, WDYT?<b= r> <br> Maybe the solution is to use the straight condition-case rather than <br> condition-case-unless-debug? Because otherwise as long as <br> condition-case-unless-debug is used, we would always have this problem.<br> <br> Rewriting with-demoted-errors is not an option, of course, but we could <br= > create a special, shorted version of it for vc.<br> <br> Another option, though, is to rewrite the ERT tests in question: e.g. to <b= r> bind vc-handled-backends to nil, or to some other value if the presence <br= > of certain VC programs is known and expected in advance.<br> </blockquote></div> --00000000000059a78d0604b02c3d--
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 12:35:44 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 08:35:44 2023 Received: from localhost ([127.0.0.1]:33350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdrl1-0008MH-O4 for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:35:44 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:39571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1qdrkz-0008M2-Me for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:35:42 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6FA355C0165; Wed, 6 Sep 2023 08:35:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 06 Sep 2023 08:35:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694003735; x=1694090135; bh=EeHXits/omg9Mu6pKpxburM/0QcyWaFfTdB UAV7qq6U=; b=mypRrYovkmDIE0zA8S3sMgqOaKomUPEoWgf3pfys3vLaPK5mZ37 +RF7tVwc5ed1sTMqV3ANgIS8+ZyPAXZs239Xk6k1Cga9nvYz9d0RPLeSVdVF+Fda qxt3zWCC0DPaNAJTZNnColzNpk9/h1zHwAcb8T4zVqYclH6k2wk3CyfHyVU0rM2f q1x5bv2dQcQVwjUCGZ3VeLMaVySwcICV4Pa/mrN+EODgF3EgvHx9qgQJSbzPMH2/ Yry8g4hUjp8WrHRT+X4tTTqVnZa6XhkqwLVXic/WtlzN7puCA6Eci+D2XtVNLrME g0UoV8MR3GStVUCPr5hSs7mUQMk5g/gXLgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694003735; x=1694090135; bh=EeHXits/omg9Mu6pKpxburM/0QcyWaFfTdB UAV7qq6U=; b=GAL8uRqoOE1+xG5tS7wnR9+A4NTHjCLuyepsCWgxnLl31gKYwx5 fKf1t2W1IY2jDe2WUCLxA7Z+4W47Das9u0tWhwOWFG/28b8NveRRFqGXLfcf1gU0 WxD5S+rtCY+bB0vd1Wx8Oj9zRslxQAndJ9jGbaL9ceGw0e2/vX5Zkn+0aDvOIY1/ macy0t/Gu70bktei4AgQh6q4Z8a/Btl/ghW4p57h2X7BNqo/Ecp8YF4gXoiobdUF ltvQiToAZjwacbS+RvM5FmyT97DFSldalBNaG3wxiZUzatapd07OjBfWluljQWY8 YLM25zS6x5MEEvwHjwL4zV+LzoVtonOG/+A== X-ME-Sender: <xms:F3L4ZKz04WtE1DeOzyBtBuMF1nIgiIcmPox4CayfpSbPaiFGYkMBCg> <xme:F3L4ZGTRje9-v4lWCs2439ccL1u9ssYj_1oOR2F1EIAYMEL23DBVpT_f7x1CMFfqf FNVjPnvSaR7xwZK7Xw> X-ME-Received: <xmr:F3L4ZMVXEiFtwQagL9TATLO-xWA-P3hEyZvShpRhnvdncakzXa3uhX6N6OMY06o> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehfedghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: <xmx:F3L4ZAjJKZTeeLCm4qKUB8iy8dDAVFAangSI2NSsu7-ViQanD2LmWw> <xmx:F3L4ZMCMCyB1yXFy_WTjeiWusbKcHUotZ0rHyHq-I5xLukMFw1ynVg> <xmx:F3L4ZBIKRscevM7X1WGHigOlHvHMtQlbe4qOVyqatU8XVSmywbyEeQ> <xmx:F3L4ZF7tvS7tANyv8yg_iqA5aIBVUSJUYmhC0l5MndAx838YDqFxFw> Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 08:35:34 -0400 (EDT) Message-ID: <ce1e3ce0-ca77-1042-96f8-578a3de50bc8@HIDDEN> Date: Wed, 6 Sep 2023 15:35:33 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed Content-Language: en-US To: Eli Zaretskii <eliz@HIDDEN>, Paul Pogonyshev <pogonyshev@HIDDEN> References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> <83a5tz33er.fsf@HIDDEN> From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <83a5tz33er.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.2 (---) On 06/09/2023 15:13, Eli Zaretskii wrote: >> From: Paul Pogonyshev<pogonyshev@HIDDEN> >> Date: Wed, 6 Sep 2023 09:29:59 +0200 >> Cc:65763 <at> debbugs.gnu.org >> >> The problem appears to be only with `debug-on-error'. However, there are cases where you cannot >> control it at all, e.g. with ERT (probably also Buttercup or any other testing framework). In effect, an >> ERT test fails for a "random" reason, depending on which machine it is executed, i.e. it fails inside >> that Docker container. > I see. > > Well, we could then protect the execution of the problematic form "by > hand" by using condition-case-unless-debug. Dmitry, WDYT? Maybe the solution is to use the straight condition-case rather than condition-case-unless-debug? Because otherwise as long as condition-case-unless-debug is used, we would always have this problem. Rewriting with-demoted-errors is not an option, of course, but we could create a special, shorted version of it for vc. Another option, though, is to rewrite the ERT tests in question: e.g. to bind vc-handled-backends to nil, or to some other value if the presence of certain VC programs is known and expected in advance.
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 12:14:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 08:14:14 2023 Received: from localhost ([127.0.0.1]:33288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdrQE-00058T-GB for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:14:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qdrQC-000581-BX for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 08:14:12 -0400 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 <eliz@HIDDEN>) id 1qdrQ3-0000hY-WF; Wed, 06 Sep 2023 08:14:05 -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=2AvmWPcGpgxfacYeCMNRcyjMnY5rSP1I2eKPEfYr7Vg=; b=jrtKDXHJEFsZ 9rWv3mRAWOrVCBL5MmEZZrD4wwugUURuVaHvFVWuSqqyFxSs6sbtJawBN99nFm10sIcZTQ4mTEaxr Q/9cUmJWf1BSTVFp1dXThL83AIbLVfZeGHu1q8fk0eq1aMTA/O4U0/Rct2b9TucaJysGN6QbYWAkf 6si+zqesVJSq9u8EuPhMtwHtWsuZXjz01mF8AnQllsJD9olVUExo/x1lGnGGT3UnFCXhWWqzDw6VU sNlPUhS2JIA46uEnGq2ETyfCQFR9DwMpbopih9rX0NWNGh/ZY7PsLTOafP7lnjqKJZSWvOUxhq6gD cxqBaDNfOroLguolJnb1hw==; Date: Wed, 06 Sep 2023 15:13:48 +0300 Message-Id: <83a5tz33er.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Paul Pogonyshev <pogonyshev@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> (message from Paul Pogonyshev on Wed, 6 Sep 2023 09:29:59 +0200) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Paul Pogonyshev <pogonyshev@HIDDEN> > Date: Wed, 6 Sep 2023 09:29:59 +0200 > Cc: 65763 <at> debbugs.gnu.org > > The problem appears to be only with `debug-on-error'. However, there are cases where you cannot > control it at all, e.g. with ERT (probably also Buttercup or any other testing framework). In effect, an > ERT test fails for a "random" reason, depending on which machine it is executed, i.e. it fails inside > that Docker container. I see. Well, we could then protect the execution of the problematic form "by hand" by using condition-case-unless-debug. Dmitry, WDYT?
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 07:30:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 03:30:30 2023 Received: from localhost ([127.0.0.1]:60685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdmzX-0003Ha-Nr for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 03:30:30 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:54379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pogonyshev@HIDDEN>) id 1qdmzT-0003HI-7z for 65763 <at> debbugs.gnu.org; Wed, 06 Sep 2023 03:30:23 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5009d4a4897so5658196e87.0 for <65763 <at> debbugs.gnu.org>; Wed, 06 Sep 2023 00:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693985411; x=1694590211; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wfiIO7nFbnw+ybauTzuzb5CM7LfozWJ3o8P2/PTPL/o=; b=V51BwrKhys66k7gLEu28etBBFA1jgTSi9Kyg9vUGy4ilo2XOVOvfB05t1n1nbOYsvw zMNjmWnQqV3/+I7MVtYtb6HQw/COychPdZPx0FVC3IZuWOIkFHK1MhvKf3SoR/Sm8Bth XkU1K+3QaYIuMrQsoZU50+GW8uXb4ueEdqFwBQ+zBmtYpiI4ozszxjUuwAFZlKxeRyEf QSfO8VM0yiVqvxz7t2y7rL7WQ39T+iDnIcVEt4/IXFP6mdHljOu3azZgmfY6lwwDSFsc LiSsjOidzN0FAPL7rweF0mLTzQbR58lU8+PP6hyv2Nqx6jijMDnIKXckFVr6fylcIH41 02pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693985411; x=1694590211; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wfiIO7nFbnw+ybauTzuzb5CM7LfozWJ3o8P2/PTPL/o=; b=fj6vfPkzyuc3TAF5FwLiOgzyqb2M+C5XojODWLfmK2D5mJT2UiQZezPi1Q6F6HElQX 2usbMdzrGsXjZlsn1qbiwhai+UiEYQnzMS5+E37vmIDdHCdh7Q3JFp1jhvoD3jY5EPdd sUehHSBROuF5rohOWqXny8fCkSrnJFRYKI/1LPeW4MZOx4AVoHLDWWWCERLBfFjSnjIQ a1E215DhzYHY1sM2SDgY7t6yGTnRbUJpQ+u0sgdcUMCl6n9oZHsP2xoq1Y8i/pwJVtF2 t6Yb6HL/kTbbheCDCKe7fuGQOEXmC2mtaIpY5QpOTE5KwUk8hIMr7ih4iHJC83ZFJRkk TdZw== X-Gm-Message-State: AOJu0YxN6YlQ6gQtqwd+0jTgc/NrNu8jM+WGT6Q/KnTxUZHZvK5BA6st YF5+4tPIouPM3L+kDtoRMf3KFNStX17lYrOg+Q== X-Google-Smtp-Source: AGHT+IEKUcSk4I1P8i/sCEQNwOY62vtrX7M1x26a0tUkJtZkpj1dAP4HjS6Zj1I31rdhzRKKPTYCeR4322gAKXtNy0s= X-Received: by 2002:ac2:4ecc:0:b0:4f8:586a:8af6 with SMTP id p12-20020ac24ecc000000b004f8586a8af6mr1447163lfr.4.1693985410995; Wed, 06 Sep 2023 00:30:10 -0700 (PDT) MIME-Version: 1.0 References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> <83y1hk2g29.fsf@HIDDEN> In-Reply-To: <83y1hk2g29.fsf@HIDDEN> From: Paul Pogonyshev <pogonyshev@HIDDEN> Date: Wed, 6 Sep 2023 09:29:59 +0200 Message-ID: <CAG7BparT2Siy1i8eWbZWUt_9T6vonFvt2tu4+_yc2p0CyWQrDQ@HIDDEN> Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed To: Eli Zaretskii <eliz@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000ad5a860604abb6f6" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000ad5a860604abb6f6 Content-Type: text/plain; charset="UTF-8" The problem appears to be only with `debug-on-error'. However, there are cases where you cannot control it at all, e.g. with ERT (probably also Buttercup or any other testing framework). In effect, an ERT test fails for a "random" reason, depending on which machine it is executed, i.e. it fails inside that Docker container. Paul On Wed, 6 Sept 2023 at 04:26, Eli Zaretskii <eliz@HIDDEN> wrote: > > From: Paul Pogonyshev <pogonyshev@HIDDEN> > > Date: Tue, 5 Sep 2023 22:14:15 +0200 > > Cc: 65763 <at> debbugs.gnu.org > > > > Ah, `debug-on-error' makes `with-demoted-errors' not demote it. > > Yes, exactly. > > > It seems in my case `debug-on-error' is let-bound in > `ert--run-test-internal'. I.e. when file is failed to be > > opened inside a ERT-based test, there is no warning, it's a hard error. > I happen to run ERT tests > > inside a Docker container. > > > > I'm not sure if it is a bug, but it does cause problems. > > Are the problems it causes happen only when debug-on-error is non-nil > for some reason? Or did you see it cause problems in other cases as > well? > --000000000000ad5a860604abb6f6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">The problem appears to be only with `debug-on-error'. = However, there are cases where you cannot control it at all, e.g. with ERT = (probably also Buttercup or any other testing framework). In effect, an ERT= test fails for a "random" reason, depending on which machine it = is executed, i.e. it fails inside that Docker container.<div><br></div><div= >Paul</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"g= mail_attr">On Wed, 6 Sept 2023 at 04:26, Eli Zaretskii <<a href=3D"mailt= o:eliz@HIDDEN">eliz@HIDDEN</a>> wrote:<br></div><blockquote class=3D"g= mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204= ,204,204);padding-left:1ex">> From: Paul Pogonyshev <<a href=3D"mailt= o:pogonyshev@HIDDEN" target=3D"_blank">pogonyshev@HIDDEN</a>><br> > Date: Tue, 5 Sep 2023 22:14:15 +0200<br> > Cc: <a href=3D"mailto:65763 <at> debbugs.gnu.org" target=3D"_blank">65763@d= ebbugs.gnu.org</a><br> > <br> > Ah, `debug-on-error' makes `with-demoted-errors' not demote it= .<br> <br> Yes, exactly.<br> <br> > It seems in my case `debug-on-error' is let-bound in `ert--run-tes= t-internal'. I.e. when file is failed to be<br> > opened inside a ERT-based test, there is no warning, it's a hard e= rror. I happen to run ERT tests<br> > inside a Docker container.<br> > <br> > I'm not sure if it is a bug, but it does cause problems.<br> <br> Are the problems it causes happen only when debug-on-error is non-nil<br> for some reason?=C2=A0 Or did you see it cause problems in other cases as<b= r> well?<br> </blockquote></div> --000000000000ad5a860604abb6f6--
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 6 Sep 2023 02:26:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 22:26:14 2023 Received: from localhost ([127.0.0.1]:60301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdiFB-0003h1-Se for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 22:26:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qdiFA-0003go-4Y for 65763 <at> debbugs.gnu.org; Tue, 05 Sep 2023 22:26:13 -0400 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 <eliz@HIDDEN>) id 1qdiF3-0006uD-RK; Tue, 05 Sep 2023 22:26:05 -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=BMNyjj5SWttlwRiRAKfbybi2bCW2EnbPuPvSyDrR94U=; b=NyGfmXCHKSi3 DcTZDsIqpqe4DEOZSHUsQ4zDt2tStx4u75DsC607sMQAfZ4NyPfBfrwQDX79orXUWqbd64mrgaYit +FbtFwZCiiaC5Z61KWnIYG62gHjGxlIfGPYHc6zQD64o6HKbYYSzXvLUnI5j9mEvnK+bIcpT3e9UZ AP64AGbVm2EL9Ll8BafhorGLz3izPlJicWRbnoW+iPjyZXJQaQ8AcY+CMD8RQj1PjL8t86lnumNGX sedXQ7pPUwr/7NkFmelVx5CHepLcrDUfaz5JUe7iqA840bx2FHLx39ROKNWrutCmbjTtxUMhTRvZC 8vl70Um2EzadV74jad9EGA==; Date: Wed, 06 Sep 2023 05:25:50 +0300 Message-Id: <83y1hk2g29.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Paul Pogonyshev <pogonyshev@HIDDEN> In-Reply-To: <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> (message from Paul Pogonyshev on Tue, 5 Sep 2023 22:14:15 +0200) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Paul Pogonyshev <pogonyshev@HIDDEN> > Date: Tue, 5 Sep 2023 22:14:15 +0200 > Cc: 65763 <at> debbugs.gnu.org > > Ah, `debug-on-error' makes `with-demoted-errors' not demote it. Yes, exactly. > It seems in my case `debug-on-error' is let-bound in `ert--run-test-internal'. I.e. when file is failed to be > opened inside a ERT-based test, there is no warning, it's a hard error. I happen to run ERT tests > inside a Docker container. > > I'm not sure if it is a bug, but it does cause problems. Are the problems it causes happen only when debug-on-error is non-nil for some reason? Or did you see it cause problems in other cases as well?
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 5 Sep 2023 20:14:36 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 16:14:36 2023 Received: from localhost ([127.0.0.1]:59542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdcRX-0005qN-LC for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 16:14:36 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:59460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pogonyshev@HIDDEN>) id 1qdcRV-0005qB-N8 for 65763 <at> debbugs.gnu.org; Tue, 05 Sep 2023 16:14:34 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-500913779f5so4920441e87.2 for <65763 <at> debbugs.gnu.org>; Tue, 05 Sep 2023 13:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693944867; x=1694549667; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=d+Zid8tklD0Vq2m7Y1qHKgC5q0G+0QWhLe6uXMzDgqE=; b=GVMVhYbahr9s+Z1ubVl4V6uHn6MkOj0v2SGUDUNIVyKtE0wIkvP9AFEdWQ/VYnel90 sZa7/bLD5KSLf+lsN8sTyXwBcuUbNayksAiOBUEpP499dL8DJz590fRHoV+2beJRdBB7 2G2mFmu0xR8KN2eiGbDx7ghGQ/pw8Tp1TB2wdaMnu0vQSgk6Fxuvhf/+DVyrBpc8RNeu 98tuttSPQAS6ZrjEB7l66sOfhBIWKmhiIEDWw4GxxryoQ4tDtNQpEeOvcHyeM76vT7Nv P3XYYwP3hb+GguS1Pbmcnc1vQtfi7PvqKmY1q3KH8lQaohfsJbWLo3A6B4K1rOvd3G3R xPTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693944867; x=1694549667; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d+Zid8tklD0Vq2m7Y1qHKgC5q0G+0QWhLe6uXMzDgqE=; b=klmXmrnYVepfLcaf2t7vHukZrMHtq61/79J8ZTK6wSfdBFQd3M3rtpy/Ce0X9iNkqv fMjMWMKZ1OzTGq28asrsHKbZqGxFdb/c6xzXzf/AVz2GIFUZMsUcUpAJICB0rTBisBAR GZiXpWQraTbgJrOmTCVrhMbMmBPJrzvMP0l6m8uqF4Dv6J7rvLHsp8Fq5IM/gsHAk+IG +LQRljLH3vO2CRtzK4aUiyb/pyccTg5hgmaysFBsdcQrGYgAvw+lQUdpg1gp+nHPiVcd or7OXwODsGe+fcuWDDlynyTIE9xCiWQXQXi43k6weqZGdEHE/JFQlVhoSSbQ0/m/tqKS 1JLg== X-Gm-Message-State: AOJu0YyRWBludN8ucPeUP8CRdJIIhigFA2x/Th3lHrh5KrDbYb8xXlIj vC9nqrMQivcRz5g9GcLlnZCuNgI2rjvRwSfilA== X-Google-Smtp-Source: AGHT+IEEDgId3wslV+Go8FvCypuJbZn0c9BkiOuBI+30aj5KqFSpQZT+Our4TSJpbwgjUdbop+2wUJN14alEi2X38As= X-Received: by 2002:a05:6512:2083:b0:4fe:179a:18d2 with SMTP id t3-20020a056512208300b004fe179a18d2mr664065lfr.21.1693944867007; Tue, 05 Sep 2023 13:14:27 -0700 (PDT) MIME-Version: 1.0 References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> In-Reply-To: <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> From: Paul Pogonyshev <pogonyshev@HIDDEN> Date: Tue, 5 Sep 2023 22:14:15 +0200 Message-ID: <CAG7BpargG0NQo2w7h=x9nGuaWV6HfbZ_BncVpDrBNUkP=dGHwA@HIDDEN> Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed To: Eli Zaretskii <eliz@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000112f750604a2468a" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000112f750604a2468a Content-Type: text/plain; charset="UTF-8" Ah, `debug-on-error' makes `with-demoted-errors' not demote it. It seems in my case `debug-on-error' is let-bound in `ert--run-test-internal'. I.e. when file is failed to be opened inside a ERT-based test, there is no warning, it's a hard error. I happen to run ERT tests inside a Docker container. I'm not sure if it is a bug, but it does cause problems. Paul On Tue, 5 Sept 2023 at 22:06, Paul Pogonyshev <pogonyshev@HIDDEN> wrote: > From what I see it's not just a warning: > > $ emacs --batch --eval "(let ((debug-on-error t)) (setf vc-git-program > \"git-is-not-installed\") (find-file-noselect \"whatever\"))" > Debugger entered--Lisp error: (file-missing "Searching for program" "No > such file or directory" "git-is-not-installed") > call-process("git-is-not-installed" nil (t nil) nil "--no-pager" > "ls-files" "-c" "-z" "--" "whatever") > process-file("git-is-not-installed" nil (t nil) nil "--no-pager" > "ls-files" "-c" "-z" "--" "whatever") > vc-git--call((t nil) "ls-files" "-c" "-z" "--" "whatever") > vc-git--out-ok("ls-files" "-c" "-z" "--" "whatever") > vc-git-registered("/home/paul/eldev/whatever") > vc-git-registered("/home/paul/eldev/whatever") > vc-call-backend(Git registered "/home/paul/eldev/whatever") > #f(compiled-function (b) #<bytecode 0x15a622e462a366fe>)(Git) > mapc(#f(compiled-function (b) #<bytecode 0x15a622e462a366fe>) (RCS CVS > SVN SCCS SRC Bzr Git Hg)) > vc-registered("/home/paul/eldev/whatever") > vc-backend("/home/paul/eldev/whatever") > vc-refresh-state() > run-hooks(find-file-hook) > after-find-file(t t) > find-file-noselect-1(#<buffer whatever> "~/eldev/whatever" nil nil > "~/eldev/whatever" nil) > find-file-noselect("whatever") > (let ((debug-on-error t)) (setf vc-git-program "git-is-not-installed") > (find-file-noselect "whatever")) > command-line-1(("--eval" "(let ((debug-on-error t)) (setf vc-git-program > \"gi...")) > command-line() > normal-top-level() > > Paul > > On Tue, 5 Sept 2023 at 21:44, Eli Zaretskii <eliz@HIDDEN> wrote: > >> > From: Paul Pogonyshev <pogonyshev@HIDDEN> >> > Date: Tue, 5 Sep 2023 20:54:54 +0200 >> > >> > To reproduce: >> > >> > 1. Change current directory to a Git checkout (e.g. `~/git/emacs' or >> something). >> > 2. From the command line: >> > >> > $ emacs --batch --eval "(progn (setf vc-git-program >> \"git-is-not-installed\") (find-file-noselect >> > \"whatever\"))" >> > Error: (file-missing "Searching for program" "No such file or >> directory" "git-is-not-installed") >> > >> > Expected: Emacs is able to open the file, Git must not be essential. >> >> Emacs does open the file; what you see is not an error, it's a >> message. The code which tries to invoke Git runs with-demoted-errors, >> so any error is converted to a simple message. If you try this >> variant of your command: >> >> $ emacs --batch --eval "(progn (setf vc-git-program >> \"git-is-not-installed\") (message \"%s\" (find-file-noselect \"README\")))" >> >> you will see: >> >> Error: (file-missing "Searching for program" "No such file or >> directory" "git-is-not-installed") >> README >> >> That "README" at the end means that find-file-noselect did read the >> file into its buffer, and the error message is just a message. >> >> So if this somehow prevented you from doing something, please tell >> more, or maybe the recipe needs more steps? >> > --000000000000112f750604a2468a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Ah, `debug-on-error' makes `with-demoted-errors' n= ot demote it.<div><br></div><div>It seems in my case `debug-on-error' i= s let-bound in `ert--run-test-internal'. I.e. when file is failed to be= opened inside a ERT-based test, there is no warning, it's a hard error= . I happen to run ERT tests inside a Docker container.</div><div><br></div>= <div>I'm not sure if it is a bug, but it does cause problems.</div><div= ><br></div><div>Paul</div></div><br><div class=3D"gmail_quote"><div dir=3D"= ltr" class=3D"gmail_attr">On Tue, 5 Sept 2023 at 22:06, Paul Pogonyshev <= ;<a href=3D"mailto:pogonyshev@HIDDEN">pogonyshev@HIDDEN</a>> wrote= :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.= 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"lt= r"><div>From what I see it's not just a warning:</div><div><br></div>$ = emacs --batch --eval "(let ((debug-on-error t)) (setf vc-git-program \= "git-is-not-installed\") (find-file-noselect \"whatever\&quo= t;))"<br>Debugger entered--Lisp error: (file-missing "Searching f= or program" "No such file or directory" "git-is-not-ins= talled")<br>=C2=A0 call-process("git-is-not-installed" nil (= t nil) nil "--no-pager" "ls-files" "-c" "= ;-z" "--" "whatever")<br>=C2=A0 process-file("= ;git-is-not-installed" nil (t nil) nil "--no-pager" "ls= -files" "-c" "-z" "--" "whatever&qu= ot;)<br>=C2=A0 vc-git--call((t nil) "ls-files" "-c" &qu= ot;-z" "--" "whatever")<br>=C2=A0 vc-git--out-ok(&= quot;ls-files" "-c" "-z" "--" "what= ever")<br>=C2=A0 vc-git-registered("/home/paul/eldev/whatever&quo= t;)<br>=C2=A0 vc-git-registered("/home/paul/eldev/whatever")<br>= =C2=A0 vc-call-backend(Git registered "/home/paul/eldev/whatever"= )<br>=C2=A0 #f(compiled-function (b) #<bytecode 0x15a622e462a366fe>)(= Git)<br>=C2=A0 mapc(#f(compiled-function (b) #<bytecode 0x15a622e462a366= fe>) (RCS CVS SVN SCCS SRC Bzr Git Hg))<br>=C2=A0 vc-registered("/h= ome/paul/eldev/whatever")<br>=C2=A0 vc-backend("/home/paul/eldev/= whatever")<br>=C2=A0 vc-refresh-state()<br>=C2=A0 run-hooks(find-file-= hook)<br>=C2=A0 after-find-file(t t)<br>=C2=A0 find-file-noselect-1(#<bu= ffer whatever> "~/eldev/whatever" nil nil "~/eldev/whatev= er" nil)<br>=C2=A0 find-file-noselect("whatever")<br>=C2=A0 = (let ((debug-on-error t)) (setf vc-git-program "git-is-not-installed&q= uot;) (find-file-noselect "whatever"))<br>=C2=A0 command-line-1((= "--eval" "(let ((debug-on-error t)) (setf vc-git-program \&q= uot;gi..."))<br>=C2=A0 command-line()<br>=C2=A0 normal-top-level()<br>= <div><br></div><div>Paul</div></div><br><div class=3D"gmail_quote"><div dir= =3D"ltr" class=3D"gmail_attr">On Tue, 5 Sept 2023 at 21:44, Eli Zaretskii &= lt;<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>> w= rote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p= x 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> From:= Paul Pogonyshev <<a href=3D"mailto:pogonyshev@HIDDEN" target=3D"_bla= nk">pogonyshev@HIDDEN</a>><br> > Date: Tue, 5 Sep 2023 20:54:54 +0200<br> > <br> > To reproduce:<br> > <br> > 1. Change current directory to a Git checkout (e.g. `~/git/emacs' = or something).<br> > 2. From the command line:<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 $ emacs --batch --eval "(progn (setf v= c-git-program \"git-is-not-installed\") (find-file-noselect<br> > \"whatever\"))"<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 Error: (file-missing "Searching for pr= ogram" "No such file or directory" "git-is-not-installe= d")<br> > <br> > Expected: Emacs is able to open the file, Git must not be essential.<b= r> <br> Emacs does open the file; what you see is not an error, it's a<br> message.=C2=A0 The code which tries to invoke Git runs with-demoted-errors,= <br> so any error is converted to a simple message.=C2=A0 If you try this<br> variant of your command:<br> <br> =C2=A0 $ emacs --batch --eval "(progn (setf vc-git-program \"git-= is-not-installed\") (message \"%s\" (find-file-noselect \&qu= ot;README\")))"<br> <br> you will see:<br> <br> =C2=A0 Error: (file-missing "Searching for program" "No such= file or directory" "git-is-not-installed")<br> =C2=A0 README<br> <br> That "README" at the end means that find-file-noselect did read t= he<br> file into its buffer, and the error message is just a message.<br> <br> So if this somehow prevented you from doing something, please tell<br> more, or maybe the recipe needs more steps?<br> </blockquote></div> </blockquote></div> --000000000000112f750604a2468a--
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 5 Sep 2023 20:06:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 16:06:25 2023 Received: from localhost ([127.0.0.1]:59512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdcJd-0005do-95 for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 16:06:25 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:51488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pogonyshev@HIDDEN>) id 1qdcJZ-0005dZ-Fl for 65763 <at> debbugs.gnu.org; Tue, 05 Sep 2023 16:06:24 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50079d148aeso4915989e87.3 for <65763 <at> debbugs.gnu.org>; Tue, 05 Sep 2023 13:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693944373; x=1694549173; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/lUWsAiXJmlz/30xhW0c2CNvCnvvYP1FcvK7BWdGS7Q=; b=AH13Sbg00o32ihSHPkwddk+X8/tNjI4Xtw8mCpjLl/h/pwNVX6tubByAfNvMDW6obZ FcK4I52s+gLPGUqk8iVcKk/QEnbYohS9qIhcPZPGtCYBUDCf/8tCObmU1Yt8CH5MFoov qEFd35NXUplVQ+b1Y75cAKutt8e9jQl85nkmOaPGie6xYH3AeCOp25natUjTwIy/FnGf kxvkMpyeaJJFDS9ecfrAZuYBCOITc+pW6Tdc87HPX+wolnxrsEGM/XM3thPOEy0Gr5sh jG0w6LBVrmcViLwAzjZERTrpfwTXD5elvKzR5Q1oAbjt3SzUKccsPX7KvnCSA7ndFS0y qBkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693944373; x=1694549173; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/lUWsAiXJmlz/30xhW0c2CNvCnvvYP1FcvK7BWdGS7Q=; b=aRgcDp5FabDGm89/UQEzWWLsYu9QU0uy4ZWeXl6prVrhVuN4G+fvim0U+zTrJPKwEJ +DyJNPa6gzay9oyBAZpHc/XgyfYEppyGKeNmJgem/boSWHYnTFMnrVY/IIXfmMeKMBMe Nl7q/ObJWc+Xzor6olhzmwSAVOI756XIWphM7ETNzXXQYsIiIGIRK7eWuF9OJVG2IVFp DLHs3+VUI5GlEoCsVvMKDaBZWv60gS7xXAypPIKYbIXr2KqM+IQsELeXxpk+yWhxXZPs n5Aul7GLbuaaolzJXKMxJh6hwr2RxrXqKhxIJMCAjGpwG0Xn5ecdPrYBw35U7sE1/g5/ XnLA== X-Gm-Message-State: AOJu0Yys3zlPfka/xWLrKMa+mx0YXnd3w/DtsrjWfnZCqb1GdBUA9+d6 iIjJJga1gz9lDQcQTMUSJU2dbghePED1NNUxS2mDK1wU/Q== X-Google-Smtp-Source: AGHT+IGSYl0K+J+PNeg9/coNrWjp63/f575ry+xTSpC09UkVNHtP1Nlcok1qnxzeO1gr+fn4atDF9M7ad0/PxDDjNvk= X-Received: by 2002:ac2:58ce:0:b0:500:953b:d112 with SMTP id u14-20020ac258ce000000b00500953bd112mr553678lfo.27.1693944373105; Tue, 05 Sep 2023 13:06:13 -0700 (PDT) MIME-Version: 1.0 References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> <831qfc4d7h.fsf@HIDDEN> In-Reply-To: <831qfc4d7h.fsf@HIDDEN> From: Paul Pogonyshev <pogonyshev@HIDDEN> Date: Tue, 5 Sep 2023 22:06:01 +0200 Message-ID: <CAG7Bpaq0fCF5qzvUCyD4kYQrk8rZ6V_vEZYo_ykVcwaPHcABjg@HIDDEN> Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed To: Eli Zaretskii <eliz@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000a0da710604a2283b" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000a0da710604a2283b Content-Type: text/plain; charset="UTF-8" From what I see it's not just a warning: $ emacs --batch --eval "(let ((debug-on-error t)) (setf vc-git-program \"git-is-not-installed\") (find-file-noselect \"whatever\"))" Debugger entered--Lisp error: (file-missing "Searching for program" "No such file or directory" "git-is-not-installed") call-process("git-is-not-installed" nil (t nil) nil "--no-pager" "ls-files" "-c" "-z" "--" "whatever") process-file("git-is-not-installed" nil (t nil) nil "--no-pager" "ls-files" "-c" "-z" "--" "whatever") vc-git--call((t nil) "ls-files" "-c" "-z" "--" "whatever") vc-git--out-ok("ls-files" "-c" "-z" "--" "whatever") vc-git-registered("/home/paul/eldev/whatever") vc-git-registered("/home/paul/eldev/whatever") vc-call-backend(Git registered "/home/paul/eldev/whatever") #f(compiled-function (b) #<bytecode 0x15a622e462a366fe>)(Git) mapc(#f(compiled-function (b) #<bytecode 0x15a622e462a366fe>) (RCS CVS SVN SCCS SRC Bzr Git Hg)) vc-registered("/home/paul/eldev/whatever") vc-backend("/home/paul/eldev/whatever") vc-refresh-state() run-hooks(find-file-hook) after-find-file(t t) find-file-noselect-1(#<buffer whatever> "~/eldev/whatever" nil nil "~/eldev/whatever" nil) find-file-noselect("whatever") (let ((debug-on-error t)) (setf vc-git-program "git-is-not-installed") (find-file-noselect "whatever")) command-line-1(("--eval" "(let ((debug-on-error t)) (setf vc-git-program \"gi...")) command-line() normal-top-level() Paul On Tue, 5 Sept 2023 at 21:44, Eli Zaretskii <eliz@HIDDEN> wrote: > > From: Paul Pogonyshev <pogonyshev@HIDDEN> > > Date: Tue, 5 Sep 2023 20:54:54 +0200 > > > > To reproduce: > > > > 1. Change current directory to a Git checkout (e.g. `~/git/emacs' or > something). > > 2. From the command line: > > > > $ emacs --batch --eval "(progn (setf vc-git-program > \"git-is-not-installed\") (find-file-noselect > > \"whatever\"))" > > Error: (file-missing "Searching for program" "No such file or > directory" "git-is-not-installed") > > > > Expected: Emacs is able to open the file, Git must not be essential. > > Emacs does open the file; what you see is not an error, it's a > message. The code which tries to invoke Git runs with-demoted-errors, > so any error is converted to a simple message. If you try this > variant of your command: > > $ emacs --batch --eval "(progn (setf vc-git-program > \"git-is-not-installed\") (message \"%s\" (find-file-noselect \"README\")))" > > you will see: > > Error: (file-missing "Searching for program" "No such file or directory" > "git-is-not-installed") > README > > That "README" at the end means that find-file-noselect did read the > file into its buffer, and the error message is just a message. > > So if this somehow prevented you from doing something, please tell > more, or maybe the recipe needs more steps? > --000000000000a0da710604a2283b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>From what I see it's not just a warning:</div><di= v><br></div>$ emacs --batch --eval "(let ((debug-on-error t)) (setf vc= -git-program \"git-is-not-installed\") (find-file-noselect \"= ;whatever\"))"<br>Debugger entered--Lisp error: (file-missing &qu= ot;Searching for program" "No such file or directory" "= git-is-not-installed")<br>=C2=A0 call-process("git-is-not-install= ed" nil (t nil) nil "--no-pager" "ls-files" "= -c" "-z" "--" "whatever")<br>=C2=A0 proc= ess-file("git-is-not-installed" nil (t nil) nil "--no-pager&= quot; "ls-files" "-c" "-z" "--" &qu= ot;whatever")<br>=C2=A0 vc-git--call((t nil) "ls-files" &quo= t;-c" "-z" "--" "whatever")<br>=C2=A0 vc= -git--out-ok("ls-files" "-c" "-z" "--&qu= ot; "whatever")<br>=C2=A0 vc-git-registered("/home/paul/elde= v/whatever")<br>=C2=A0 vc-git-registered("/home/paul/eldev/whatev= er")<br>=C2=A0 vc-call-backend(Git registered "/home/paul/eldev/w= hatever")<br>=C2=A0 #f(compiled-function (b) #<bytecode 0x15a622e46= 2a366fe>)(Git)<br>=C2=A0 mapc(#f(compiled-function (b) #<bytecode 0x1= 5a622e462a366fe>) (RCS CVS SVN SCCS SRC Bzr Git Hg))<br>=C2=A0 vc-regist= ered("/home/paul/eldev/whatever")<br>=C2=A0 vc-backend("/hom= e/paul/eldev/whatever")<br>=C2=A0 vc-refresh-state()<br>=C2=A0 run-hoo= ks(find-file-hook)<br>=C2=A0 after-find-file(t t)<br>=C2=A0 find-file-nosel= ect-1(#<buffer whatever> "~/eldev/whatever" nil nil "~= /eldev/whatever" nil)<br>=C2=A0 find-file-noselect("whatever"= ;)<br>=C2=A0 (let ((debug-on-error t)) (setf vc-git-program "git-is-no= t-installed") (find-file-noselect "whatever"))<br>=C2=A0 com= mand-line-1(("--eval" "(let ((debug-on-error t)) (setf vc-gi= t-program \"gi..."))<br>=C2=A0 command-line()<br>=C2=A0 normal-to= p-level()<br><div><br></div><div>Paul</div></div><br><div class=3D"gmail_qu= ote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, 5 Sept 2023 at 21:44, El= i Zaretskii <<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>> wrote:= <br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8= ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> From: Paul= Pogonyshev <<a href=3D"mailto:pogonyshev@HIDDEN" target=3D"_blank">p= ogonyshev@HIDDEN</a>><br> > Date: Tue, 5 Sep 2023 20:54:54 +0200<br> > <br> > To reproduce:<br> > <br> > 1. Change current directory to a Git checkout (e.g. `~/git/emacs' = or something).<br> > 2. From the command line:<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 $ emacs --batch --eval "(progn (setf v= c-git-program \"git-is-not-installed\") (find-file-noselect<br> > \"whatever\"))"<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 Error: (file-missing "Searching for pr= ogram" "No such file or directory" "git-is-not-installe= d")<br> > <br> > Expected: Emacs is able to open the file, Git must not be essential.<b= r> <br> Emacs does open the file; what you see is not an error, it's a<br> message.=C2=A0 The code which tries to invoke Git runs with-demoted-errors,= <br> so any error is converted to a simple message.=C2=A0 If you try this<br> variant of your command:<br> <br> =C2=A0 $ emacs --batch --eval "(progn (setf vc-git-program \"git-= is-not-installed\") (message \"%s\" (find-file-noselect \&qu= ot;README\")))"<br> <br> you will see:<br> <br> =C2=A0 Error: (file-missing "Searching for program" "No such= file or directory" "git-is-not-installed")<br> =C2=A0 README<br> <br> That "README" at the end means that find-file-noselect did read t= he<br> file into its buffer, and the error message is just a message.<br> <br> So if this somehow prevented you from doing something, please tell<br> more, or maybe the recipe needs more steps?<br> </blockquote></div> --000000000000a0da710604a2283b--
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at 65763) by debbugs.gnu.org; 5 Sep 2023 19:44:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 15:44:58 2023 Received: from localhost ([127.0.0.1]:59402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdbys-0004y5-Ir for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 15:44:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qdbyq-0004xp-4v for 65763 <at> debbugs.gnu.org; Tue, 05 Sep 2023 15:44:56 -0400 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 <eliz@HIDDEN>) id 1qdbyk-0006Dl-46; Tue, 05 Sep 2023 15:44:50 -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=Zz6DTFXMnpiTUehstQeETOQ4jfrSC6fOc0fzSqlgAXE=; b=Nvqz1bupYmTa M53kzCsU4dTdFAwJguSjhpTZYV5SUQWR/EICRccM6NHIJihZaxM8NkpXpOu9QoNeHpDefRsiXOuGO VhTCnRNcfmpPbEVqlCDmyyimxxzKGfIJ57Sl23/M8cQXFd2s1y5Wjva/anEawH+ND11gTPWhC7uut Z4Q72nCPod3mYOTWu4CZWoyLS3Nb2P6FbiDhe1SnxZPHcDj+UJLkjp7VGS41ld9sOpOJrbu4I0/d3 X++yTQzTEllsspWCV8qguyZThe6+UlyZbXMnzqZ3dBOSdy6cONFJ8VT6P2/uHbhd42/wgzsakfVNt 59cvre/AzbyHhZ9n2IVJ0g==; Date: Tue, 05 Sep 2023 22:44:34 +0300 Message-Id: <831qfc4d7h.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Paul Pogonyshev <pogonyshev@HIDDEN> In-Reply-To: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> (message from Paul Pogonyshev on Tue, 5 Sep 2023 20:54:54 +0200) Subject: Re: bug#65763: Error opening a file from a Git working directory if Git is not installed References: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65763 Cc: 65763 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Paul Pogonyshev <pogonyshev@HIDDEN> > Date: Tue, 5 Sep 2023 20:54:54 +0200 > > To reproduce: > > 1. Change current directory to a Git checkout (e.g. `~/git/emacs' or something). > 2. From the command line: > > $ emacs --batch --eval "(progn (setf vc-git-program \"git-is-not-installed\") (find-file-noselect > \"whatever\"))" > Error: (file-missing "Searching for program" "No such file or directory" "git-is-not-installed") > > Expected: Emacs is able to open the file, Git must not be essential. Emacs does open the file; what you see is not an error, it's a message. The code which tries to invoke Git runs with-demoted-errors, so any error is converted to a simple message. If you try this variant of your command: $ emacs --batch --eval "(progn (setf vc-git-program \"git-is-not-installed\") (message \"%s\" (find-file-noselect \"README\")))" you will see: Error: (file-missing "Searching for program" "No such file or directory" "git-is-not-installed") README That "README" at the end means that find-file-noselect did read the file into its buffer, and the error message is just a message. So if this somehow prevented you from doing something, please tell more, or maybe the recipe needs more steps?
bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 5 Sep 2023 18:55:20 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 14:55:20 2023 Received: from localhost ([127.0.0.1]:59271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdbCq-0003hd-AZ for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 14:55:20 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pogonyshev@HIDDEN>) id 1qdbCo-0003hQ-9l for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 14:55:18 -0400 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 <pogonyshev@HIDDEN>) id 1qdbCi-00056Z-15 for bug-gnu-emacs@HIDDEN; Tue, 05 Sep 2023 14:55:12 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pogonyshev@HIDDEN>) id 1qdbCf-00054t-9O for bug-gnu-emacs@HIDDEN; Tue, 05 Sep 2023 14:55:11 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-500c37d479aso4530873e87.2 for <bug-gnu-emacs@HIDDEN>; Tue, 05 Sep 2023 11:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693940106; x=1694544906; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qEYvvgypcJ1sbv2fg/5QSjND/NbA5aVfToD95TqpEt8=; b=T1B8xpqhsiDDoGVDGllQvzpciDFRhMGQDBnXCXNYhfKfADJPkOz4OdG9dNn0kLZBqr ZRdFrwLtzs2KCnMmLy3pSGiYzI8KbALewz0e8oYM9CiceQ9h5CWInbYCYZlxygJOD7M5 TYf2vsF+VLVZVI/f91ujWZ+7qjmS7SUZSgJS0fbSZfhDeGIkiZkAS2rXNjpMEpE3UZY2 CQlUhLyNBlCNgbPrJOOwu6zyyOyawr+gIaiBwn1XQ+q9tNKMhEUa7TOWZWidrt//CMZ/ rHuJRJGGXYTu49sQsf5Bq+nILebDYUoWyU+0CsNnLkAFS7y/WkUKbM3+KJGXL4yYwn9I SgRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693940107; x=1694544907; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qEYvvgypcJ1sbv2fg/5QSjND/NbA5aVfToD95TqpEt8=; b=igJ9pPFJccHOZulqxz49ZmHBlQG8RrMULp8gkOoH5CJih//T/YqXRdTPDn7fXM7wIm JaZIzNIlKbNVSKTIp9/tvLelXpOcY/IQUwHH+t8DPMmsBT1IcPt3Ri7/uruKddQI5d8B Rtpyqcz/UL/tvva9Xj0wj8ndvxCnAEhPJzf+gwOlPjNf+9w7JcrILX7quRGzCkFqE6aI xQ89dVWCDOjuVMZ99PqXJZwpaSznzy7ZOrncGlicejnSnDXqpyWjAralEn5ad9gxpxTx clio8wkzBy3XxlYkjAPQaYezAXkwtyBI/8M/l4UcuJEvTEQe8VCFizKvbstyHpWUoKEy Ta0Q== X-Gm-Message-State: AOJu0Ywm3asP81I47r1CYW0X1fiwFT0EW2ypiggO3CuHswM8O0NpOFd+ Q8NE3G+dxtKC9doJ0FnaXkgr3pvOG4iliQ6aNRdkUvfXcw== X-Google-Smtp-Source: AGHT+IHo8PnZW2e/XOx6N7tF7vPhhHZNLrLiUT2F1AQ1mVt8MI0nYuPvZJi8D+sQppnYhTMnhqERYhSAd+wIp7+xxf0= X-Received: by 2002:a05:6512:3254:b0:500:a694:46f with SMTP id c20-20020a056512325400b00500a694046fmr447892lfr.19.1693940106479; Tue, 05 Sep 2023 11:55:06 -0700 (PDT) MIME-Version: 1.0 From: Paul Pogonyshev <pogonyshev@HIDDEN> Date: Tue, 5 Sep 2023 20:54:54 +0200 Message-ID: <CAG7Bpao8uOdewy=MUFNjcJL1MjyPyOGfTyhbj1oU_5+JPgE9Nw@HIDDEN> Subject: Error opening a file from a Git working directory if Git is not installed To: bug-gnu-emacs@HIDDEN Content-Type: multipart/alternative; boundary="000000000000514d8d0604a12a44" Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=pogonyshev@HIDDEN; helo=mail-lf1-x134.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --000000000000514d8d0604a12a44 Content-Type: text/plain; charset="UTF-8" To reproduce: 1. Change current directory to a Git checkout (e.g. `~/git/emacs' or something). 2. From the command line: $ emacs --batch --eval "(progn (setf vc-git-program \"git-is-not-installed\") (find-file-noselect \"whatever\"))" Error: (file-missing "Searching for program" "No such file or directory" "git-is-not-installed") Expected: Emacs is able to open the file, Git must not be essential. Usecase: on the real machine Git _is_ of course installed, but then you run Emacs inside a Docker container that has _no_ Git, with a directory mapped from your physical machine. In this setup there is appearance of a Git working directory, yet Git executable is not available. Appears to work fine up to Emacs 27, broken starting with Emacs 28. Paul --000000000000514d8d0604a12a44 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">To reproduce:<br><br>1. Change current directory to a Git = checkout (e.g. `~/git/emacs' or something).<br>2. From the command line= :<br><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0$ emacs --batch --eval "(progn (se= tf vc-git-program \"git-is-not-installed\") (find-file-noselect \= "whatever\"))"<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0Error: (file-mi= ssing "Searching for program" "No such file or directory&quo= t; "git-is-not-installed")<br><br>Expected: Emacs is able to open= the file, Git must not be essential.<br><br>Usecase: on the real machine G= it _is_ of course installed, but then you run Emacs inside a Docker contain= er that has _no_ Git, with a directory mapped from your physical machine.= =C2=A0 In this setup there is appearance of a Git working directory, yet Gi= t executable is not available.<br><br>Appears to work fine up to Emacs 27, = broken starting with Emacs 28.<br><br>Paul<br></div> --000000000000514d8d0604a12a44--
Paul Pogonyshev <pogonyshev@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#65763
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.