From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 24 03:12:12 2023 Received: (at submit) by debbugs.gnu.org; 24 Jul 2023 07:12:12 +0000 Received: from localhost ([127.0.0.1]:41602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNpjn-0006Tk-Pf for submit@debbugs.gnu.org; Mon, 24 Jul 2023 03:12:12 -0400 Received: from lists.gnu.org ([2001:470:142::17]:39980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNpji-0006T7-UF for submit@debbugs.gnu.org; Mon, 24 Jul 2023 03:12:10 -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 ) id 1qNpjd-0003JZ-90 for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 03:12:01 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNpja-0002oB-0K for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 03:12:01 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7118F240028 for ; Mon, 24 Jul 2023 09:11:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690182712; bh=dHsZYToHn8J7w3AbjqyCJDTxkb1bp9joZcJ422livMk=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=izVQgtJ3kzdUaSmg/Dxh96OO7mz8jj5MdQATLUxbuswAPEjieyhounO0hbi3+iDfH Cj/0NJ3MpA7DM3gUTKEJdpassxlbBrcz1xJ0jk6voEHpG8gwTAX5AI42erdQd2idix grpCXlZ2+o+qd1mHBbs5QA64Xgk4Dso9E+VQfqIZ1DYeebakO3G2THt4Q3YTbRJaBU vCRvHIkzZCDu+DOWoNobLlqirEsrElXbUfhqdoYmgkWGytgM2AgOs7kchFCJoQUYbw HNOTPKUgdKU2Ht4OrQ9WDb8Og2ClGrjhzxemn1Kh+3b7z5X0/XjpWCIGEDTsLQishK Sr9gmwDpz5H1A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R8WYg6bFwz6tn4 for ; Mon, 24 Jul 2023 09:11:51 +0200 (CEST) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 30.0.50; write-region errs when overwriting an already open file Date: Mon, 24 Jul 2023 07:12:00 +0000 Message-ID: <87y1j53hrz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Consider the following reproducer: 1. emacs -Q 2. Evaluate the following in scratch buffer (with-temp-buffer (insert "test") (write-region nil nil "/tmp/1.txt")) 3. Open /tmp/1.txt 4. Evaluate the above sexp multiple times 5. Observe Debugger entered--Lisp error: (wrong-type-argument stringp nil) expand-file-name(nil) userlock--check-content-unchanged("/tmp/1.txt") userlock--ask-user-about-supersession-threat("/tmp/1.txt") write-region(nil nil "/tmp/1.txt") (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (progn (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) command-execute(eval-last-sexp) Expected: No error is thrown. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-07-21 built on localhost Repository revision: 7f77120683d6f150e61e11b41d75ba16ee5210a4 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Gentoo Linux -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 24 11:11:10 2023 Received: (at 64821) by debbugs.gnu.org; 24 Jul 2023 15:11:10 +0000 Received: from localhost ([127.0.0.1]:43784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNxDK-0002Uj-5i for submit@debbugs.gnu.org; Mon, 24 Jul 2023 11:11:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNxDH-0002UT-7X for 64821@debbugs.gnu.org; Mon, 24 Jul 2023 11:11:09 -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 ) id 1qNxDB-0006iV-Qi; Mon, 24 Jul 2023 11:11:01 -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=yLAjUbV9NKlbPst8onfqAUqoeSvECuSk67jmy4Qo4rw=; b=Y6TsWAtdMMxB HMlV7iuvnoB8W18fXEXV15HCrXHGcTSMPa+m4E2W6YuLLqGXJz15aSEZKP1v9hKBoeSAAEQkc/TpL IEqroqcIT3NhH8/RTHNLGGSeEoq96ppZKCM8VFWXjH+2NCIdShiiIxN8WL5uZrDFTn+YYjn3eiDpX BmZzo+Gu3b37lYGcb0bPw7KRiAMYDLlyEuh8gepPx+piESQr6OhTXKGWD97+8FkDz0Y0b5ODECl9z fwjUL/V2ZDWfAGoopQCOJJ+ZWzUO3Kao2yehis8cbbHo9USeV/2ap6oxQ7e2IyLq90p0s1Pny+bqt wSBEoZ0j5lxEl9TxVHvkyA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNxCw-0003hm-PJ; Mon, 24 Jul 2023 11:11:00 -0400 Date: Mon, 24 Jul 2023 18:11:30 +0300 Message-Id: <83zg3lqr8d.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87y1j53hrz.fsf@localhost> (message from Ihor Radchenko on Mon, 24 Jul 2023 07:12:00 +0000) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file References: <87y1j53hrz.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Mon, 24 Jul 2023 07:12:00 +0000 > > 1. emacs -Q > 2. Evaluate the following in scratch buffer > > (with-temp-buffer > (insert "test") > (write-region nil nil "/tmp/1.txt")) > > 3. Open /tmp/1.txt > 4. Evaluate the above sexp multiple times > 5. Observe > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > expand-file-name(nil) > userlock--check-content-unchanged("/tmp/1.txt") > userlock--ask-user-about-supersession-threat("/tmp/1.txt") > write-region(nil nil "/tmp/1.txt") > (progn (insert "test") (write-region nil nil "/tmp/1.txt")) > (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) > (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) > (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) > (progn (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert "test") (write-region nil nil "/tmp/1.txt")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) > elisp--eval-last-sexp(nil) > eval-last-sexp(nil) > funcall-interactively(eval-last-sexp nil) > command-execute(eval-last-sexp) > > Expected: No error is thrown. Thanks, should be fixed now on the master branch. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 25 04:16:23 2023 Received: (at 64821) by debbugs.gnu.org; 25 Jul 2023 08:16:23 +0000 Received: from localhost ([127.0.0.1]:44598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qODDS-0002c0-MV for submit@debbugs.gnu.org; Tue, 25 Jul 2023 04:16:23 -0400 Received: from mout01.posteo.de ([185.67.36.65]:44981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qODDN-0002bf-HZ for 64821@debbugs.gnu.org; Tue, 25 Jul 2023 04:16:21 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7E3A1240028 for <64821@debbugs.gnu.org>; Tue, 25 Jul 2023 10:16:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690272971; bh=YRXCvp0AEpCfcCHSKyaiAHkPUH2APFHl7L5+ceIrYX8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=m4WOzD22dpT48pC49ywtfbkp+wjVK7xOtBcryOriMJFFN6CO0hb67OzbIWsAe3iD/ 6lT7TPHojDU+BjQSTH52jqw9qo6GrySg87pRh7kZASJ0aqld7zXqs6FCWo57xTzhVB 17xCb8h0rftOZ9HwyPDlvM/3v+oq/zFivVNxC8Ck47zutYaa7tYAbEMSbB/OCf/5D6 N6cIyyb8jhkHvXs1dMH5CQm6wZSfaLrFxbO9qVi+iKBXW1DPKjuEQEPbBmSjjoSuFl Li52UQesMGrJRAw1UYmH+aVlExBZQeBtv8LX9uzONNuWdUDikB5/rg1Km5e/vcwkT7 M2qLtFFIjbEKg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R98xQ17kfz6tv5; Tue, 25 Jul 2023 10:16:09 +0200 (CEST) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file In-Reply-To: <83zg3lqr8d.fsf@gnu.org> References: <87y1j53hrz.fsf@localhost> <83zg3lqr8d.fsf@gnu.org> Date: Tue, 25 Jul 2023 08:16:23 +0000 Message-ID: <875y68s8x4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> Expected: No error is thrown. > > Thanks, should be fixed now on the master branch. I confirm the fix. Thanks! -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 25 08:18:36 2023 Received: (at 64821-done) by debbugs.gnu.org; 25 Jul 2023 12:18:36 +0000 Received: from localhost ([127.0.0.1]:44818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOGzs-0003aO-7t for submit@debbugs.gnu.org; Tue, 25 Jul 2023 08:18:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOGzq-0003aC-Mz for 64821-done@debbugs.gnu.org; Tue, 25 Jul 2023 08:18:35 -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 ) id 1qOGzk-0007oV-4q; Tue, 25 Jul 2023 08:18:28 -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=CJykdOPeLrpFW3a/5eW4kM1M179P8qCYcHKZ+Jtg1C8=; b=rhYhAkdhXxlS tS9PafGy1YAsfhBOdD3fp4iTgeAZhUijV9RyPB9wR5Laz7/g2QKUQQwE+G78IUV7ER3poo0M/UV6v 3L0Izz/3s7lnPb/k3yMdTBccutTLrIGKTwpCX/h0hmoUwBQXP/5ZeSLEvBLWMvzXVqLTBg17nzeiB wX8f3/VLPUg/I7PNCG2SYl5GxtQGGsVbSBqStWZnOVIX1rMxoo8n0/OnwUZOHQ+8sWpNSPQrsgKIt 7rZCJF3kvVmHDMpo/Wxqk/8TGG2oO73IwP9b/4T5uQiqmcU791kJZbP/jQyRtZseDxibrqfh30n9L qpPb/yJVyKxCa6Vl+zqiqA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOGzj-0008GZ-23; Tue, 25 Jul 2023 08:18:27 -0400 Date: Tue, 25 Jul 2023 15:19:13 +0300 Message-Id: <831qgwqj3y.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <875y68s8x4.fsf@localhost> (message from Ihor Radchenko on Tue, 25 Jul 2023 08:16:23 +0000) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file References: <87y1j53hrz.fsf@localhost> <83zg3lqr8d.fsf@gnu.org> <875y68s8x4.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64821-done Cc: 64821-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: 64821@debbugs.gnu.org > Date: Tue, 25 Jul 2023 08:16:23 +0000 > > Eli Zaretskii writes: > > >> Expected: No error is thrown. > > > > Thanks, should be fixed now on the master branch. > > I confirm the fix. Thanks! Thanks for testing; closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 11:07:38 2023 Received: (at 64821) by debbugs.gnu.org; 27 Jul 2023 15:07:38 +0000 Received: from localhost ([127.0.0.1]:42878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP2aY-00073f-2q for submit@debbugs.gnu.org; Thu, 27 Jul 2023 11:07:38 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:53539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP2aU-00073M-7x for 64821@debbugs.gnu.org; Thu, 27 Jul 2023 11:07:37 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fba8f2197bso1785359e87.3 for <64821@debbugs.gnu.org>; Thu, 27 Jul 2023 08:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690470448; x=1691075248; h=to:cc:date:message-id:subject:mime-version:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=QfYhx9nwxMGjhiHpZuolL+5AD1YLAGVheOq++9FNCik=; b=HZyh9TzttWeYXAJzkk4eocFh0PouFIRGpiRPN1O3+lmDgcNk78y/gRwhyybne93+++ exHX7G339fY98H5OJGRremGYfVA5Plt2Vmwswz5qcNsKRdCUnQYxflbItmiXnLh2qzys KBVD9mrGHQtqjEMN2UWty+g6Eh9R7xeyQOSmtPGUH2JHr/fR/wRNgrRQ2P90Aou/cPxg kC+pK3zdlR++Jr8du1gVCh3YhzkgUyNjJmHeKcc90YLcwXpl5s9w/58PU7776BzEj/oI 7eJ+iGyWQAcUM4IssKXM7RvPsZ+KbpOo43RUbHaLuVk4feVo+ssRw080nRP9vNEbNFjb ssSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690470448; x=1691075248; h=to:cc:date:message-id:subject:mime-version:from:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QfYhx9nwxMGjhiHpZuolL+5AD1YLAGVheOq++9FNCik=; b=Ud28Eu6pqnGjN6e3LZOgEJvaUGqN2l53ogPATmUH2qR/ZA9qH+HaELbYRtOE3s8IQD 8G7OLMw7MGi4pomLsDLL4CPGpplroxWPqctavMtMA1bEMrWiQj1pQ/TyNnMndaccpDs2 GZjJOPUJsaBeyfKRfWIGzo1caPW+htUyNGW7HAaRIHuw857cZTONCMasOa7Z1rbryA/Q OSdCJYgLOD1KhuHTNb4c0EeNrSIiv6WXjSJUZRYRwQ6g4G8c0+M7QqHuYc9v8Z5OBozN PwwCQufrzi59NlOiwIS/vT6GTGPGBY1sXSnBCuV3aF3i6o5yObZUv73qaI1RgTwGCTfT 6ydw== X-Gm-Message-State: ABy/qLZsQBMnzfE3+yc5rKwTbyT5bHe0UFhKu+6QjrIfj7lFnhgkxikd p9jqJ5b+Cx1LCDaMIg2sehSpnfQNOis= X-Google-Smtp-Source: APBJJlHh+lanRXD5w2YVhTovTpfqb3bvbigSeRkMN3g7X1mjhpSGHDjGdhNQY5enFFnoowC2dAGLtA== X-Received: by 2002:a05:6512:2354:b0:4fb:7642:88dd with SMTP id p20-20020a056512235400b004fb764288ddmr2001734lfu.67.1690470448228; Thu, 27 Jul 2023 08:07:28 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id n21-20020a195515000000b004fad5602c18sm351673lfe.73.2023.07.27.08.07.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2023 08:07:27 -0700 (PDT) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_63B30E48-5A58-487D-8461-CE7F3933A430" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: bug#64821: 30.0.50; write-region errs when overwriting an already open file Message-Id: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> Date: Thu, 27 Jul 2023 17:07:26 +0200 To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_63B30E48-5A58-487D-8461-CE7F3933A430 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii The change on master (8955853368) causes filelock-tests to fail; see = attached log. This is on macOS with an out-of-tree build. --Apple-Mail=_63B30E48-5A58-487D-8461-CE7F3933A430 Content-Disposition: attachment; filename=filelock-tests.log Content-Type: application/octet-stream; x-unix-mode=0644; name="filelock-tests.log" Content-Transfer-Encoding: 7bit GEN src/filelock-tests.log Running 6 tests (2023-07-27 17:03:57+0200, selector `(not (or (tag :unstable) (tag :nativecomp)))') (Shell command succeeded with no output) Test filelock-tests-detect-external-change backtrace: userlock--check-content-unchanged("/private/var/folders/qy/zstv16390 userlock--ask-user-about-supersession-threat("/private/var/folders/q insert("bar") (let ((create-lockfiles cl)) (write-region "foo" nil (buffer-file-na (save-current-buffer (let ((create-lockfiles cl)) (write-region "foo (unwind-protect (save-current-buffer (let ((create-lockfiles cl)) (w (progn (progn (setq buffer-file-name name) (setq buffer-file-truenam (unwind-protect (progn (progn (setq buffer-file-name name) (setq buf (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current (let ((name (concat (file-name-as-directory temp-dir) "userfile")) ( (progn (let ((name (concat (file-name-as-directory temp-dir) "userfi (unwind-protect (progn (let ((name (concat (file-name-as-directory t (let* ((coding-system-for-write nil) (temp-file (file-name-as-direct (let ((cl (car tail))) (let* ((coding-system-for-write nil) (temp-fi (while tail (let ((cl (car tail))) (let* ((coding-system-for-write n (let ((tail '(t nil))) (while tail (let ((cl (car tail))) (let* ((co (closure (t) nil (let* ((fn-101 #'not) (args-102 (condition-case err ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name filelock-tests-detect-external-change ert-run-or-rerun-test(#s(ert--stats :selector (not ...) :tests [... ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp)))) ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n command-line-1(("-L" ":../../emacs/test" "-l" "ert" "-l" "src/filelo command-line() normal-top-level() Test filelock-tests-detect-external-change condition: (wrong-type-argument stringp nil) FAILED 1/6 filelock-tests-detect-external-change (0.024295 sec) at ../../emacs/test/src/filelock-tests.el:173 passed 2/6 filelock-tests-file-locked-p-spoiled (0.001322 sec) passed 3/6 filelock-tests-kill-buffer-spoiled (0.000714 sec) passed 4/6 filelock-tests-lock-spoiled (0.000609 sec) passed 5/6 filelock-tests-lock-unlock-no-errors (0.001055 sec) passed 6/6 filelock-tests-unlock-spoiled (0.000917 sec) Ran 6 tests, 5 results as expected, 1 unexpected (2023-07-27 17:03:58+0200, 0.274700 sec) 1 unexpected results: FAILED filelock-tests-detect-external-change --Apple-Mail=_63B30E48-5A58-487D-8461-CE7F3933A430 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_63B30E48-5A58-487D-8461-CE7F3933A430-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 12:30:48 2023 Received: (at 64821) by debbugs.gnu.org; 27 Jul 2023 16:30:48 +0000 Received: from localhost ([127.0.0.1]:42959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP3t2-0000oK-5s for submit@debbugs.gnu.org; Thu, 27 Jul 2023 12:30:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP3t0-0000o7-4J for 64821@debbugs.gnu.org; Thu, 27 Jul 2023 12:30:46 -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 ) id 1qP3su-0001XQ-Rk; Thu, 27 Jul 2023 12:30:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ijHYKuSDfHbGfZUHw0y1YaOTDnC9XAtHphl2V+JFus0=; b=XhaFR7GrEENGx10poXJl v1J5pf0g14IX49OGl9WS9g0VXRh8O/cpysfgqFuexNBz38xJG3UVr1sl+oW/77jA07XmAeCzuDvyV wkAKAsRJ7atc66lb5ojfcsuRz6rxbDWWS0mSySmJZg1HhrKOS6wE8Z5GJNFxRuncZb+Fwc6GXIuOT w5cv3Y12LgIFr6xrS53etv3rkhGJRSXAyPXdos+OYd6Q6g4lc8JdkqqYrIPGfRFjIp61i6jYPm8zw SrJaDfIYr8JWdCRem+aZLhws5MXj7PUIeV6BpjAw3NP7KiYB7UxFxHG4UMF8Az1KTDtZQ1WrIASpy n0fTKiPH2ZBNIw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qP3st-0008Pr-OU; Thu, 27 Jul 2023 12:30:40 -0400 Date: Thu, 27 Jul 2023 19:31:30 +0300 Message-Id: <83mszhl3j1.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Thu, 27 Jul 2023 17:07:26 +0200) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file References: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Thu, 27 Jul 2023 17:07:26 +0200 > Cc: Ihor Radchenko , > 64821@debbugs.gnu.org > > The change on master (8955853368) causes filelock-tests to fail; see attached log. > This is on macOS with an out-of-tree build. Sorry, I cannot reproduce this on any system to which I have access. Would you mind running the failing test under Edebug and telling which part in userlock.el signals an error, and why? Is that this line: (with-current-buffer (get-file-buffer (file-truename filename)) (set-visited-file-modtime)) If so, does it mean file-truename returns nil? From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 13:47:59 2023 Received: (at 64821) by debbugs.gnu.org; 27 Jul 2023 17:47:59 +0000 Received: from localhost ([127.0.0.1]:43106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP55i-0002vH-Ci for submit@debbugs.gnu.org; Thu, 27 Jul 2023 13:47:58 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:50568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP55d-0002u0-P6 for 64821@debbugs.gnu.org; Thu, 27 Jul 2023 13:47:56 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4fb7589b187so2155893e87.1 for <64821@debbugs.gnu.org>; Thu, 27 Jul 2023 10:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690480068; x=1691084868; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=5xMvlVL64nQ5Lq044g5D97wB2m4bDE+a7ZrBnxgvKGg=; b=IEoY8UBd2XFQo4WmB+PCJ6hdegPcUBNlWDnvH+JIyNjVRNnbCe+MIUvWLItl60fRMF 0DaKoectNswnh7B16f8pRLbXegkjT1A8Ib50i24gvxh7yF8TdWsvtuHTX9vy64M0g1e0 vuAIxsPerveb3XsAAud6nQpT196OxevwprSV7v8WL9AsYgTuFzdPrWFjsep8YVTcfbEj t553ln5Fr0QORlOtbbyss7WRIzzpVO0b+TLtPVHlfk1t9yTQLq/ktlp0gWy9h51XVCQQ PbjIb197p/lFV0nXIYRUYTS4wHR4n6wl92Qg7ckSw4up2Xxx0PQ3ishAuT6U8cfj7QzL CHDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690480068; x=1691084868; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5xMvlVL64nQ5Lq044g5D97wB2m4bDE+a7ZrBnxgvKGg=; b=fwq65dOLrycntF5wVCwY3a0mERWkbaAOwYJhSoxrv/yFV83QtvzFa2lyh2KSNtjcbB JwuCrsC6xFHnwN/HAq9fqCOmmT27WLKfEQsblJHn8KgjWF1TMxMcqjT6qLAzg+Ekk9jx jjCYMF0zohekmhOL/bXb1AzPPES3rzCy/Jf1O76OuhN5GSzlJPPr23y9p5bZlS36M6F7 xkRUBdJmpNcuXOwTfCNrQPg3emz7wOmWIDMDuhdluhsAj5NCTAQrYgOUwk3mUH8Afjuu TuwVddo4C4A0o6X5iiDPANYTYkkhxIfW3nOO28TmaECa5HuB3T/Vw5kG2q1vrzLWBWUq 0ybg== X-Gm-Message-State: ABy/qLbtjByxpSJDK/r6r2lTDa8jJ/8cjk9AQXqu2/vF+7NqNCYvmgZE jJstbEEIMM4vEjcgPehZqqQ= X-Google-Smtp-Source: APBJJlGxK/nHc931+gFOuHsud23QeUCfjViEAjFoN9Uos2K9OKKoQ+sAT0GJVVU6iI6EhVOvRcAr4A== X-Received: by 2002:a05:6512:33c9:b0:4f8:7772:3dfd with SMTP id d9-20020a05651233c900b004f877723dfdmr2597061lfg.11.1690480067504; Thu, 27 Jul 2023 10:47:47 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id c12-20020ac2530c000000b004fdc8b0ee13sm407400lfh.172.2023.07.27.10.47.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2023 10:47:47 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83mszhl3j1.fsf@gnu.org> Date: Thu, 27 Jul 2023 19:47:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4F213DB7-96C1-48F2-AE87-F22136C0848E@gmail.com> References: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> <83mszhl3j1.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 27 juli 2023 kl. 18.31 skrev Eli Zaretskii : > Is that this line: >=20 > (with-current-buffer (get-file-buffer (file-truename = filename)) > (set-visited-file-modtime)) Right, and it's probably because ERT creates temporary files in = /var/something but on macOS, /var is a symlink to /private/var. In the = lines above, filename (and file-truename) is the "/private/var/..." = version. Thus get-file-buffer won't return anything because buffer-file-name = contains the non-true name, "/var/...". I have no idea if this is the right solution (probably not) but it makes = filelock-tests all pass: --- a/test/src/filelock-tests.el +++ b/test/src/filelock-tests.el @@ -38,8 +38,8 @@ filelock-tests--fixture Finally, delete the buffer and the test directory." (declare (debug (body))) `(ert-with-temp-directory temp-dir - (let ((name (concat (file-name-as-directory temp-dir) - "userfile")) + (let ((name (file-truename (concat (file-name-as-directory = temp-dir) + "userfile"))) (create-lockfiles t)) (with-temp-buffer (setq buffer-file-name name From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 15:02:12 2023 Received: (at 64821) by debbugs.gnu.org; 27 Jul 2023 19:02:12 +0000 Received: from localhost ([127.0.0.1]:43136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP6FY-00053I-DU for submit@debbugs.gnu.org; Thu, 27 Jul 2023 15:02:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP6FS-00052r-SB for 64821@debbugs.gnu.org; Thu, 27 Jul 2023 15:02:10 -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 ) id 1qP6FL-0007wF-Nt; Thu, 27 Jul 2023 15:02:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=n87IAVs1xl4iJQnZnfOxd3Nf1vty2CCTowN4NbjUOm0=; b=b4v3Xox1PHE2Cia8yMhp ePaQi9urxYcZQQm1kiDQiAxvXShBwhWyvpeX8GUWq/s4wsAsWg1iFW5YxPgp1KkeO8GnN6/sm7F36 31oIEYMZ+oJ+W5JULKt5pNekDanN8YxoODKNzE+xdH6chePJ7H8TagLM7cN3YVawUvc1hg11vF8Br XUl6IClYa5SJvVn67cX8YtaHDBh5KYnH2Wp6yDzQNQhNwY3ncGxBILKW2++p88u0q3Od1+e5O+48c 5bx6SDEXdDcQKat/IvAKbP5oNrYj9PP3bvJlQi9i1+8GiS3kneEQFhfMQWTs752gCnTzZzSjhPKed nLb8ytJkoyZa6g==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qP6FH-0005Ju-90; Thu, 27 Jul 2023 15:01:57 -0400 Date: Thu, 27 Jul 2023 22:02:45 +0300 Message-Id: <83edktkwiy.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <4F213DB7-96C1-48F2-AE87-F22136C0848E@gmail.com> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Thu, 27 Jul 2023 19:47:46 +0200) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file References: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> <83mszhl3j1.fsf@gnu.org> <4F213DB7-96C1-48F2-AE87-F22136C0848E@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Thu, 27 Jul 2023 19:47:46 +0200 > Cc: yantar92@gmail.com, > 64821@debbugs.gnu.org > > 27 juli 2023 kl. 18.31 skrev Eli Zaretskii : > > > Is that this line: > > > > (with-current-buffer (get-file-buffer (file-truename filename)) > > (set-visited-file-modtime)) > > Right, and it's probably because ERT creates temporary files in /var/something but on macOS, /var is a symlink to /private/var. In the lines above, filename (and file-truename) is the "/private/var/..." version. > Thus get-file-buffer won't return anything because buffer-file-name contains the non-true name, "/var/...". > > I have no idea if this is the right solution (probably not) but it makes filelock-tests all pass: Thanks, but I think we should make userlock.el robust in the face of such applications. How about the patch below instead? diff --git a/lisp/userlock.el b/lisp/userlock.el index 96de17d..92fea11 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -141,8 +141,10 @@ userlock--check-content-unchanged ;; modtime in that buffer, to cater to use case where the ;; file is about to be written to from some buffer that ;; doesn't visit any file, like a temporary buffer. - (with-current-buffer (get-file-buffer (file-truename filename)) - (set-visited-file-modtime)) + (let ((buf (get-file-buffer (file-truename filename)))) + (when buf + (with-current-buffer buf + (set-visited-file-modtime)))) 'unchanged))))) ;;;###autoload From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 15:49:24 2023 Received: (at 64821) by debbugs.gnu.org; 27 Jul 2023 19:49:24 +0000 Received: from localhost ([127.0.0.1]:43172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP6zE-0006eY-HG for submit@debbugs.gnu.org; Thu, 27 Jul 2023 15:49:24 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:42239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP6zA-0006eI-AX for 64821@debbugs.gnu.org; Thu, 27 Jul 2023 15:49:23 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fe0e201f87so1697907e87.0 for <64821@debbugs.gnu.org>; Thu, 27 Jul 2023 12:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690487354; x=1691092154; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=EUjgA0SyQ9PG9R3yxGI6Bd495Rm3qyUWCJbI5WuCFeU=; b=jr9JZNIDBnzud5MiEcUuU47YMFBszyfr/ahOjRRYpnvc/xfWBh7nK3rxxSPi7Nvak+ scMOASxoWyOPjeFUApdAWbfNo4eg3kV/7fUtJrslgmmXRfunjuF1Ywbn/JlkLe+niOFx G/ZCKIybMoXi/xLCEYp55PyLeJ4hqS1oCgYxsFjn8mVedaSAW4KerNCQPAAfIVbMxMV0 0Qx1WyZkgHPpyPI9EPw9zowZaw7oyAV6LRrufTprPFBA+mZ59WPfFdd2pf6r3/8tlwqM xwklK1skmBM4xHO1ktCbQYDsF+OL2DFIA+B1j8kEDHJKfCatla+L+frrBR7e94mCpo/M 8vIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690487354; x=1691092154; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=EUjgA0SyQ9PG9R3yxGI6Bd495Rm3qyUWCJbI5WuCFeU=; b=IyWOIrLfuQxXzObzFy6FUdV39OLlqJqwWvtIh7QP3Ri9+6c0iLo3VLjyU9X7wSFTWm Xa2Vv0Vme0+WX4eM3lFO46uAvKJZuEqWzXxrAQAGCcphmNhCbnGm04+eaKQJfj05gVoR dO1WJ9rYd9SQt8iwIZrcTZNBc2mHTeaKwoKey9roCVq7nUS7CbtPXe8qod/OY7AostQa P8lYdKhGhv4eALOb7EUSkMF+buI7dkO5kxxLzxiRaJTtO5QeqZg7OKlPSESkWJ3SYBIq oAyTP3vBY0qhqFGyjcGoccT6IvuapnTyz1YyzWTCQA2vbbf+vCOHUL6U0Om8kCamfyFx ExoA== X-Gm-Message-State: ABy/qLbmxJcBLedJKy09BGRTZ7ZxcHitNH3J6ZeTAgqNs8qWNyvr9AKE E+hooUCWu1BUJAChM4AX5y4= X-Google-Smtp-Source: APBJJlE5cj/9GFUwHcMLeCVBNO+6GS/AnoAQUNPHdq86zOn7QisgPsUYjt4exhwu+Wo6sT4MpPHoAw== X-Received: by 2002:a05:6512:2347:b0:4fe:1438:1236 with SMTP id p7-20020a056512234700b004fe14381236mr1265984lfu.13.1690487353785; Thu, 27 Jul 2023 12:49:13 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id z18-20020ac25df2000000b004fdb7f11b7asm448009lfq.307.2023.07.27.12.49.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2023 12:49:13 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83edktkwiy.fsf@gnu.org> Date: Thu, 27 Jul 2023 21:49:12 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <7A5C2AC9-4416-4A21-87AB-2789A0318366@gmail.com> References: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> <83mszhl3j1.fsf@gnu.org> <4F213DB7-96C1-48F2-AE87-F22136C0848E@gmail.com> <83edktkwiy.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 27 juli 2023 kl. 21.02 skrev Eli Zaretskii : > Thanks, but I think we should make userlock.el robust in the face of > such applications. How about the patch below instead? That prevent the error but the test then fails since the modtime isn't = actually changed. Maybe you can set temporary-file-directory to a directory name with a = symlink component and reproduce the problem on your system? From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 28 02:40:08 2023 Received: (at 64821) by debbugs.gnu.org; 28 Jul 2023 06:40:08 +0000 Received: from localhost ([127.0.0.1]:43518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPH8y-0006l1-Dx for submit@debbugs.gnu.org; Fri, 28 Jul 2023 02:40:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPH8u-0006kN-DV for 64821@debbugs.gnu.org; Fri, 28 Jul 2023 02:40:07 -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 ) id 1qPH8n-0004Sp-2C; Fri, 28 Jul 2023 02:39:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=BqVNll4XKgWXl46IDPSdFskRGwSLqFknrI3eILqkqXU=; b=YmwWvBkq6xSLh6r2mJxO p2CeCAq9JluXxZzw+zrBezpjVaK592gD8iKl1FMZi7gax3e/QNnjCBVSJn9ExeQp0Dun0vCjWfFug jH1wRe9/2LH0RPgMC5VfSdAPyh/sO4EnBpW3/G3nQdQ0HiXVFhjr0Kx4QTz9HYARjVqWDrvuQ2LXN DOkCOvYSR/Q1ekEXU6ice1ztXI3Na0jh/b/vajAGhs2TQi/8aPsNVghRmy3sUjbw/EmeJwS72Tc+l wHsLnQ/SluE0tPQQMz+MOJiFR7PENkTYWxB9p/U54MfaUaxaxhkKQTJp/k/QHHJb0b2/qyC5WhSxC ioZXdHKECWnfuQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPH8i-0007pf-NF; Fri, 28 Jul 2023 02:39:56 -0400 Date: Fri, 28 Jul 2023 09:40:44 +0300 Message-Id: <83y1j0k07n.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <7A5C2AC9-4416-4A21-87AB-2789A0318366@gmail.com> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Thu, 27 Jul 2023 21:49:12 +0200) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file References: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> <83mszhl3j1.fsf@gnu.org> <4F213DB7-96C1-48F2-AE87-F22136C0848E@gmail.com> <83edktkwiy.fsf@gnu.org> <7A5C2AC9-4416-4A21-87AB-2789A0318366@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Thu, 27 Jul 2023 21:49:12 +0200 > Cc: yantar92@gmail.com, > 64821@debbugs.gnu.org > > 27 juli 2023 kl. 21.02 skrev Eli Zaretskii : > > > Thanks, but I think we should make userlock.el robust in the face of > > such applications. How about the patch below instead? > > That prevent the error but the test then fails since the modtime isn't actually changed. That's okay: it just means we need to install your suggested patch to the test as well. Here, done. Can you test and see that the test now succeeds for you? From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 28 05:01:24 2023 Received: (at 64821) by debbugs.gnu.org; 28 Jul 2023 09:01:24 +0000 Received: from localhost ([127.0.0.1]:43610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPJLf-00051z-Os for submit@debbugs.gnu.org; Fri, 28 Jul 2023 05:01:23 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:53548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPJLc-00051l-BF for 64821@debbugs.gnu.org; Fri, 28 Jul 2023 05:01:22 -0400 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b9540031acso30505431fa.3 for <64821@debbugs.gnu.org>; Fri, 28 Jul 2023 02:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690534874; x=1691139674; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=M3jPthTpi6JiXPlqkdugHoISIv4i3HxMToyXWqm1YTA=; b=WKQVbaZdz5uUvyH6a1XSOl+FaobYRweU0VI1Wsc8D0hG8/ndSttNm2UJAfumhnwAsn 3IYHAmEa81JWsmJq2NZ/hg5jJ75QaafW7YnYWA07/9/V92IS8P35su4UQLFEZQiDI2x2 v9pYaWfMIRIZxtqvs36gcW1zT7eRRpMqAqDaND4TUp3850lkG8Ie/GOq1r0TmTHQXK/S kk3FcK6xnIonAUX7nY9BLDYemE0ikJzVaA5FcUnrIIQYhSzM875spNgOXtkjRKu6bzmu /u9HtT5G5Hn9yL0VZzGi2wK8hRPnsnunJyA9NiuIwtfVUhaVfHzM7cFFRgfuiKJPOHa3 x+XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690534874; x=1691139674; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=M3jPthTpi6JiXPlqkdugHoISIv4i3HxMToyXWqm1YTA=; b=eYXDm2uixyYhCM3V1rVx7kSz4UoC5zuYNbqq9NmuvAef/gdY9p0zldVz7Z9l3ybfLf gMPFbU84V+UWQjqATbND5gg6YojKxT0xnzsHxZS2/sRRqcRVbrLXLTcj/SwOf2AWwrKc eT0sHBOAJulpvwVzf1GrtCDpu/L8p9Yo5hd7oEa6YkDlgP042sMh3PGAnnfRtnEzkFZE qGOsyCi29UJz53KIhWEuevOiTTpg2cgkZPPNCcelpbTjh53lNweFe8O3lxC6EuD3281p s2E+3v6b/l7NF3M7WyzoHPIMwqOtPXMMbjsTeETNlEpRMk9Px7hMJCWUiew+ULCPvBNC 0JOA== X-Gm-Message-State: ABy/qLZzqntwvDx6Un18JLkW7v1enDSaOv13UKp0ouv4kjrFq/THlJCE mFCKHhj/63A4mCSUM84+7ks= X-Google-Smtp-Source: APBJJlHY83tKMlkb2Qxi5zkjN/a3gQC3DgF6YUwAdex8roEw2lvuvFTWKAXrNtl4MeIFNGLYoTfYWg== X-Received: by 2002:a2e:9ac8:0:b0:2b6:e2aa:8fc2 with SMTP id p8-20020a2e9ac8000000b002b6e2aa8fc2mr1125064ljj.46.1690534873780; Fri, 28 Jul 2023 02:01:13 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id s17-20020a2e98d1000000b002b32600ab9fsm816731ljj.60.2023.07.28.02.01.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2023 02:01:13 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83y1j0k07n.fsf@gnu.org> Date: Fri, 28 Jul 2023 11:01:12 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> <83mszhl3j1.fsf@gnu.org> <4F213DB7-96C1-48F2-AE87-F22136C0848E@gmail.com> <83edktkwiy.fsf@gnu.org> <7A5C2AC9-4416-4A21-87AB-2789A0318366@gmail.com> <83y1j0k07n.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 28 juli 2023 kl. 08.40 skrev Eli Zaretskii : > That's okay: it just means we need to install your suggested patch to > the test as well. Here, done. Can you test and see that the test now > succeeds for you? Yes, it succeeds. Thank you! From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 28 08:07:52 2023 Received: (at 64821) by debbugs.gnu.org; 28 Jul 2023 12:07:52 +0000 Received: from localhost ([127.0.0.1]:43960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPMG8-0004J4-Br for submit@debbugs.gnu.org; Fri, 28 Jul 2023 08:07:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPMG6-0004Is-M4 for 64821@debbugs.gnu.org; Fri, 28 Jul 2023 08:07:51 -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 ) id 1qPMG1-0004Nx-Ev; Fri, 28 Jul 2023 08:07:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=f4J03LKsoz4Z8TBlIgsf/vhXPOJ7yS913aGfbAse5Fc=; b=kSOKYVG2jDBJeMhT1h7/ QgIgzr4ceO/nvJjCeZSOE9/Guk1nmXTgoc7O0KcDhwt/4ZKV59SordCZ3ZB1vD62IdLcQmYFqgm3z Xbh6z0lQS22Mo2PMTrCJIrpf+J3vsJ3CN6tmBTR1XIJ2ZKrf9jU8dfhelfriBTP8qabXFROc08seT aPl766XmlF8HJ03Vc/LxR6Ull6jtGQA1EVlInCIWOFPwkmNyN4WkOUjIyNCjj1D4Tu39k/CtBgU8T qtDhSF8qRGRtiashebw7CVq/BvpRCKDYdX8pjqXvYB8yCcz4GYzx0bAGxc9oV7q0QTIpRWBaOtl4H aGCy1/8suOZwcw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPMFp-0001Wr-W3; Fri, 28 Jul 2023 08:07:44 -0400 Date: Fri, 28 Jul 2023 15:08:26 +0300 Message-Id: <83fs58jl1h.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 28 Jul 2023 11:01:12 +0200) Subject: Re: bug#64821: 30.0.50; write-region errs when overwriting an already open file References: <2B783248-53AF-4486-8208-74A6B0A517EE@gmail.com> <83mszhl3j1.fsf@gnu.org> <4F213DB7-96C1-48F2-AE87-F22136C0848E@gmail.com> <83edktkwiy.fsf@gnu.org> <7A5C2AC9-4416-4A21-87AB-2789A0318366@gmail.com> <83y1j0k07n.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64821 Cc: 64821@debbugs.gnu.org, yantar92@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Fri, 28 Jul 2023 11:01:12 +0200 > Cc: yantar92@gmail.com, > 64821@debbugs.gnu.org > > 28 juli 2023 kl. 08.40 skrev Eli Zaretskii : > > > That's okay: it just means we need to install your suggested patch to > > the test as well. Here, done. Can you test and see that the test now > > succeeds for you? > > Yes, it succeeds. Thank you! Great, thanks for testing. From unknown Sun Jun 22 00:59:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 26 Aug 2023 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator