From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: vc-rename-file() if possible otherwise rename-file() Date: Tue, 18 Mar 2008 20:13:17 +0100 Message-ID: <87fxunyhf6.fsf@thievol.homelinux.org> References: <2fd1cf38-57e5-4ce1-b79c-8eee6aa25b8e@s13g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205866837 7966 80.91.229.12 (18 Mar 2008 19:00:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2008 19:00:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Nordlow Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 18 20:01:05 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jbh3Z-0006ZK-67 for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Mar 2008 20:01:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jbh2z-00066N-Bk for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Mar 2008 15:00:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jbh2e-00066G-8d for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 15:00:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jbh2c-00065m-PB for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 15:00:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jbh2c-00065j-GS for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 15:00:06 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.170]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jbh2b-0003D5-WA for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 15:00:06 -0400 Original-Received: by ug-out-1314.google.com with SMTP id a2so1202799ugf.48 for ; Tue, 18 Mar 2008 12:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=YJ/4jjlgx5HBtc0alQs0YCJ08zy2fLC9hgRY8L9BX+M=; b=rF5OGu8/7MEprwvKeU4glBOn2R1Kao4AslDXEuCmuUIVhDHDdLijBgaKSXhtP4WV8ZGef7n88fVT6PMAMOmgOBCbdFx5swNnYf7bUcObfgxxjxm1yIA1yOuttG/jwjmA9+2iOeRWRtX1kW2pNBK+KuVsN4iz17R/AQnvTSkiKUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=ftS2I8KhjRh3vJ7hIG1779HvM7neB2dIQuW06EnCLRuG9PSwqZU//8VWNvBPUJK1WVXLbLky2PjsmE2JHfA9l8Ov0r6xfZTu7fVQehPKX+Eme33LtGBkr94bshQU2DQ2ly4Jg+ltMYuEpdRFzkI/XVJgNxdODabqtdrNrU9glf8= Original-Received: by 10.78.157.15 with SMTP id f15mr3037339hue.2.1205866799766; Tue, 18 Mar 2008 11:59:59 -0700 (PDT) Original-Received: from thievol.homelinux.org ( [79.85.211.108]) by mx.google.com with ESMTPS id s10sm29975819muh.11.2008.03.18.11.59.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Mar 2008 11:59:59 -0700 (PDT) In-Reply-To: <2fd1cf38-57e5-4ce1-b79c-8eee6aa25b8e@s13g2000prd.googlegroups.com> (Nordlow's message of "Tue, 18 Mar 2008 11:23:32 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52501 Archived-At: Nordlow writes: > Looking for a small snippet that does vc-rename-file() when possible > (source file is under version control) otherwise default to rename- > file(). The question is: How do I check if a file is under version > control or not? Look in the modeline you will see the name of the version-system backend and the number of version. Like SVN:123 for a file under subversion version no123. But the file didn't come under version-control alone... ;) -- A + Thierry Pub key: http://pgp.mit.edu