From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#12488: 24.2.50; vc-delete-file and vc-rename-file should default to the current buffer's file Date: Sat, 22 Sep 2012 22:00:56 +0400 Message-ID: <505DFCD8.9010805@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1348336884 22429 80.91.229.3 (22 Sep 2012 18:01:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Sep 2012 18:01:24 +0000 (UTC) To: 12488@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 22 20:01:29 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TFU19-0008Od-Pt for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Sep 2012 20:01:28 +0200 Original-Received: from localhost ([::1]:40065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU15-000730-8r for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Sep 2012 14:01:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU12-00072S-Fr for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:01:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFU11-0008H3-9u for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:01:20 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFU11-0008Gy-57 for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:01:19 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TFU2g-0003TW-8O for bug-gnu-emacs@gnu.org; Sat, 22 Sep 2012 14:03:02 -0400 X-Loop: help-debbugs@gnu.org 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 X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134833696813332 (code B ref -1); Sat, 22 Sep 2012 18:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Sep 2012 18:02:48 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) Original-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= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64771 Archived-At: 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))