From: Pierre Lorenzon <devel@pollock-nageoire.net>
To: oub@mat.ucm.es
Cc: help-gnu-emacs@gnu.org
Subject: Re: vc-checkin (RCS) always. Problem with vc-checkin
Date: Mon, 07 Sep 2015 05:49:04 +0200 (CEST) [thread overview]
Message-ID: <20150907.054904.784776305561903593.devel@pollock-nageoire.net> (raw)
In-Reply-To: <878u8jv076.fsf@mat.ucm.es>
Hi
From: Uwe Brauer <oub@mat.ucm.es>
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
>
>
next prev parent reply other threads:[~2015-09-07 3:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 19:04 vc-checkin (RCS) always. Problem with vc-checkin Uwe Brauer
2015-09-07 3:49 ` Pierre Lorenzon [this message]
2015-09-07 20:44 ` Uwe Brauer
2015-10-18 22:03 ` Thien-Thi Nguyen
-- strict thread matches above, loose matches on Subject: below --
2015-09-12 8:17 Uwe Brauer
2015-09-12 9:33 ` Andreas Schwab
2015-09-12 13:04 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150907.054904.784776305561903593.devel@pollock-nageoire.net \
--to=devel@pollock-nageoire.net \
--cc=help-gnu-emacs@gnu.org \
--cc=oub@mat.ucm.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.