From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock Date: Thu, 09 Nov 2023 21:46:53 +0200 Message-ID: <837cmqzp3m.fsf@gnu.org> References: <83sf5g1lko.fsf@gnu.org> <9d460f36-6035-da54-3abc-12171ac8977f@gutov.dev> <83jzqs1hhx.fsf@gnu.org> <57c079bf-e3a3-db45-c45a-ad6925335e2f@gutov.dev> <83il6c1ct3.fsf@gnu.org> <83fs1g19vn.fsf@gnu.org> <83bkc416q3.fsf@gnu.org> <835y2b1lnp.fsf@gnu.org> <83bkc2zx6k.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25651"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 66993@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 09 20:47:44 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r1B0B-0006SS-Rj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Nov 2023 20:47:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1Azs-0004mh-SZ; Thu, 09 Nov 2023 14:47:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1Azr-0004l1-E8 for bug-gnu-emacs@gnu.org; Thu, 09 Nov 2023 14:47:23 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1Azr-0000yW-5m for bug-gnu-emacs@gnu.org; Thu, 09 Nov 2023 14:47:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1B0U-0006x7-Dx for bug-gnu-emacs@gnu.org; Thu, 09 Nov 2023 14:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Nov 2023 19:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66993-submit@debbugs.gnu.org id=B66993.169955927426709 (code B ref 66993); Thu, 09 Nov 2023 19:48:02 +0000 Original-Received: (at 66993) by debbugs.gnu.org; 9 Nov 2023 19:47:54 +0000 Original-Received: from localhost ([127.0.0.1]:49060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1B0L-0006wj-Hf for submit@debbugs.gnu.org; Thu, 09 Nov 2023 14:47:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1B0I-0006wT-4w for 66993@debbugs.gnu.org; Thu, 09 Nov 2023 14:47:52 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1AzY-0000vv-P4; Thu, 09 Nov 2023 14:47:04 -0500 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=eaPYHX4HDcq+q3sVTOA6mgm73mONyh5HRkvbPYgp8ao=; b=dZ5+YDWWwEPB 22xY547Y07Dkl8V2Za3VBTtglewM4k3BcE1b7zzz1cAr1gwMVDaAHv0K1/Som4iPEBfJNP6Qn9rDK N8ALdFqVnVYNEpg8M0hnaDKTpwEQZ7Kg240ye/euQ4uVe+aNbDXFM1/JHGCy4gCJkRIfmrm4zBSIc qqKyWKArUW4bdFzKC/KffF2unETnPyBBXJ5qLgRi4mf5EAvXyCsi7F9VvKoi5KvxUbxFh5S2AvdHy aXO25jDDaqfw7NWss8XbKylwx/TIAXCi+1zI+E0cIEqMqZ9PO8I9gz/xq37/GGXtRvnmos2FV4ilj u3p1aVdTB/bHxOKL+w3VfQ==; In-Reply-To: (message from Spencer Baugh on Thu, 09 Nov 2023 13:01:09 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274072 Archived-At: > From: Spencer Baugh > Cc: dmitry@gutov.dev, 66993@debbugs.gnu.org > Date: Thu, 09 Nov 2023 13:01:09 -0500 > > Eli Zaretskii writes: > > Please show the result of this change on what Emacs prints in batch > > mode when this error is signaled. > > Before: > > $ ./src/emacs -Q --batch --eval '(write-region "foo" nil "~/file")' > /home/sbaugh/file locked by sbaugh@igm-qw... (pid 3781848): (s, q, p, ?)? > > Error: error ("Cannot resolve lock conflict in batch mode") > mapbacktrace(#f(compiled-function (evald func args flags) #)) > debug-early-backtrace() > debug-early(error (error "Cannot resolve lock conflict in batch mode")) > signal(error ("Cannot resolve lock conflict in batch mode")) > error("Cannot resolve lock conflict in batch mode") > ask-user-about-lock("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)") > write-region("foo" nil "~/file") > eval((write-region "foo" nil "~/file") t) > command-line-1(("--eval" "(write-region \"foo\" nil \"~/file\")")) > command-line() > normal-top-level() > Cannot resolve lock conflict in batch mode > > > After: > > $ ./src/emacs -Q --batch --eval '(write-region "foo" nil "~/file")' > /home/sbaugh/file locked by sbaugh@igm-qw... (pid 3781848): (s, q, p, ?)? > > Error: file-locked ("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)") > mapbacktrace(#f(compiled-function (evald func args flags) #)) > debug-early-backtrace() > debug-early(error (file-locked "/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)")) > signal(file-locked ("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)")) > ask-user-about-lock("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)") > write-region("foo" nil "~/file") > eval((write-region "foo" nil "~/file") t) > command-line-1(("--eval" "(write-region \"foo\" nil \"~/file\")")) > command-line() > normal-top-level() > /home/sbaugh/file: sbaugh@igm-qws-u22796a (pid 3781848) Thanks, that's what I thought: this loses information. The "Cannot resolve lock conflict in batch mode" part is important, since it explains the "file-locked" part. So please include the missing text in the list passed to 'signal' as its DATA argument, so as not to lose this explanation.