From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.help Subject: vc-checkin (RCS) always. Problem with vc-checkin Date: Sun, 06 Sep 2015 21:04:29 +0200 Message-ID: <878u8jv076.fsf@mat.ucm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1441566307 6655 80.91.229.3 (6 Sep 2015 19:05:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2015 19:05:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 06 21:04:58 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 1ZYfFH-0000DH-FG for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Sep 2015 21:04:55 +0200 Original-Received: from localhost ([::1]:50173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYfFH-00030Z-JU for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Sep 2015 15:04:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYfF6-00030B-Bm for help-gnu-emacs@gnu.org; Sun, 06 Sep 2015 15:04:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYfF1-0000Vf-Bk for help-gnu-emacs@gnu.org; Sun, 06 Sep 2015 15:04:44 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYfF1-0000VR-5T for help-gnu-emacs@gnu.org; Sun, 06 Sep 2015 15:04:39 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZYfEy-0008HP-GD for help-gnu-emacs@gnu.org; Sun, 06 Sep 2015 21:04:36 +0200 Original-Received: from 171.pool85-55-19.dynamic.orange.es ([85.55.19.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Sep 2015 21:04:36 +0200 Original-Received: from oub by 171.pool85-55-19.dynamic.orange.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Sep 2015 21:04:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 61 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 171.pool85-55-19.dynamic.orange.es Mail-Copies-To: never User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:77qta4Pp1WtGVtrFiYYzC9O0MA8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:107058 Archived-At: 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) 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 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