unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* vc-checkin (RCS) always. Problem with vc-checkin
@ 2015-09-06 19:04 Uwe Brauer
  2015-09-07  3:49 ` Pierre Lorenzon
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Brauer @ 2015-09-06 19:04 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-18 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-06 19:04 vc-checkin (RCS) always. Problem with vc-checkin Uwe Brauer
2015-09-07  3:49 ` Pierre Lorenzon
2015-09-07 20:44   ` Uwe Brauer
2015-10-18 22:03     ` Thien-Thi Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).