From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Charalampos Mitrodimas Newsgroups: gmane.emacs.bugs Subject: bug#70806: [PATCH] Add rename-file-and-open function Date: Mon, 6 May 2024 23:48:30 +0000 Message-ID: References: <87cypyn5lv.fsf@posteo.net> <86bk5ibwck.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30328"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70806@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 07 01:50:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s485z-0007iC-Po for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 May 2024 01:50:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s485T-0005lz-SV; Mon, 06 May 2024 19:49:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s485R-0005jX-T3 for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 19:49:37 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s485R-0003qe-Jt for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 19:49:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s485p-0000lW-Op for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 19:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Charalampos Mitrodimas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2024 23:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70806-submit@debbugs.gnu.org id=B70806.17150393452906 (code B ref 70806); Mon, 06 May 2024 23:50:01 +0000 Original-Received: (at 70806) by debbugs.gnu.org; 6 May 2024 23:49:05 +0000 Original-Received: from localhost ([127.0.0.1]:40904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s484v-0000ko-A5 for submit@debbugs.gnu.org; Mon, 06 May 2024 19:49:05 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:46267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s484s-0000kE-Mj for 70806@debbugs.gnu.org; Mon, 06 May 2024 19:49:04 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3A8A9240101 for <70806@debbugs.gnu.org>; Tue, 7 May 2024 01:48:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1715039312; bh=DaSYN3PZwW0FTG/8EgfUL2crZtKO7BQSJuy2iUlF4EE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:Content-Type: Content-Transfer-Encoding:From; b=Ec1rapZdtG7S/8FW2K87diatlGyY2Z0+k/EKvXz8cb+mfJBHCSYteYq8iVkX7LSxn XxygZp7/yZlU5dPYZCIYFzi6YqWgAYnVoS1k2K2SNbaSv9equyS4Z14KHUFov9Jj4q 0nDqcf9W8XqZu7S0tBobW2n6cO1m+w0EzbHVIDWejMIiN7cx8O8EW7wdjXgxngzUvA SqouZfSHkKMGTLN+LC/e5VRJJMjkbNFEvdpTic/m8lue1V7/IXKYEUKwxVUEHV/s+F a00OW35DaT3F6WxgB/n/sMhKmd9k8QZhLQNwszF2QiJAiVkX8jFNLzNaNdfy6PvCsb RRiMc7erVSm1g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VYJ5C2CwKz9rxB; Tue, 7 May 2024 01:48:31 +0200 (CEST) Content-Language: en-US In-Reply-To: <86bk5ibwck.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284612 Archived-At: On 6/5/24 9:59 PM, Eli Zaretskii wrote: >> From: Charalampos Mitrodimas >> Date: Mon, 06 May 2024 18:43:40 +0000 >> >> The new function is similar to "rename-file", but it automatically opens >> the file once it's renamed (or throws a relevant error). >> >> I'm not sure if this addition is necessary, but I've had it for so many >> years that I thought it might be useful to have it in Emacs by >> default. I'm also not sure if it's in the correct position within >> lisp/files.el. In any case, I'm submitting this patch for consideration. > I think we have "C-x C-w" for those scenarios. It works the other way > around: first you visit the file under the original name, then change > its name when you save it. That is indeed better than my function. Thanks!