unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* NTemacs doesn't understand RCS
@ 2004-11-04 16:19 Scott Thibault
  2004-11-04 18:46 ` Kevin Rodgers
  0 siblings, 1 reply; 7+ messages in thread
From: Scott Thibault @ 2004-11-04 16:19 UTC (permalink / raw)


Hi,

I'm using a version of RCS that allows you to create a text file
called RCS that contains a pointer to the RCS directory rather than a
real directory - a work around for not having links on Windows.

So, the question is how do I get emacs to understand these link files?
 Out-of-the-box, when I try C-x v v, the ci command fails with the
message \src\RCS\file.c,v already exists.  I assume because emacs
doesn't recognize the RCS "link" and tries to do a ci -i.

Any ideas??

--Scott

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: NTemacs doesn't understand RCS
@ 2004-12-22  5:47 Jonathan Freidin
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Freidin @ 2004-12-22  5:47 UTC (permalink / raw)


;;; Inspired by a post from Kevin Rodgers.

;;; Fix a problem in Kevin's code, that the paths in vc-rcs-master-templates
;;; are relative to the parent of the file or directory in the RCS link.
This
;;; causes "%sRCS/%s,v" and "%sRCS/%s" templates to fail because of the
extra
;;; "RCS". A "%s%s" (not in vc-rcs-master-templates) also fails because
;;; vc-check-master-templates ensures that the master file isn't the same as
;;; the source file, and it is in the way Kevin used it. Most everything
else
;;; is the way Kevin wrote it.

(defun vc-rcs-template-fn (directory file)
  "Return non-nil if FILE in DIRECTORY is under RCS control."
  (if (file-regular-p (expand-file-name "RCS" directory))
      (let ((rcs-directory
	     ;; Start in the parent directory so the template doesn't fail
on
	     ;; the check for the identical file. This also allows using
	     ;; vc-rcs-master-templates.
	     (concat
	      (with-temp-buffer
		(insert-file-contents (expand-file-name "RCS" directory))
		(buffer-substring (goto-char (point-min))
				  (progn (end-of-line) (point))))
	      "/..")))
	;; in case rcs-directory is relative:
	(setq rcs-directory
	      (expand-file-name rcs-directory directory))
	;; check rcs-directory/FILE against the default templates:
	(if (file-directory-p rcs-directory)
	    (vc-check-master-templates (expand-file-name file rcs-directory)
				       (remq 'vc-rcs-template-fn
					     vc-rcs-master-templates))))))

(setq vc-rcs-master-templates
      (cons 'vc-rcs-template-fn vc-rcs-master-templates))

Jonathan

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

end of thread, other threads:[~2004-12-22  5:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-04 16:19 NTemacs doesn't understand RCS Scott Thibault
2004-11-04 18:46 ` Kevin Rodgers
2004-11-09 20:29   ` Scott Thibault
2004-11-09 23:03     ` Stefan Monnier
2004-11-10  0:45     ` Kevin Rodgers
2004-11-10 11:22       ` Scott Thibault
  -- strict thread matches above, loose matches on Subject: below --
2004-12-22  5:47 Jonathan Freidin

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).