From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pierre Lorenzon Newsgroups: gmane.emacs.help Subject: Re: vc-checkin (RCS) always. Problem with vc-checkin Date: Mon, 07 Sep 2015 05:49:04 +0200 (CEST) Message-ID: <20150907.054904.784776305561903593.devel@pollock-nageoire.net> References: <878u8jv076.fsf@mat.ucm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1441598398 27107 80.91.229.3 (7 Sep 2015 03:59:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 03:59:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: oub@mat.ucm.es Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 07 05:59:37 2015 Return-path: Envelope-to: geh-help-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 1ZYnai-00074H-6L for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Sep 2015 05:59:36 +0200 Original-Received: from localhost ([::1]:52763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYnah-0007Gf-HY for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Sep 2015 23:59:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYnaX-0007GK-0n for help-gnu-emacs@gnu.org; Sun, 06 Sep 2015 23:59:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYnaS-0005YN-2R for help-gnu-emacs@gnu.org; Sun, 06 Sep 2015 23:59:24 -0400 Original-Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:41453 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYnaR-0005Y9-Ns for help-gnu-emacs@gnu.org; Sun, 06 Sep 2015 23:59:19 -0400 Original-Received: from localhost ([92.128.103.84]) by mwinf5d04 with ME id E3zH1r00E1pFsZY033zHuj; Mon, 07 Sep 2015 05:59:18 +0200 X-ME-Helo: localhost X-ME-Date: Mon, 07 Sep 2015 05:59:18 +0200 X-ME-IP: 92.128.103.84 In-Reply-To: <878u8jv076.fsf@mat.ucm.es> X-Mailer: Mew version 6.7 on Emacs 25.0.50 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.124 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107066 Archived-At: Hi From: Uwe Brauer Subject: vc-checkin (RCS) always. Problem with vc-checkin Date: Sun, 06 Sep 2015 21:04:29 +0200 > Hello > > The following code can be found in > > http://www.emacswiki.org/emacs/VersionControlAlways > > (defun ensure-in-vc-or-check-in () > "Automatically checkin file ,v can be in the same directory or in the > subdirectory RCS. The idea is to call that function only for files > not for buffers. See the function ensure-in-vc-or-check-in-modes > which could be use in an apropriate HOOK." > (interactive) > (when (buffer-file-name) > (if (or (and (file-exists-p (format "%s,v" (buffer-file-name)))) > (and (file-exists-p (format "RCS/%s,v" (file-name-nondirectory buffer-file-name))))) > (let ((p (point))) > (progn > (vc-checkin (buffer-file-name) nil "") > (vc-toggle-read-only) > (message "Checked in")) > (goto-char p)) > (progn > (message "You need to check this in! "))))) > > I modified the original code > by adding (format "RCS/%s,v" (file-name-nondirectory buffer-file-name) > > > > The point is the code works for a old version of VC, however for GNU > emacs 25 > (vc-checkin (buffer-file-name) nil "") > > does not work any more. > > The docstring for the old function said: > (vc-checkin FILE &optional REV COMMENT INITIAL-CONTENTS) > file for the new function: > (vc-checkin FILES BACKEND &optional COMMENT INITIAL-CONTENTS) Ok that the form I know. backend is required. > so I thought > > (vc-checkin (buffer-file-name) 'RCS nil "") > or > (vc-checkin (buffer-file-name) 'RCS "") > > Should work, it does not. The following error is given In fact it does not work. vc-checkin launches a very complicated process of interaction opening the log buffer to setup the check in message. In fact if you do not want this process to run interactively vc-checkin is maybe not the right method. You might replace your code by : (vc-call-backend 'RCS 'checkin (list (buffer-file-name)) "") Sure it won't accomplish certain tasks around check in performed by vc-checkin but if yuou only want to check in .... Regards Pierre > vc-delistify seems the culprit, but I am stack. > > > Thanks > > Uwe Brauer > > > --8<---------------cut here---------------start------------->8--- > > Debugger entered--Lisp error: (wrong-type-argument sequencep 47) > mapconcat(identity > "/home/oub/emacs/site-lisp/versch/vc-ensure-checkin.el" " ") > vc-delistify("/home/oub/emacs/site-lisp/versch/vc-ensure-checkin.el") > #[514 > "\303\304\305!\"\210\211\203 > >