From unknown Sun Jun 22 11:45:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12488: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 18:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12488 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 12488@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.134833696813332 (code B ref -1); Sat, 22 Sep 2012 18:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Sep 2012 18:02:48 +0000 Received: from localhost ([127.0.0.1]:49507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFU2S-0003Sy-6E for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:02:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52156) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFU2O-0003So-03 for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:02:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFU0h-0008F8-3k for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:01:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU0h-0008F4-1B for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:00:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU0g-0006ep-0E for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:00:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFU0e-0008Es-3n for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:00:57 -0400 Received: from forward16.mail.yandex.net ([95.108.253.141]:50484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU0d-0008Eo-OC for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:00:56 -0400 Received: from smtp16.mail.yandex.net (smtp16.mail.yandex.net [95.108.252.16]) by forward16.mail.yandex.net (Yandex) with ESMTP id 574A3D20494 for ; Sat, 22 Sep 2012 22:00:53 +0400 (MSK) Received: from smtp16.mail.yandex.net (localhost [127.0.0.1]) by smtp16.mail.yandex.net (Yandex) with ESMTP id 430426A00F2 for ; Sat, 22 Sep 2012 22:00:53 +0400 (MSK) Received: from 5x166x246x245.dynamic.spb.ertelecom.ru (5x166x246x245.dynamic.spb.ertelecom.ru [5.166.246.245]) by smtp16.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0qbOp9sa-0rbmuBeA; Sat, 22 Sep 2012 22:00:53 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1348336853; bh=5KQBQNnkjZS27Db5W2WuUaIx/3ZjxoUU7SiIceMPXFc=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Content-Transfer-Encoding; b=v6ttAiynC2s7NCBY8sgv14XUbmsy2Xp0fBSjOmbF+4qE/bmmRAiG6iedFST0Jp2IM vjfrfOj0tsA2mgEEaoZXOXQ36T2kHOjkYibry09KcID5VO2xmEk4uOJURbth3satE3 5nf9tdGuF/e8zVo5bBvUzFH0zwjhzq1kzQbGhDNE= Message-ID: <505DFCD8.9010805@yandex.ru> Date: Sat, 22 Sep 2012 22:00:56 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Tags: patch Can I go ahead and install this? === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 15:24:26 +0000 +++ lisp/ChangeLog 2012-09-22 17:55:12 +0000 @@ -1,3 +1,8 @@ +2012-09-22 Dmitry Gutov + + * vc/vc.el (vc-delete-file, vc-rename-file): Default to the + current buffer's file name if it's under version control. + 2012-09-22 Chong Yidong * repeat.el (repeat): Doc fix (Bug#12348). === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2012-09-13 18:23:33 +0000 +++ lisp/vc/vc.el 2012-09-22 17:56:40 +0000 @@ -2562,8 +2562,11 @@ ;;;###autoload (defun vc-delete-file (file) - "Delete file and mark it as such in the version control system." - (interactive "fVC delete file: ") + "Delete file and mark it as such in the version control system. +Default to the current buffer's file name if it's under version control." + (interactive (list (read-file-name "VC delete file: " nil + (when (vc-backend buffer-file-name) + buffer-file-name) t))) (setq file (expand-file-name file)) (let ((buf (get-file-buffer file)) (backend (vc-backend file))) @@ -2601,8 +2604,12 @@ ;;;###autoload (defun vc-rename-file (old new) - "Rename file OLD to NEW in both work area and repository." - (interactive "fVC rename file: \nFRename to: ") + "Rename file OLD to NEW in both work area and repository. +OLD defaults to the current buffer's file name if it's under version control." + (interactive (list (read-file-name "VC rename file: " nil + (when (vc-backend buffer-file-name) + buffer-file-name) t) + (read-file-name "Rename to: "))) ;; in CL I would have said (setq new (merge-pathnames new old)) (let ((old-base (file-name-nondirectory old))) (when (and (not (string= "" old-base)) From unknown Sun Jun 22 11:45:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12488: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Nov 2012 04:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12488 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Dmitry Gutov Cc: 12488@debbugs.gnu.org Received: via spool by 12488-submit@debbugs.gnu.org id=B12488.135425003728739 (code B ref 12488); Fri, 30 Nov 2012 04:34:02 +0000 Received: (at 12488) by debbugs.gnu.org; 30 Nov 2012 04:33:57 +0000 Received: from localhost ([127.0.0.1]:45891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeIIW-0007TS-JH for submit@debbugs.gnu.org; Thu, 29 Nov 2012 23:33:57 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:54381) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeIIR-0007TJ-Kg for 12488@debbugs.gnu.org; Thu, 29 Nov 2012 23:33:54 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so59310pad.3 for <12488@debbugs.gnu.org>; Thu, 29 Nov 2012 20:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=22uhExR2GYh7AL68Otev+zxyH/+EG6IH5/GKbZI0k3U=; b=akkY9peiajKZoL2LB8ijmgdqXfHb47o2vEGk7yJxolHPUrDSWuc5ho6MpU8s4UOnPo qPSH/EQ3MSQ6G0XIHu2z9r7GailQ8iGcZtt/28NBQsi5U7fzT936Ij9toC9Wvd47I/hk WY36+nfyxy/PiLPT9/ijDE0PPojbjL8rsw0d12/BP2Auz7t3YybMwviHId4PjXfQxQtC 4r+ny5BDj1RgcZoloZUzuea3MbOGmVoAbMkUK23EPMIyYlPF6BsAhFVC1wYJSRG99y0T deuu+q0Aud2cNvztSB31BO49mwAzYsP+kmV6X2ritmlynpqRTlRs20t2orCqgQLm04q9 sbow== Received: by 10.68.143.162 with SMTP id sf2mr2025070pbb.137.1354249907513; Thu, 29 Nov 2012 20:31:47 -0800 (PST) Received: from ulysses ([155.69.16.180]) by mx.google.com with ESMTPS id o1sm2196731paz.34.2012.11.29.20.31.44 (version=SSLv3 cipher=OTHER); Thu, 29 Nov 2012 20:31:46 -0800 (PST) From: Chong Yidong References: <505DFCD8.9010805@yandex.ru> Date: Fri, 30 Nov 2012 12:31:41 +0800 In-Reply-To: <505DFCD8.9010805@yandex.ru> (Dmitry Gutov's message of "Sat, 22 Sep 2012 22:00:56 +0400") Message-ID: <87hao7aez6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Dmitry Gutov writes: > +Default to the current buffer's file name if it's under version control." > +OLD defaults to the current buffer's file name if it's under version > control." These seem to imply that the current buffer's name is always used if it's under version control, rather than simply being the default for reading the file name. It should instead say something like "If called interactively, read FILE, defaulting to ..." Otherwise the patch looks OK for the trunk. Thanks. From unknown Sun Jun 22 11:45:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12488: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Nov 2012 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12488 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Chong Yidong Cc: 12488@debbugs.gnu.org Received: via spool by 12488-submit@debbugs.gnu.org id=B12488.135431093431378 (code B ref 12488); Fri, 30 Nov 2012 21:29:01 +0000 Received: (at 12488) by debbugs.gnu.org; 30 Nov 2012 21:28:54 +0000 Received: from localhost ([127.0.0.1]:47520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeY8j-00089y-5T for submit@debbugs.gnu.org; Fri, 30 Nov 2012 16:28:54 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:49018) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeY8f-00089l-7H for 12488@debbugs.gnu.org; Fri, 30 Nov 2012 16:28:51 -0500 Received: by mail-lb0-f172.google.com with SMTP id y2so899088lbk.3 for <12488@debbugs.gnu.org>; Fri, 30 Nov 2012 13:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ZyLoUCy1f5SSdc8Qg7nJNbN+Tj4P7GpeLrpHVyoBOK4=; b=aWgFlPMjeo4fvE9wuSx2k01eQINY8IorGP2xC6KaiiZ/evyuhZx5ziQoqqQdQ/gRcN sSR+YYy0kgCPuSCHAKA0HH8v7ZQfsU+TIyKkATpYRlPJfmva7SFatafc3hd4zkT63wpU T4X3J+SSCpIgVf60e5KIgRA0Uhi/zQK42FSw5pVj/9NkrHayBdVKJ2NTL4bH7/BepzVr RzXiYqnASbs/WJeE+gGWb9pKHh9JHH/ArFx7Gi/JUDeoYiJOqBda+WJtbvagR0aLtfPm 9EELGW5YQOE4nMF+rjDLdro0M2p0mUUGYutfLVWYnt2jP5FYNzWXe8bZUFCo5FR5puVC VCGg== Received: by 10.152.128.9 with SMTP id nk9mr2603210lab.17.1354310800687; Fri, 30 Nov 2012 13:26:40 -0800 (PST) Received: from [192.168.1.5] ([178.252.98.87]) by mx.google.com with ESMTPS id b4sm2511179lbi.0.2012.11.30.13.26.38 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 13:26:39 -0800 (PST) Message-ID: <50B9248F.2050608@yandex.ru> Date: Sat, 01 Dec 2012 01:26:39 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 References: <505DFCD8.9010805@yandex.ru> <87hao7aez6.fsf@gnu.org> In-Reply-To: <87hao7aez6.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Hi Chong, On 30.11.2012 8:31, Chong Yidong wrote: > Dmitry Gutov writes: > >> +Default to the current buffer's file name if it's under version control." > >> +OLD defaults to the current buffer's file name if it's under version >> control." > > These seem to imply that the current buffer's name is always used if > it's under version control, rather than simply being the default for > reading the file name. It should instead say something like "If called > interactively, read FILE, defaulting to ..." > > Otherwise the patch looks OK for the trunk. Thanks. Do you think I can add commands like `vc-rename-this-file' and `vc-delete-this-file' instead? And then replace `vc-rename-file' in VC menu with the first one and add the second one below it? Because `vc-rename-file' is likely the only command in that menu that acts on a single file, but does't automatically use the one the current buffer visits. From unknown Sun Jun 22 11:45:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12488: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Dec 2012 06:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12488 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Dmitry Gutov Cc: 12488@debbugs.gnu.org Received: via spool by 12488-submit@debbugs.gnu.org id=B12488.135434208627503 (code B ref 12488); Sat, 01 Dec 2012 06:09:02 +0000 Received: (at 12488) by debbugs.gnu.org; 1 Dec 2012 06:08:06 +0000 Received: from localhost ([127.0.0.1]:47836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TegFC-00079X-45 for submit@debbugs.gnu.org; Sat, 01 Dec 2012 01:08:06 -0500 Received: from mail-da0-f44.google.com ([209.85.210.44]:37323) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TegF9-00079Q-Li for 12488@debbugs.gnu.org; Sat, 01 Dec 2012 01:08:04 -0500 Received: by mail-da0-f44.google.com with SMTP id z20so483192dae.3 for <12488@debbugs.gnu.org>; Fri, 30 Nov 2012 22:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=/Mna7chCzQFvz+ytPC7eirub44Le+6RWFFKnZHSTSlU=; b=077mNYr+wIsuwdMgLwZ2kblBC3qnXoJ2FhDHoERnwSWWKmXYg2tr+Cp4+888LbHR8U 28UnfnY1aUbmSTRxmFYbLd+XXaBPsoYV+dYeRWMAzvTIr/oxvDDzr6UKyk7fH7OQvzNb dHIMfl3D//aexV8b2w4Vxi4EVk+0CWik38AZkTiQVoIT98VG6/mrR7fINKM/8ajDazl4 SyDsezskUeIc6+2hYki3mmL8V+PJRLSBHm/Q2+GxEGq8cGg9DoSaEK2DfxJnUtOpzzfU Sr5n3ABElKB9cEP6mmmEjbG3BhM4kZIMsPCCY8zzZvgS2bOyi0QwTOhmEXb4KhVa+0GB LroQ== Received: by 10.66.82.198 with SMTP id k6mr9202549pay.53.1354341953671; Fri, 30 Nov 2012 22:05:53 -0800 (PST) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id tm8sm4245225pbc.48.2012.11.30.22.05.51 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 22:05:52 -0800 (PST) From: Chong Yidong References: <505DFCD8.9010805@yandex.ru> <87hao7aez6.fsf@gnu.org> <50B9248F.2050608@yandex.ru> Date: Sat, 01 Dec 2012 14:05:49 +0800 In-Reply-To: <50B9248F.2050608@yandex.ru> (Dmitry Gutov's message of "Sat, 01 Dec 2012 01:26:39 +0400") Message-ID: <87boee71du.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Dmitry Gutov writes: > Do you think I can add commands like `vc-rename-this-file' and > vc-delete-this-file' instead? And then replace `vc-rename-file' in VC > menu with the first one and add the second one below it? > > Because `vc-rename-file' is likely the only command in that menu that > acts on a single file, but does't automatically use the one the > current buffer visits. I'd rather not have this kind of duplication of commands. It's more consistent with other Emacs commands to offer the current file as the minibuffer default. From unknown Sun Jun 22 11:45:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dmitry Gutov Subject: bug#12488: closed (Re: bug#12488: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file) Message-ID: References: <50BBC567.1010902@yandex.ru> <505DFCD8.9010805@yandex.ru> X-Gnu-PR-Message: they-closed 12488 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 12488@debbugs.gnu.org Date: Sun, 02 Dec 2012 21:20:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1354483202-6104-1" This is a multi-part message in MIME format... ------------=_1354483202-6104-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12488: 24.2.50; vc-delete-file and vc-rename-file should default to the cu= rrent buffer's file which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 12488@debbugs.gnu.org. --=20 12488: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12488 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1354483202-6104-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12488-done) by debbugs.gnu.org; 2 Dec 2012 21:19:51 +0000 Received: from localhost ([127.0.0.1]:50489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfGx4-0001a3-OG for submit@debbugs.gnu.org; Sun, 02 Dec 2012 16:19:51 -0500 Received: from mail-la0-f44.google.com ([209.85.215.44]:33872) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfGx2-0001Zx-8q for 12488-done@debbugs.gnu.org; Sun, 02 Dec 2012 16:19:49 -0500 Received: by mail-la0-f44.google.com with SMTP id d3so1849174lah.3 for <12488-done@debbugs.gnu.org>; Sun, 02 Dec 2012 13:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=rUnrMU6c1wGYEDajfbXTfqtIKgY6yHMQ3wXcj7DaJbk=; b=EPmCyZCK4yE31Z+SU/D2pxEudRazUgSEPZQ/ttBASIYRZAPSLZADJl4sK1sFVrRPG2 fJHU42vWgQAXWdzv2dJmsWnFQ0EcB3ElOvq56fbGmkWpTsaUjnWm34x1wc48KNpRYGJ+ Ajt4jlALfug3WqhaO08Jnods3fQkI74sT9LkrZrTKwzjElUgJiAvJlkf6ThUWX5ykmLL Kk9/ac9adEBrfw/M4CbZuDfUnCrBqKx3HZt8Xd5GmpFp2vAtd9UlvaAGPy29HAxTHCjX uLKUJicv2CrTFAZ+HeeD5sjEgqA3RtcM25RGBF4Po+YBZVooeU4U5ICTp6LL2tg+BkCW uXXw== Received: by 10.112.42.233 with SMTP id r9mr3289879lbl.76.1354483048475; Sun, 02 Dec 2012 13:17:28 -0800 (PST) Received: from [192.168.1.5] ([178.252.98.87]) by mx.google.com with ESMTPS id sq2sm4389062lab.14.2012.12.02.13.17.26 (version=SSLv3 cipher=OTHER); Sun, 02 Dec 2012 13:17:27 -0800 (PST) Message-ID: <50BBC567.1010902@yandex.ru> Date: Mon, 03 Dec 2012 01:17:27 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Chong Yidong Subject: Re: bug#12488: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file References: <505DFCD8.9010805@yandex.ru> <87hao7aez6.fsf@gnu.org> <50B9248F.2050608@yandex.ru> <87boee71du.fsf@gnu.org> In-Reply-To: <87boee71du.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12488-done Cc: 12488-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) On 01.12.2012 10:05, Chong Yidong wrote: > Dmitry Gutov writes: > >> Do you think I can add commands like `vc-rename-this-file' and >> vc-delete-this-file' instead? And then replace `vc-rename-file' in VC >> menu with the first one and add the second one below it? >> >> Because `vc-rename-file' is likely the only command in that menu that >> acts on a single file, but does't automatically use the one the >> current buffer visits. > > I'd rather not have this kind of duplication of commands. It's more > consistent with other Emacs commands to offer the current file as the > minibuffer default. Ok, I installed the original patch with updated docstrings. ------------=_1354483202-6104-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Sep 2012 18:02:48 +0000 Received: from localhost ([127.0.0.1]:49507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFU2S-0003Sy-6E for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:02:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52156) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFU2O-0003So-03 for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:02:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFU0h-0008F8-3k for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:01:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU0h-0008F4-1B for submit@debbugs.gnu.org; Sat, 22 Sep 2012 14:00:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU0g-0006ep-0E for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:00:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFU0e-0008Es-3n for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:00:57 -0400 Received: from forward16.mail.yandex.net ([95.108.253.141]:50484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU0d-0008Eo-OC for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:00:56 -0400 Received: from smtp16.mail.yandex.net (smtp16.mail.yandex.net [95.108.252.16]) by forward16.mail.yandex.net (Yandex) with ESMTP id 574A3D20494 for ; Sat, 22 Sep 2012 22:00:53 +0400 (MSK) Received: from smtp16.mail.yandex.net (localhost [127.0.0.1]) by smtp16.mail.yandex.net (Yandex) with ESMTP id 430426A00F2 for ; Sat, 22 Sep 2012 22:00:53 +0400 (MSK) Received: from 5x166x246x245.dynamic.spb.ertelecom.ru (5x166x246x245.dynamic.spb.ertelecom.ru [5.166.246.245]) by smtp16.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0qbOp9sa-0rbmuBeA; Sat, 22 Sep 2012 22:00:53 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1348336853; bh=5KQBQNnkjZS27Db5W2WuUaIx/3ZjxoUU7SiIceMPXFc=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Content-Transfer-Encoding; b=v6ttAiynC2s7NCBY8sgv14XUbmsy2Xp0fBSjOmbF+4qE/bmmRAiG6iedFST0Jp2IM vjfrfOj0tsA2mgEEaoZXOXQ36T2kHOjkYibry09KcID5VO2xmEk4uOJURbth3satE3 5nf9tdGuF/e8zVo5bBvUzFH0zwjhzq1kzQbGhDNE= Message-ID: <505DFCD8.9010805@yandex.ru> Date: Sat, 22 Sep 2012 22:00:56 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Tags: patch Can I go ahead and install this? === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 15:24:26 +0000 +++ lisp/ChangeLog 2012-09-22 17:55:12 +0000 @@ -1,3 +1,8 @@ +2012-09-22 Dmitry Gutov + + * vc/vc.el (vc-delete-file, vc-rename-file): Default to the + current buffer's file name if it's under version control. + 2012-09-22 Chong Yidong * repeat.el (repeat): Doc fix (Bug#12348). === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2012-09-13 18:23:33 +0000 +++ lisp/vc/vc.el 2012-09-22 17:56:40 +0000 @@ -2562,8 +2562,11 @@ ;;;###autoload (defun vc-delete-file (file) - "Delete file and mark it as such in the version control system." - (interactive "fVC delete file: ") + "Delete file and mark it as such in the version control system. +Default to the current buffer's file name if it's under version control." + (interactive (list (read-file-name "VC delete file: " nil + (when (vc-backend buffer-file-name) + buffer-file-name) t))) (setq file (expand-file-name file)) (let ((buf (get-file-buffer file)) (backend (vc-backend file))) @@ -2601,8 +2604,12 @@ ;;;###autoload (defun vc-rename-file (old new) - "Rename file OLD to NEW in both work area and repository." - (interactive "fVC rename file: \nFRename to: ") + "Rename file OLD to NEW in both work area and repository. +OLD defaults to the current buffer's file name if it's under version control." + (interactive (list (read-file-name "VC rename file: " nil + (when (vc-backend buffer-file-name) + buffer-file-name) t) + (read-file-name "Rename to: "))) ;; in CL I would have said (setq new (merge-pathnames new old)) (let ((old-base (file-name-nondirectory old))) (when (and (not (string= "" old-base)) ------------=_1354483202-6104-1--