From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Apr 2025 11:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 77797@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174463192530382 (code B ref -1); Mon, 14 Apr 2025 11:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Apr 2025 11:58:45 +0000 Received: from localhost ([127.0.0.1]:46116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4ISa-0007ty-Fu for submit@debbugs.gnu.org; Mon, 14 Apr 2025 07:58:44 -0400 Received: from lists.gnu.org ([2001:470:142::17]:36486) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4ISY-0007t6-Da for submit@debbugs.gnu.org; Mon, 14 Apr 2025 07:58:43 -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 1u4IRv-0003yc-Mp for bug-gnu-emacs@gnu.org; Mon, 14 Apr 2025 07:58:07 -0400 Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u4IRt-0008Gk-Nb for bug-gnu-emacs@gnu.org; Mon, 14 Apr 2025 07:58:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1744631880; x=1745236680; i=stephen.berman@gmx.net; bh=LVtYU8WuLdKHaWzVt4563gu/TOlO46IP86nmFjvoMeI=; h=X-UI-Sender-Class:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type:cc:content-transfer-encoding:content-type:date:from: message-id:mime-version:reply-to:subject:to; b=QLbAxoM3M9AhSjE9pkitvixF3YVPz7rB28pu+iBb7sdWklqqOm7iyYM4mVb6/7kC cux6LkmrROJ0GiWYemwGzZ84UuZMRZPZr7Rti98zh2Y+iPFb1lEo2OKpB3VxR3hit ZnAavCxNko0I+GR3GjzWYCJQmkr1Qt/KuIA1aXwHD96c8O4OSOFP5Xk8/uDe/qFG2 oiPgEH3GcAscZbSkoLL4DZE+UcDQLtfkVz7SXX8tGIGLHuTFlFJ6usWZLr3EHu97j dAdR2eYaOFfrSsIN3M9qt7mrG7MFIe/+UKuMqeAkxgb+9CjpCoD5pbMlWFLTL0sk8 2vE1seKyE4c+41fz5w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.95.244]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MVvPJ-1tcyXV0Asf-00TdFB for ; Mon, 14 Apr 2025 13:58:00 +0200 From: Stephen Berman Date: Mon, 14 Apr 2025 13:57:59 +0200 Message-ID: <87sembez08.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:3SdkOZp4rDJeG0aYTIxjVFJ+C4XeZKVpE9FTMo4YLwISbiLl8uw ecb2C+NN0Yt37P1k2qKgf+DkVJDiqxpx8bh2tPyvWrL0CQP2odgOmbQ9hBXQsr6uLCALoqm srPaIi3zyZ5P96PHIq681zXUG0RyZcXm5FyhwIIbe9OmkmVf43ggs/FmmE9smv4Ebge8SEn Rh42JtARY40cj07zuNV0Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:1O2rTxaHwBw=;YUJSrvYT1Ka4TDfPr5epvq1lwAH pA/rxDyoigy0u07VaHTs1hKN0R2vGrOJpf5JnF8vl4v7R3zasg+Q+ahyW243A97YXZA6ypqka c1Kgi7VZakr3aTqGQ0VQaP0aAZe7XBWryjqV6ShmifxvRVmkrmcoYNm/mJ2UT/uoLkShN6VCJ gVD/So6KBWiByTKMhU/SJ2cyjWXT0HzilB9WRPj4SskyMVTCXg2k011bLVvn+D3QSFFMg26GT 1Yyzr4BuJ/ONl65YH+OQs/l0IUJgXmY2oESSZf+hah95aXLenR05BQkKO4A4Bsmkl4DfNqal3 qHxZZcf10GG/qsV8h2ceJCOud8f6uIrh+Ak1YO4JD0B47LJpSPHUBLuR+Urmos+ovGJ53W7LZ yxntMihUHQILWVmVaVybuRDcxJOEEV19XvyJImSflqZtpNMmgiTUU5b8d+Ofk/pZftVdJ55s2 qVmuME/pHtEEK48+BhZwnkDeyEnCpAfLFuKKWYRN5RdN9gq3WGvA5VKXJcaSRFoygNdaQajSQ XmbHa9UgeVxERP+80GB9x9P89mPvs/+qwkBCbj/M8/BRJWFoxep23wnYdZe53WGdKuYqwxkoi 35fA36iGBsQvsJQAr2/H6klK9qhUA+6NtwCPRIQlPUfqqnRfnemE2mRy+E5oUUGWrBOqtz1WN hmOtcLcPAr26vS7E3UrqpgBbNNqsi7CEHRZ3mq6d7vFTvJ6g+UO0YCwEWeYQeDtWVp/r6Xs82 RkvunViNLLdW1aRio1trVbsAxZwtzGHVtYlwdDjNAqLfzJYEgjTFXQPk8H9uT7wlizdqm18CC /EdEXRNXArI88JFtX036VTdjRo43zBigTIpYHSFpo9RMCYs59/+eQ8yZhkVIiHvE/KT0caBrC Ge/mj05Ns24P3PCAsfotgX6aRcGwcXxa/pDJhuiWxn6KIsDBMwbkIamFQ0a5k8XNwemdlbu7V dXUkNV43NDxw2WxzxOE5S4LYl4glDLwvO48N+fUh/8XdFrDZD+UK5629MI8Y8qTETqzZCTgLj xRjJuVQuP44lsWKIeCT0+1V3jzlP+BYdsraLW0AmkVAskB5hAeID63L1OmdqElGjx/dTgjY+n zvn2PSVdqFYdTeNbojMuNPLIQCN3QJAKDVR1+mhw+Mg3DmlJkE8s0hxsa8jEYaldN5ce9zeO7 OHQbsW3U65EpnzvKzLTrFZdBeDyc/Pla6NJyqx6toDFuj09T1BNBtFwIcy1AgWuYM9vvZYxl1 X5AOO9vQPPUuI3ECKEuL0rs9hD781ZqfLPWy6u6h+zoQUOEKdyh+fNmG2Co8PUEwZJIWRn4Lo yNdsel/xDHnGn8cS+yvBdscRzs1hdzLL94y65/6v+khHXQCGsuP2J+E6pY8EHYbvOsyrLjYng jleaLoaE9Nc41XOylwYexRk9bqzNtZPGwaqH/Y5J9+WK6Sdr9ALjgB/Phk7DPIURB+WDQiyvl VDG0MmBIdeqEphA0AUEE40ph3Vy4= Received-SPF: pass client-ip=212.227.17.20; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: To create an empty file (and perhaps also one or more parent directories) and then immediately visit the file (e.g., to yank some copied text into it), you currently have to type `M-x make-empty-file' [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [94.134.95.244 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) 0.0 SPOOFED_FREEMAIL No description available. 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: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: To create an empty file (and perhaps also one or more parent directories) and then immediately visit the file (e.g., to yank some copied text into it), you currently have to type `M-x make-empty-file' [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [94.134.95.244 listed in zen.spamhaus.org] 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain To create an empty file (and perhaps also one or more parent directories) and then immediately visit the file (e.g., to yank some copied text into it), you currently have to type `M-x make-empty-file', enter the file name (possibly with parent directories), and then type `C-x C-f M-p'. As a more convenient alternative to invoking two commands, I propose that invoking `make-empty-file' with a prefix argument should create and visit the empty file. Here is a simple backward compatible patch to do this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: make-empty-file patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/files.el b/lisp/files.el index ad6047bd02d..cbd2e2c0992 100644 =2D-- a/lisp/files.el +++ b/lisp/files.el @@ -6703,7 +6703,8 @@ make-empty-file "Create an empty file FILENAME. Optional arg PARENTS, if non-nil then creates parent dirs as needed. =20 -If called interactively, then PARENTS is non-nil." +If called interactively, then PARENTS is non-nil. If called with a +prefix argument, visit the newly created empty file." (interactive (let ((filename (read-file-name "Create empty file: "))) (list filename t))) @@ -6712,7 +6713,8 @@ make-empty-file (let ((paren-dir (file-name-directory filename))) (when (and paren-dir (not (file-exists-p paren-dir))) (make-directory paren-dir parents))) - (write-region "" nil filename nil 0)) + (write-region "" nil filename nil 0) + (when current-prefix-arg (find-file filename))) =20 (defconst directory-files-no-dot-files-regexp "[^.]\\|\\.\\.\\." --=-=-= Content-Type: text/plain Does anyone see a downside to this addition? An analogous patch might be desirable for `dired-create-empty-file'; however, after invoking the latter from within Dired, you just have to hit RET to visit the new empty file (possible multiple times if parent directories were also added), since point moves to the new entry. So the use case for Dired seems not as compelling as for `make-empty-file'. What do others think? (On the other hand, you can also invoke `dired-create-empty-file' from outside of Dired and in that case the prefix argument would be helpful; but that's just like `make-empty-file', so it seems to be an unintended (mis-)feature of `dired-create-empty-file', and indeed there's a proposal to opt out of this behavior, see bug#77668.) Steve Berman --=-=-=-- From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Apr 2025 13:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman Cc: 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.174463791418371 (code B ref 77797); Mon, 14 Apr 2025 13:39:03 +0000 Received: (at 77797) by debbugs.gnu.org; 14 Apr 2025 13:38:34 +0000 Received: from localhost ([127.0.0.1]:46436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4K1B-0004mE-Bv for submit@debbugs.gnu.org; Mon, 14 Apr 2025 09:38:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60320) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4K18-0004lx-7z for 77797@debbugs.gnu.org; Mon, 14 Apr 2025 09:38:30 -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 1u4K12-0006ig-PI; Mon, 14 Apr 2025 09:38:24 -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=tNdewY0Dt5mMqsqsHXTGBp9Pu6saX4ddNkQxhFnv7rA=; b=Nxj7rE735wNa lLQgf5cUrfsys6z8F4YA/EUghY0jPuoQduyyybK3kvUwY1JxPDTxu0Jg+HEgwy71JnN28syReTauX 3c07mx+c+MTEySNlHRemr6JwuM1SThMrayvqJGTyYPOjr1rGY5KwvKkuvWzQHw+S5tkRBO+pq/NFO mv+6itivQP8duMAbCMHCRmJld27/SU029mkCuTSa2GSGUFuMsAATqmOXlpzRzT82JQmFos3ACgg55 MW73E7GN1kwVScin9bArghuf7xd5OpEZYF6dTCn1Vz1HpcFaI89Yy6rBtvg6FJDlJXdMldMN7MRXG 5MwixaUPAbAogo/JvkIOXA==; Date: Mon, 14 Apr 2025 16:38:21 +0300 Message-Id: <86r01uj22a.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87sembez08.fsf@gmx.net> (bug-gnu-emacs@gnu.org) References: <87sembez08.fsf@gmx.net> X-Spam-Score: -2.3 (--) 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 (---) > Date: Mon, 14 Apr 2025 13:57:59 +0200 > From: Stephen Berman via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > To create an empty file (and perhaps also one or more parent > directories) and then immediately visit the file (e.g., to yank some > copied text into it), you currently have to type `M-x make-empty-file', > enter the file name (possibly with parent directories), and then type > `C-x C-f M-p'. That's backwards: in Emacs, you type "C-x C-f NEWFILE RET", then edit it, then save it. IOW, you don't create an empty file first, because that's not useful. The make-empty-file command exists for cases where the only desired outcome is to make an empty file. Not if the user wants to create a _new_ _non-empty_ file. > As a more convenient alternative to invoking two commands, I propose > that invoking `make-empty-file' with a prefix argument should create > and visit the empty file. Here is a simple backward compatible > patch to do this: I don't necessarily object, but please note that this is non-Emacs'y. From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Apr 2025 15:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.17446436546253 (code B ref 77797); Mon, 14 Apr 2025 15:15:02 +0000 Received: (at 77797) by debbugs.gnu.org; 14 Apr 2025 15:14:14 +0000 Received: from localhost ([127.0.0.1]:48525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4LVm-0001cn-1w for submit@debbugs.gnu.org; Mon, 14 Apr 2025 11:14:14 -0400 Received: from mout.gmx.net ([212.227.17.22]:46219) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4LVj-0001cV-RO for 77797@debbugs.gnu.org; Mon, 14 Apr 2025 11:14:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1744643644; x=1745248444; i=stephen.berman@gmx.net; bh=ZIPd0zd+DI/NByazQDOqbVxaWUn3+ve9ykf/yNGy6Vg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=dkMCCjOHEqZ+J3H5vgqSajExCDjnk4zw9drAGXu6D9Q8OZ+cel8j7R40dgZnT5VH 3MsmBYjIN6c8bkBa9oHPEcajYTUW/bSejIp9s6jb1VqHjUdom3TufIQLupqB1VEBg BNk9EyvTCN/P8RwXicwbgrCZ9Pz+1xq/TWMFBm2SMHYsYR2kP8a6EGoT9bVr+X7nT 5CfWDrWQ9djeyAe91M5uZTGyNVEtNp/zx2sPDAwpc+yaoBXruN/sjmtVUs3qm8/tj g7XjAhPVpZoepTI9SXBvytY1nUGAAY3558UHTcJCr6fBLoRsW4g7oBVnbw9FqXyi0 CMOci2+VWZ2iM2O9MA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.95.244]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MMGNC-1tmG9y1nle-00K2c2; Mon, 14 Apr 2025 17:14:04 +0200 From: Stephen Berman In-Reply-To: <86r01uj22a.fsf@gnu.org> References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> Date: Mon, 14 Apr 2025 17:14:03 +0200 Message-ID: <87o6wyg4hw.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:4PkQHCeXSZ7QNjMMxYhClnq3CSJ+OIC8nyX4XqY52MpK834G3Xk FJ8R1+mox83uoKqIiV+aZRdh9B6r0Ai3wxGSFXFTmtZ+nfMO7Gr7Y2pebvn8U9h4VCCM/Pn YRTBUXesSkl7fg7xqyHOapn4AQENCApdGeg/WMeV49n+ac/3ewjzaWYoNCcWUwRZAX3aG4E eDFnEom/5o9PIuEIz35fQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:O6J2UDcPD0I=;dquw/xMKGGPh4+OwvIEpABUBk70 a958RomBaaCGJy2nkWm5E/YwLiB7sfiBq+v4MhskGWoVAw4bx1tj+9DxC60bquqq1RXDhog+3 RBrbAVFhypO3IM212yqdQ8rk3s6gkhfeuIAvnMVhjygds8kOUpaR73PDgBo6riD/BlUEsEpVc J0vy2NnV3mQw7Z/MI0Ms5TKTI/QMAp+Gkbu7HNTaUqmNo9GlSOmes2Th3KKibqO8rQCO8nOU7 K+RHwYVt8KYr5UCOTx6rDhJ2zXi/rwpJecXbQY7+9q9uAVaCUHuuqlKLTS3elsLvwBpDPDnxc Apk0V8t/r4kJDPK/5HiWFe1SBu6uN2LNM28MjFdPPDLqowrE8/6yDfoI6hCiHqEM8Qxq1MVqE OhK/kGHB+M01GUW+G4rYWIhlRXBTIabF4UMhg+SfZi3Ii/5ReIjircG14Nqg1k5SQMLJkRPtt 4kbcXgpMoSd5VWvv8wE42H6raTdQ/ELQ9PvGWCbEFGKDoLlSTUuhmGQzkQhklsiY+0sHyPfwK 8EoP/Ar0Htaqp+3dWlJEhbcyzWBo+o+IeixqTRR6dM30a++AQ1F7xNLD9DYI3EtwE4fUbIyNc 3mXfZfA8Y8vpyQr18E8kvHF8zYTIrrL7yn+bfJyA61jm2CvAtpvHet++UQ/wTcsUCG+RH/axF t0V0IIbl1VKRRRTcR2+96TL1oqNJTfAve7bkhfxGQF/y8hwm/tUeJdWt4TjSmRCyayF/KTcnE 0OlGedCRe5JieVfAESIYWrk9pFKNUcPmMIIcUaWldCDcWqDJwJPSiiVQ0Zoxw59tGwMFPx+SZ 4CTfspbO+JCaClzqmD0x1GU3Ge0f2IiLsLvaKvG5ilz91poC9PA8jQyY+RD7cBlkYmpWvqndE 7u8cVp0YqJjkf9r6j2ErrF5smoy8i+T0w2G+kfas1ASxAQZtreODeTMY3oFmyqjohuKks2xzK nMNI3h826io7ayQoX4d6ATqetREkouPHsRDC7T7tL8j8rQRWthOMYr1acCELLR3O7VsIX0EyH PtQJy/l0WfLRZwXv4r3T6iM9kP2Eqla7OS0C6QW+3IZ9jJg69wkooA+32OtZh3RCN91JzeAZj bnB6Tk4jrrTUkIKsuOwExMZIaHlluZu6n3pSwQudN0j4SFeBB+hK/AyZClQTruLTNIkYgbHQ4 iWlRB+svpo5ERoMNjpqF7AMxjy8ZYvRkhRGm4pij0d6qMqKo321HLspfAWzSYhbJ/6lBmmUqS 0Zn3iwREd07PP8SmqjqAaJ1Amuiqpjrv+AFL1Y7qNshkc4JDVed4abMNn805C0+VUW/u0ag8t 8mAVZP9Qy3BGfYFfx8c3t8C7Y0h4/L6CWKbguiXurXjgl6DtKXP+O58aflzDqj0QXPLgYlXad GIEfFGvJAm1j0x4XdsjUHw6LNsEcB6VxV3HUJIUWiIJwm9GkSxyPGikCbuGeJHpjijaXGfsWy N1XGZFD4cwyu16b7N77IOvJj/nendTtlP9dULtB6q7UaPMrnH Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, 14 Apr 2025 16:38:21 +0300 Eli Zaretskii wrote: >> Date: Mon, 14 Apr 2025 13:57:59 +0200 >> From: Stephen Berman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> To create an empty file (and perhaps also one or more [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in bl.score.senderscore.com] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [94.134.95.244 listed in zen.spamhaus.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record 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.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, 14 Apr 2025 16:38:21 +0300 Eli Zaretskii wrote: >> Date: Mon, 14 Apr 2025 13:57:59 +0200 >> From: Stephen Berman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> To create an empty file (and perhaps also one or more [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.227.17.22 listed in bl.score.senderscore.com] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [94.134.95.244 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stephen.berman[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager On Mon, 14 Apr 2025 16:38:21 +0300 Eli Zaretskii wrote: >> Date: Mon, 14 Apr 2025 13:57:59 +0200 >> From: Stephen Berman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> To create an empty file (and perhaps also one or more parent >> directories) and then immediately visit the file (e.g., to yank some >> copied text into it), you currently have to type `M-x make-empty-file', >> enter the file name (possibly with parent directories), and then type >> `C-x C-f M-p'. > > That's backwards: in Emacs, you type "C-x C-f NEWFILE RET", then edit > it, then save it. IOW, you don't create an empty file first, because > that's not useful. It's useful in the case I noted above: yanking text into a buffer that you want to save to a file, and in particular if you want the file to be in a not-yet-existing subdirectory. In that case, with `C-x C-f' when you type `C-x C-s' you are queried (from `basic-save-buffer') and have to confirm that the subdirectory should be created, while with `make-empty-file' it already has been created. Or have I overlooked an option to suppress the confirmation query? > The make-empty-file command exists for cases where the only desired > outcome is to make an empty file. Not if the user wants to create a > _new_ _non-empty_ file. I think the above use case is valid. (Just yesterday I had occasion to do that and not being able to (without being queried about the subdirectory) is what prompted me to propose the feature.) >> As a more convenient alternative to invoking two commands, I propose >> that invoking `make-empty-file' with a prefix argument should create >> and visit the empty file. Here is a simple backward compatible >> patch to do this: > > I don't necessarily object, but please note that this is non-Emacs'y. I didn't mean to offend you :-) Since you don't necessarily object, what's the next step? Steve Berman From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Apr 2025 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman Cc: 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.174464787719233 (code B ref 77797); Mon, 14 Apr 2025 16:25:02 +0000 Received: (at 77797) by debbugs.gnu.org; 14 Apr 2025 16:24:37 +0000 Received: from localhost ([127.0.0.1]:48627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4Mbs-000509-Mk for submit@debbugs.gnu.org; Mon, 14 Apr 2025 12:24:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58346) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4Mbp-0004zn-Jp for 77797@debbugs.gnu.org; Mon, 14 Apr 2025 12:24:34 -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 1u4Mbj-00034V-Pu; Mon, 14 Apr 2025 12:24:27 -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=2YEIbFlZSnagYNXI4DI3OEeFt3eVGTj2LQM/pUTanvw=; b=Rs1mZeh1oh/h kuCh4wGH41/TZRvIVLE83geWMN5ZxdVOMegnYAtr9Qj+9lBLS0741kSHoxcc3huIF1p2MZE/Ckcn3 XOcS9iq3LsfHOM30ibHstep64mJPdW5UuzaKnZ4UQ/VW/8BvXfMy9EStHSJmC0R2ZYSBGmhIJk0wp /u73433AyknJjJxhi1w9hJ8jRj5YVyPZnJhV96EvadBm+zJcyA3exAanFZgCXNugqrQoUWxX36rz2 icCcG2g7ztiHGEdohKIoUG0Wq2CsZYMdl+GMjVPXCXYPkZkyjDGCieJxqN2+UzGmeJBNsjxDxkR6u DmpZmaO+QXFEa28124Gwkg==; Date: Mon, 14 Apr 2025 19:24:03 +0300 Message-Id: <86jz7miue4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87o6wyg4hw.fsf@gmx.net> (message from Stephen Berman on Mon, 14 Apr 2025 17:14:03 +0200) References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> <87o6wyg4hw.fsf@gmx.net> X-Spam-Score: -2.3 (--) 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: Stephen Berman > Cc: 77797@debbugs.gnu.org > Date: Mon, 14 Apr 2025 17:14:03 +0200 > > Since you don't necessarily object, what's the next step? I'd like to hear more opinions about this, since I think it takes that command in directions we didn't intend it to go. From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Apr 2025 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Stephen Berman , 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.174464995825714 (code B ref 77797); Mon, 14 Apr 2025 17:00:02 +0000 Received: (at 77797) by debbugs.gnu.org; 14 Apr 2025 16:59:18 +0000 Received: from localhost ([127.0.0.1]:48723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4N9R-0006gf-Ut for submit@debbugs.gnu.org; Mon, 14 Apr 2025 12:59:18 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:45102 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4N9P-0006gW-0O for 77797@debbugs.gnu.org; Mon, 14 Apr 2025 12:59:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1744649954; bh=OSb3RKPnkZbZwf1ONdKUgkBeG77/t0V++Rggzohcvk4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=EZ52QFCA/Hj0SZvnrO7EocBqJiMcokdqcT8pVkIanPDfJlhNw3JZgpHi3Rc7nDrUb n6RwC5CGAyzelcOk3hIWdUkVF7Qeu6VpveYBYIpLz79eVcyZg+C+rFDD9c31yNoT5s Fy00AqiGI5BXMWjiPh+guvjeGeIN4jIdFqn2ZPizfHOstQIm5oyrloCTrlQeA+7Cr1 JIBGb3nCmzuT5U64jL8+1oDxsVmB02kdif66h6to90yy0xUPUY0tPCbh1tio7C9pxq dDaSorKJzuunDimG13f7cGhD1/eTy2KDrcPyreOIHOAnTQpxey/oLs7EuKVQX22H3l EiK8Z2sb5L3Gg== From: Eshel Yaron In-Reply-To: <86jz7miue4.fsf@gnu.org> References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> <87o6wyg4hw.fsf@gmx.net> <86jz7miue4.fsf@gnu.org> Date: Mon, 14 Apr 2025 18:59:11 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Hi, Eli Zaretskii writes: >> From: Stephen Berman >> Cc: 77797@debbugs.gnu.org >> Date: Mon, 14 Apr 2025 17:14:03 +0200 >> >> Since you don't necessarily object, what's the next step? > > I'd like to hear more opinions about this, since I think it takes that > command in directions we didn't intend it to go. FWIW, I use C-x C-f to create new files all the time, also in non-existing directories. Then I save the buffer as usual, and that prompts me to create the directory if needed, which I find to be fine. So I probably wouldn't find much use for this addition. I wouldn't mind if it was added nonetheless, of course. BTW if you want to suppress the prompt for creating a new directory and always just create it when needed, you can (ab)use write-file-functions for that: --8<---------------cut here---------------start------------->8--- (defun my-ensure-dir () (let ((dir (file-name-directory (buffer-file-name)))) (unless (file-directory-p dir) (make-directory dir t))) nil) (add-hook 'write-file-functions #'my-ensure-dir) --8<---------------cut here---------------end--------------->8--- Best regards, Eshel From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Apr 2025 21:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman , Eli Zaretskii Cc: 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.17446647747287 (code B ref 77797); Mon, 14 Apr 2025 21:07:02 +0000 Received: (at 77797) by debbugs.gnu.org; 14 Apr 2025 21:06:14 +0000 Received: from localhost ([127.0.0.1]:49268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4R0Q-0001tS-65 for submit@debbugs.gnu.org; Mon, 14 Apr 2025 17:06:14 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:48487) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u4R0N-0001tA-9i for 77797@debbugs.gnu.org; Mon, 14 Apr 2025 17:06:12 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5e5e34f4e89so1037894a12.1 for <77797@debbugs.gnu.org>; Mon, 14 Apr 2025 14:06:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744664765; x=1745269565; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=F8g5A3cBQ6OO0uuwowTcUA/K9GSHDbUSyqQuWBK/jPM=; b=SN68NJtRYglEx37XsuUbt3gsD/bhkgg2dzBCpMP2oM6ZGWDAH5B6cKiMoSGlXPS5dk OUReZHRfD9DZDlnJxkWyZStB0BvfH2TIHT7AxuRupJ+SjGgw5dL3BrLQXd3NEwFaTTkk l2t/bcheDEVQk0g0ZcFqihmYJt2bhkJpkZSG6zhuSZgUw45uXvK5XSwf+Sbbx/VAlGhw EJPV/GwLMgvGmhAxF23GUfexq+U69vze4jb6zf0d+aCzj0G9gQn60ZLFCkIfmx3TBMZF 0qo8Bo3nrpvEughcNrLgHfHS1cwGJz/et5CTl2rCkrBt4haM2jaSTcu3yZvhaVH544xC pJmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744664765; x=1745269565; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F8g5A3cBQ6OO0uuwowTcUA/K9GSHDbUSyqQuWBK/jPM=; b=VjpBzX9byTQOiLXJRlIoY97qDRvUWgw14rQiRfXIERaICfZkOnyZi396+kf9igV5RG tVu1S8l220L8Yk3oabqzSEAOeFjmwprrQq3lZDvAC+gFlw5XqpUYNYSxI+fPQY1Yj9Gf dvie0Zx5NXNPN9c50gSEyk/vnk+ckQW7biwhP+l9MPFEbmXPjsey2gXYe9GjI0714GJy aiif8Si2gb2O536ktp8mYqGXWayllZA+berGlhIXpG55oeeuWgAQukj6z50lSX5VUaiR 0n3SH6Z/rteIOcABlPKpaD016lgKB2lFY2LSUCgxJlTYJMpq/8eWbYd32+rlkcHFomX0 pyWw== X-Gm-Message-State: AOJu0Yw3oBTmlJWO7XR188P22Ucuklie4+1eOxgOx2XbhNYq9/NQXBy5 JF05YOvXZiXT450gfx7Piqi7JFVj6dj1TrdPpDQkN8UQkijm8eV0QX2O+3uoWyIPMJkUiWx04aj qB8FKSek3eWL9Wvq3hf5CilNwZsM= X-Gm-Gg: ASbGncuAuJIosBRS92CV9VF7+U7xwKdmxswMUPribaXH4oBoVCm0FCD+Ng6p8aCgB+x hYHY1VnLJ6fMfnjb4mRC0f6quf54IT60sDqItKwTBaXoE21RZcOdc7CyrGhWMB5RloPPxgc3qQa 35O/VyTGsSFDPvh+pjtosTvxlcAbwLVg== X-Google-Smtp-Source: AGHT+IH9gv76usj64hLJ0cxa0rThDhXZm/kSQGFELj5Z6yNld05EcNIBOAqcOCUK05DpF4tDnfraW9CpmtI02+osvQU= X-Received: by 2002:a05:6402:1d4c:b0:5f3:4194:187 with SMTP id 4fb4d7f45d1cf-5f36fa6b1famr12499984a12.18.1744664764948; Mon, 14 Apr 2025 14:06:04 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 14 Apr 2025 16:06:04 -0500 Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 14 Apr 2025 16:06:04 -0500 From: Stefan Kangas In-Reply-To: <87o6wyg4hw.fsf@gmx.net> References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> <87o6wyg4hw.fsf@gmx.net> MIME-Version: 1.0 Date: Mon, 14 Apr 2025 16:06:04 -0500 X-Gm-Features: ATxdqUGUkqPFgNz5dh8Lcfu4DttNuAptvyY1lMaoOplE1F8EqY01O9iagsHXQyM Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > On Mon, 14 Apr 2025 16:38:21 +0300 Eli Zaretskii wrote: > >>> Date: Mon, 14 Apr 2025 13:57:59 +0200 >>> From: Stephen Berman via "Bug reports for GNU Emacs, >>> the Swiss army knife of text editors" >>> >>> To create an empty file (and perhaps also one or more parent >>> directories) and then immediately visit the file (e.g., to yank some >>> copied text into it), you currently have to type `M-x make-empty-file', >>> enter the file name (possibly with parent directories), and then type >>> `C-x C-f M-p'. >> >> That's backwards: in Emacs, you type "C-x C-f NEWFILE RET", then edit >> it, then save it. IOW, you don't create an empty file first, because >> that's not useful. > > It's useful in the case I noted above: yanking text into a buffer that > you want to save to a file, and in particular if you want the file to be > in a not-yet-existing subdirectory. In that case, with `C-x C-f' when > you type `C-x C-s' you are queried (from `basic-save-buffer') and have > to confirm that the subdirectory should be created, while with > `make-empty-file' it already has been created. Or have I overlooked an > option to suppress the confirmation query? Maybe we should add an option to suppress the query? Either as a defcustom or a prefix argument, or something. Not sure which is best, because I actually prefer the query, myself. From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Apr 2025 06:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: stephen.berman@gmx.net, 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.174469850026640 (code B ref 77797); Tue, 15 Apr 2025 06:29:02 +0000 Received: (at 77797) by debbugs.gnu.org; 15 Apr 2025 06:28:20 +0000 Received: from localhost ([127.0.0.1]:50215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4ZmN-0006vb-Q3 for submit@debbugs.gnu.org; Tue, 15 Apr 2025 02:28:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33440) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4ZmK-0006vK-Ru for 77797@debbugs.gnu.org; Tue, 15 Apr 2025 02:28:17 -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 1u4ZmF-0004Mz-IK; Tue, 15 Apr 2025 02:28:11 -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=RpL43V3AjH6NnHicrDDYLXjPI5Vos8DzDbF1gyhRWx0=; b=YSxhDGrUao2V hRz6tZkq5812cCAe5H4jkLiUzQaLK2MFm7W6lTRXkpJwul8bqR0Z7pGnqEZy1NLrNGbFCzrw30a7L 6Cu3KLGaHDw/GsrXfzkkBNqVZGQQG7gsrT0N2IoZE3dkR8QrjyL9eBtiG2Q41w8K2ZGvWQLnu3EH/ lRoe155ZAOqRlJj6RYylKitrwVCDQXPaOT4p9CUlpfynUSKBJ1NUYpEUcAno5CAM+UiTWY76AnQKA GZQL5CQxQrlteEjkFwrYH36BxGkVzs/Cxp7oGhwS6TvVKElC18xODDaJUHhnueCJohQagnLiApNBN A2EsvfgKqZ7phNnuW3icAg==; Date: Tue, 15 Apr 2025 09:28:07 +0300 Message-Id: <868qo2hrbc.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Kangas on Mon, 14 Apr 2025 16:06:04 -0500) References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> <87o6wyg4hw.fsf@gmx.net> X-Spam-Score: -2.3 (--) 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: Stefan Kangas > Date: Mon, 14 Apr 2025 16:06:04 -0500 > Cc: 77797@debbugs.gnu.org > > >> That's backwards: in Emacs, you type "C-x C-f NEWFILE RET", then edit > >> it, then save it. IOW, you don't create an empty file first, because > >> that's not useful. > > > > It's useful in the case I noted above: yanking text into a buffer that > > you want to save to a file, and in particular if you want the file to be > > in a not-yet-existing subdirectory. In that case, with `C-x C-f' when > > you type `C-x C-s' you are queried (from `basic-save-buffer') and have > > to confirm that the subdirectory should be created, while with > > `make-empty-file' it already has been created. Or have I overlooked an > > option to suppress the confirmation query? > > Maybe we should add an option to suppress the query? Either as a > defcustom or a prefix argument, or something. Not sure which is best, > because I actually prefer the query, myself. Same here: I prefer the query because it many times saves me from creating files with wrong names and/or in wrong directorties, due to simple typos. From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Apr 2025 07:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron Cc: Eli Zaretskii , 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.174470154415271 (code B ref 77797); Tue, 15 Apr 2025 07:20:02 +0000 Received: (at 77797) by debbugs.gnu.org; 15 Apr 2025 07:19:04 +0000 Received: from localhost ([127.0.0.1]:50336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4aZU-0003yE-3d for submit@debbugs.gnu.org; Tue, 15 Apr 2025 03:19:04 -0400 Received: from mout.gmx.net ([212.227.15.18]:40719) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4aZR-0003xd-JZ for 77797@debbugs.gnu.org; Tue, 15 Apr 2025 03:19:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1744701532; x=1745306332; i=stephen.berman@gmx.net; bh=fBZ4W2BN77YHxu6pR4c0LVJoFTwPaJljeEd6gNwMu1M=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=htB4PLLo7FWfT/JrayBFUtCTfUnjcHILFITHkmN4+M836h132RRZA1DaF59xaS8a Q0FfuEBzyp756HCJUef6Fh6ZLX1hsY+375pNTlNZGSiUiTytjcBx6UqgAesjwfomr wbXektoLQ2qBYvpUsUdosZaB9gmSjTfDPFxaeqLy4HLufm7JcCAQsCXirdyCQZgmX OOaGj4CWPFc5dshRQMwxYVZjY/t1WNVM4bsq7r3L9Uh6N/u0ciyN3NjeWxkfRNIEN eVZqgQjwgAqZhgFr82eaqNiuREeKPRjMrzY9pY6RYj6o2CQRtWDX5w68pOkJZdWbP +QbIvglZ06CqpZOodw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.95.70]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSt8W-1taRRC0eFi-00Nu0t; Tue, 15 Apr 2025 09:18:52 +0200 From: Stephen Berman In-Reply-To: References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> <87o6wyg4hw.fsf@gmx.net> <86jz7miue4.fsf@gnu.org> Date: Tue, 15 Apr 2025 09:18:49 +0200 Message-ID: <87jz7lao4m.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:r105QF2WDoj0hVMIADbDygVeorq+hAKtDH0Qufm1s9NagTo66U8 sUq9SCzjlJNZlXRPhGuYCJ/sfHn3+vgCP2QzR9F0Bm+y0GpgSxSYjdK4KS3ACshYfQ0cUha 66U0xEqYQl6I5OU9BoXdVZWN968RbaNTxBzuDox7bqNoCUJ4OXIjQiQXlLFsPr6mnlr5MTU B6acMFpY89bv8Wtx72ZVg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:TDoFbO/FyBA=;nZH0SRJrztE1yj1jFPXU/tZMyvb kYNGa6mndEzS5yqohqSeoou48usbUCVKUxrSVHQlFUcOYjfHRiMqKPUc7qztS3zdG0qeudMgN 6+QzihLusyhfLNVNJlLI+ZmutjZVqAxFEvPPzHxbRksiapvRqSdbeWbDjOjlzCX4KLS5KnX3m 4ys8ui7NiTZ+93216Hl1YaCsswYO7/CoUHQzMqzjGrFlC/5cl8hie0KvW4thVEGtMnMe1DUWE d9skJQWF9FXhdrAiQ3TJgO+ImUKthCeHa0jJAtlbvhoOm2vWemb6XuNOmm1AefdDynApZhigH +iAaTDzMhY2Hu9YmCr27+NUHjvOR3CC+bciU9s7BcUbhowlwTpMxcnHKjgWSA5mk2dPF6qj9A XXjc2jC1X2PHGWExG9xpIpGh5T1DXdLX8rOJ2MrpGprlUnlXNdDps3f6+stmYiMkEV3gRgIJJ EHKaQuocZTvs48wDfK8ILxKrH+MOoLX4ieShSHoEm+nrfCUocUdMyQ8N16ESKwpwPNlXGSYQk BwbzXL/iH4VtiVyMI8Kxn6hUHcs54wwVK2aChCAypQ2+AFPb0IGNM6xlfwYOxpNIl5JmrVHqH DIWveVPYsWX+3sQZN+K6VYlMvzfCv5y4GDqoYgq7Wz7JDT9a25We++z+ojdgSwweIItIczbpE ya9GoU1WIxFyNqxbb3BHxTFoKAbkUIqGhDk9q/dqxQBHQ1um/Ip6iPjZbmbpAealTstxF+0H7 UgWTEjO3iahcaFEeJGHmK8l/e0S696dQ3+gi2uyWBF1Og+dZaoSGctD5by6NKWPd84RamWivR 8jgQGx522tp1xWpVxrdqjHly4QBeIt0eTdiwgJYPQKhNa8X+nZYPA1DsIB/Mqx6lVmAVC0HiO GcVwTuY5mQNI+7//4JBCHu2gl1h2qVTOaXwQ8vzEe7SNjHJm9v/qaPUEXSaK6f3hrsJUlgAXX vHM7+n/SL/axYWERQs+Eb9d8/zC2jHcpHPQ67cguBuI0tEf6QLkSK60tFkqF+we3AdDaoM+q2 mjLlVNbuu4sS+E1ie5FM9QunBIttUEl9gggBm4pDI2h+7Uq6A7jqUBDGuwiTOO6ggcpeSLnja fFuD2Sid0PzMM3YL8NWInPNFXrhTMMtZIu1Hm4Q8DeKneyl7eCItTd99crK0BecxO6h18K6xU G9lzmBB52LzBINzpicScz/BthcD/Ddfq6TfyzvpEb9JPzH7/sDA4cFCuVKFJ3/xNLB3Ntwuwb 5hVIY7OL0yCtFxWrE6XgqmYG10HfjZLhwbgX4aYf2z2lca4CrzV6VdVprCkQcr6QFw2YKWNjg gfYP0uAohypYal1yHg4kBLboGDsBEanNOI9eoVeAISuFSaSGKBHVwYa7Qmi0rjicU1ndLcl8v yMmy2e6RoO/hOT++l9IgCeNymkoOEWbTEotIzWWs6JyBFjTo952ALuIc6NXmehhs+mh9tRyPz 3UU6/IY0I9Re/2jkgGWdQgt8nAXk= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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.7 (-) On Mon, 14 Apr 2025 18:59:11 +0200 Eshel Yaron wrote: > Hi, > > Eli Zaretskii writes: > >>> From: Stephen Berman >>> Cc: 77797@debbugs.gnu.org >>> Date: Mon, 14 Apr 2025 17:14:03 +0200 >>>=20 >>> Since you don't necessarily object, what's the next step? >> >> I'd like to hear more opinions about this, since I think it takes that >> command in directions we didn't intend it to go. > > FWIW, I use C-x C-f to create new files all the time, also in > non-existing directories. Then I save the buffer as usual, and that > prompts me to create the directory if needed, which I find to be fine. > So I probably wouldn't find much use for this addition. I wouldn't mind > if it was added nonetheless, of course. > > BTW if you want to suppress the prompt for creating a new directory and > always just create it when needed, you can (ab)use write-file-functions > for that: > > (defun my-ensure-dir () > (let ((dir (file-name-directory (buffer-file-name)))) > (unless (file-directory-p dir) > (make-directory dir t))) > nil) > > (add-hook 'write-file-functions #'my-ensure-dir) Thanks for the suggestion, but I think I'd rather not preempt the basic-save-buffer prompt, it's a good safeguard, since C-x C-f is a very high frequency command. For the much rarer cases where I want to add a new file in one or more new subdirectories, it's better to use a command that I know is designed to do that. If my proposal to enhance make-empty-file is not accepted, I can just advise it or redefine it in my init file. Steve Berman From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Apr 2025 07:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Stefan Kangas , 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.174470157515326 (code B ref 77797); Tue, 15 Apr 2025 07:20:02 +0000 Received: (at 77797) by debbugs.gnu.org; 15 Apr 2025 07:19:35 +0000 Received: from localhost ([127.0.0.1]:50339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4aZy-0003z8-M3 for submit@debbugs.gnu.org; Tue, 15 Apr 2025 03:19:34 -0400 Received: from mout.gmx.net ([212.227.15.15]:35501) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4aZw-0003yr-6E for 77797@debbugs.gnu.org; Tue, 15 Apr 2025 03:19:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1744701562; x=1745306362; i=stephen.berman@gmx.net; bh=OenfZuxsQ6fG8vpgyGnJiIqcLA+etqqrqS/LpegsE2w=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=ahp7QUUBmsMYnEcfXsD9pnjnkLJKUC+5YXpFVHVdfu3NDOO+8nbDcDWNoYZTC9+7 PRkwvN79kPRgHSxBb5SDM0dl50WEkULT9PsTaOZ98XwTn6rnu6riP5bx/MfbUzEsV +bi8BbApCbR1jntw4J/5ZQn9jcfxWhXFiqLtqtvSInlgYXoioOi9YPbY6kdFH9rOi Cms3khjPM+fRFfBbWp9oql4aBE8OJ1hYcfR/2lZKM8u1LUrZkiVn////Cq9qvLrFd i+7d1d5mJxtZ9Ds7jNJ+KzH7nexF6H2ShNPn+vbyOP62fikPeLEzT20SzjPEc8lUA ABL5oZ7/dJMw4JWgMQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.95.70]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N5mGH-1syN3B0wKx-00xFMZ; Tue, 15 Apr 2025 09:19:22 +0200 From: Stephen Berman In-Reply-To: <868qo2hrbc.fsf@gnu.org> References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> <87o6wyg4hw.fsf@gmx.net> <868qo2hrbc.fsf@gnu.org> Date: Tue, 15 Apr 2025 09:19:20 +0200 Message-ID: <87ikn5ao3r.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:yydTH2WZtW6brTri7iBYuWqAvQXqpS6boOtw9HF1u/kaBXEpD65 pXwZ0kKxcyp4nZI9bj7JG675VA0heK7NG8xYSTLzlYTlBbWf+I0nC/Lh8wHkJqFU4Zh3vZ6 v1wGcfhqfzwLUBh5Frc0v3CsXzBcJfPuSAFIX5nyEa7yVLxu/ot0WkoD2AVBlAFe2lLuYLz Eyn+DltF1khZ1YAsKZrvA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:9lzukabwmF8=;sTIMXWC7S8T+q/JVcnjzM+eJZVX JLd0mHLXsdrVR8erLL2jN9efUhGbPYYnrCMxJMFYnIsln61DxyU58hnK70l2u3BwXsSHf7trr Zkr83cRabVWu0kuldZLZvPp9KrQFiftV9bYUS/Rx/cb0wNegfxriFQeeowFR+goSicyGiCBsL iBRkwfxpoVkQ51JDZPXV5e3zepafuro2I9RQgpmdKzff+JXfs21PeKmZG9ojwL6VWANNOPk1A W0nPsvMVZ4dbRZmaX3PuEUGSrxwhtP6mtFNH/0+k4tV+F8v7MdtsVZA5aVhMoL5ji5jMhrr1g eEpGpSV3FNZQ6n6DS6cQXrSjqLrFlI1U9Pz8/lAegGgNl6ZJSjxXlpB6fO7MGbM6x37k4GDS5 0irCREsccCmsoKFVPUEbXL6PKaJskL2ZHn9tCis7nFDYROudgt7FJdlTEI0iJBxnY2HLQrsZL L8xt8lj5hA1yNcDD45W98AeZb9i87xGrFVR1u11L9vlPHksOTrs98EaGbSrCuh5Dkl2YTcxtF mdoml+GZL5B7TzF0S7CYW6B0a0aD0XfkCqhDt3pStCbqifqcYVgsCEvQwZ3/UTYHy1UuSLNf9 hC5Bq+R3Sz6aNgHPU/Vmja5LJ1e8u+rPZnmp/icfW15N8uGIOVw3YCM9D7ZrFYuWelmlDGbEz AwUKGkThQzBfRYL6Kwv9NqtuPvZM0jcX24AJ8y5XZjRYkAGvx6zCAROaMSAV6xJhxAiixRSPs 1ac5Ha71AMmVf9CQZ9S0JZjtFzZB5xoodLr9uthq9h9VQlg7hNE6bBUx4rNiVMpBaNKO3970W odyyOGBc2ODF0ZC9FsAWo10xXffi7iWxuWPjITOmefSkYB9nnqoRwBoz0wqjYQ2mORp9djGys hHi8a2iLNfiOluzF/q4YkcTL2LzHl9ZJ2toDiltG4pb3UDj92w7EwZVwpnhz8SIijQk756ab+ BHiQIRqRid1TZvQG4BhNYk6HvLSLGqHAv9wqQHUz8SmsQFoNeUac1zk8NIJMS2BrFy0c9A6dV rNRazgHrauxaLjyqrntuOYpXJouNhnWltljmrdyGu1z8lKQkX8p/1QAcYzn3uDpIax7gs9mLT R36WISztioP8BcdiAAsYiC28Cio2l92mwIHpDtLkLQvjorzeX6taLwMaeOSEwxnnovEZp1HdA UPzIjd8LDNYWc8GDKBmS4fd9WuO2Iyj2J0NNDgLkX2Czkvfu6erT1MB+4BcdLCG2ySDPyj9xN 5xb01fkiTXViE6Vr/VByNJEGGRFJzE1BVwO7/f2uCQJquqGWAkOB3d82cl8rihfgZcy/9umJh ei7fDm7I8IBeG4mThsZvXWm+xwKL7LPlL4bWhz8EFktBHMLwfyYreWKRd1h++ifEVL4AKkp5d 6baJ2ZpHwuXKW9bsVE2A2OaWB3yCpLXHG+CaQrrIgaEigJEpjP+clEYnbO09I2pHYTart4kuG 4a6TbeVI0oknuFVrjTjIWLdP3d74= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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.7 (-) On Tue, 15 Apr 2025 09:28:07 +0300 Eli Zaretskii wrote: >> From: Stefan Kangas >> Date: Mon, 14 Apr 2025 16:06:04 -0500 >> Cc: 77797@debbugs.gnu.org >> >> >> That's backwards: in Emacs, you type "C-x C-f NEWFILE RET", then edi= t >> >> it, then save it. IOW, you don't create an empty file first, becaus= e >> >> that's not useful. >> > >> > It's useful in the case I noted above: yanking text into a buffer tha= t >> > you want to save to a file, and in particular if you want the file to= be >> > in a not-yet-existing subdirectory. In that case, with `C-x C-f' whe= n >> > you type `C-x C-s' you are queried (from `basic-save-buffer') and hav= e >> > to confirm that the subdirectory should be created, while with >> > `make-empty-file' it already has been created. Or have I overlooked = an >> > option to suppress the confirmation query? >> >> Maybe we should add an option to suppress the query? Either as a >> defcustom or a prefix argument, or something. Not sure which is best, >> because I actually prefer the query, myself. > > Same here: I prefer the query because it many times saves me from > creating files with wrong names and/or in wrong directorties, due to > simple typos. I agree, and consequently think an option is too blunt. A prefix argument would be better, but as I wrote in my reply to Eshel Yaron, I prefer adding that to make-empty-file. Steve Berman From unknown Tue Jun 17 01:43:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77797: 31.0.50; Visit an empty file on creating it Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Apr 2025 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman , Eli Zaretskii Cc: 77797@debbugs.gnu.org Received: via spool by 77797-submit@debbugs.gnu.org id=B77797.174472631221091 (code B ref 77797); Tue, 15 Apr 2025 14:12:02 +0000 Received: (at 77797) by debbugs.gnu.org; 15 Apr 2025 14:11:52 +0000 Received: from localhost ([127.0.0.1]:52903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4h0x-0005U7-JB for submit@debbugs.gnu.org; Tue, 15 Apr 2025 10:11:52 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:56444) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u4h0t-0005Tn-UW for 77797@debbugs.gnu.org; Tue, 15 Apr 2025 10:11:49 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5ed43460d6bso8885070a12.0 for <77797@debbugs.gnu.org>; Tue, 15 Apr 2025 07:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744726301; x=1745331101; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=6jI0TftNe84VbLMtv6nByWnD3XDPkZ0Wj3sPJWKwBns=; b=N5AYXJ2GSYuajclu7g/zEEc/bAHHcfDxmhkV3cAlTNlqtojN/z21narW1h4++O3sBB t3N0FHQfhwHRnVzAt5clit36rU+rmfmnwl7QDl5OLXtLu3n3sh38ItX1zTatqMZtnX42 dRTwWpHWLDzRcojt8/UbCv0ekGYQMblGCiHpA0HyqHKN63QWOSh0sIkBxIZrgFnWP9AQ GTEhCeWBPZsUkuohdo8yrb71XySSHheEoVdzMsm+izsMezXq0cz229JVEeHfJq3D3H72 SRbVKkZh7bfWiMpj7Fh5uFAh3y90UAP95ydmaSdG2mrQloqAZUL+FuA2BjLMReBFxoZt LYuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744726301; x=1745331101; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6jI0TftNe84VbLMtv6nByWnD3XDPkZ0Wj3sPJWKwBns=; b=ODiCELtkweJxZOwk4UcnZ1bNAXb8buUg6uD7QIOd2uIQGzTsMprwLZQOTGvTW2XV5Z 9uFCGbD982wV8DtKqkihxSO5kanT7oDv/jffYyNrztRfBmWa8nT0iN/0UUJX2ROUBSB9 PncVDnGmWENwiTV5xyq7RZXSQZyzZ0gaGGxBo+NVoSnGtwPYF9Q3DqLBIbWCnjflltiQ w49O1xg4HTo6y/eT4ZTFpri0HfmLqGOn6MFYw2+56Fyy70AzYZ8xC9d7JuRbcYAUU0TK 81q5Japrd0J2DKLfmR2OVv9TR1DrA74FImNrrtjIIIw0BboHte4kgCH9tIAgSHE/3Y9G Jfmg== X-Gm-Message-State: AOJu0Yy3JSIBuegCx7SioLJc3IhuSzucFDfZuNPhHAR1eNhi/d4Vjh6g bhQeH3lx0CS9JSZgRYA4HowHBHyBO1p6gbBsdrJJysbN95wtFDsjBiW42byqL8y5XyU8lCm0b7X jU/uY0GCYXcmHJ+c89SB/F1BGgIU= X-Gm-Gg: ASbGncv0jqYpCv+2viG0he/4Wmk3ulTyQFKEDNezlVBXsKkiWSl8aX8qJSfDPGAQW7N xEICXdCVRK4hlas5tN5HUccw3cciuFjDjYQVRWQml8O/A5zLo/Cs+wLmmWcx6wj3M+di7XzLV/j UvnOM+Bv+Z4HU0koK81P0= X-Google-Smtp-Source: AGHT+IGCiuK3j9uU3LSz7lNIHZbdAVaMpPrQtHUCLBOJfnPvcVWQkLN3DFXgkXfPgu8A2ueMTyjOscpFtfK9YZHbNhY= X-Received: by 2002:a05:6402:34cb:b0:5e5:bfab:51f with SMTP id 4fb4d7f45d1cf-5f36ee465b7mr13278933a12.0.1744726300613; Tue, 15 Apr 2025 07:11:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 15 Apr 2025 09:11:40 -0500 Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 15 Apr 2025 09:11:40 -0500 From: Stefan Kangas In-Reply-To: <87ikn5ao3r.fsf@gmx.net> References: <87sembez08.fsf@gmx.net> <86r01uj22a.fsf@gnu.org> <87o6wyg4hw.fsf@gmx.net> <868qo2hrbc.fsf@gnu.org> <87ikn5ao3r.fsf@gmx.net> MIME-Version: 1.0 Date: Tue, 15 Apr 2025 09:11:40 -0500 X-Gm-Features: ATxdqUHkG3qBrDJQIE393Sss08QElCzGqyDCaeQq7IejrYOyA5_ujoFCHiQmufc Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) Stephen Berman writes: > On Tue, 15 Apr 2025 09:28:07 +0300 Eli Zaretskii wrote: > >>> From: Stefan Kangas >>> Date: Mon, 14 Apr 2025 16:06:04 -0500 >>> Cc: 77797@debbugs.gnu.org >>> >>> >> That's backwards: in Emacs, you type "C-x C-f NEWFILE RET", then edit >>> >> it, then save it. IOW, you don't create an empty file first, because >>> >> that's not useful. >>> > >>> > It's useful in the case I noted above: yanking text into a buffer that >>> > you want to save to a file, and in particular if you want the file to be >>> > in a not-yet-existing subdirectory. In that case, with `C-x C-f' when >>> > you type `C-x C-s' you are queried (from `basic-save-buffer') and have >>> > to confirm that the subdirectory should be created, while with >>> > `make-empty-file' it already has been created. Or have I overlooked an >>> > option to suppress the confirmation query? >>> >>> Maybe we should add an option to suppress the query? Either as a >>> defcustom or a prefix argument, or something. Not sure which is best, >>> because I actually prefer the query, myself. >> >> Same here: I prefer the query because it many times saves me from >> creating files with wrong names and/or in wrong directorties, due to >> simple typos. > > I agree, and consequently think an option is too blunt. A prefix > argument would be better, but as I wrote in my reply to Eshel Yaron, I > prefer adding that to make-empty-file. Yeah, I guess it would be situational, so a defcustom is too blunt. I won't object to your proposal, unless anyone else can think of a better use for a prefix argument for that `make-empty-file`.