Permalink
Browse files

Merge pdp10.local:src/conspire

  • Loading branch information...
2 parents c63854b + 9e23516 commit 35d7950e0633c023660091b90a0f957f2acb01c5 @technomancy committed Jul 24, 2008
Showing with 18 additions and 18 deletions.
  1. +1 −4 README.rdoc
  2. +17 −14 lib/conspire/support/conspire.el
  3. 0 repo/foo
View
@@ -28,8 +28,7 @@ conspire from there on the files with which you wish to collaborate.
See lib/conspire/support to see which editors are supported. In Emacs,
install conspire.el and then visit the file you want to edit and
-pressing M-x conspire-mode, though this is still very rough and should
-be done in its own Emacs instance.
+pressing M-x conspire-mode.
Repository history is cleared in between conspiracy sessions.
@@ -46,8 +45,6 @@ Set the DEBUG environment variable to get more information on the console.
* Conflict resolution remains entirely unhandled.
-* The Emacs frontend currently requires its own Emacs instance.
-
* When using Avahi for your ZeroConf implementation, you will not be
able to do anything unless you have an active network connection. So
disconnected conspirancy sessions are not possible without bringing
@@ -3,8 +3,8 @@
;; Copyright (C) 2008 Phil Hagelberg
;; Author: Phil Hagelberg <technomancy@gmail.com>
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/Conspire
-;; Version: 0.1
+;; URL: http://conspire.rubyforge.org
+;; Version: 0.2
;; Created: 2008-07-22
;; Keywords: collaboration
@@ -39,11 +39,8 @@
;;; TODO:
-;; In its current state, it's very dangerous to start a conspire
-;; session and then switch buffers, since the timer is not yet buffer
-;; local. Watch out!
-
;; Automatically launch conspire executable.
+;; Color lines based on which conspirator wrote them?
;;; Code:
@@ -53,20 +50,26 @@
(defvar conspire-timer nil
"A timer to activate conspire synchronizing.")
+(make-variable-buffer-local 'conspire-mode)
+
;;;###autoload
(defun conspire-mode ()
"Activate conspire-mode for real-time collaborative editing."
(interactive)
- (set (make-local-variable 'conspire-timer)
- (run-with-idle-timer conspire-interval
- :repeat 'conspire-sync-buffer)))
+ (setq conspire-mode t)
+ (setq conspire-timer
+ (run-with-idle-timer conspire-interval :repeat 'conspire-sync-buffer)))
+
(defun conspire-sync-buffer ()
"Synchronize buffer with Conspire repository."
- (when (buffer-modified-p)
- (save-buffer)
- (shell-command (format "git add %s && git commit -m \"conspire\""
- buffer-file-name)))
- (revert-buffer nil t))
+ (when conspire-mode
+ (when (buffer-modified-p)
+ (save-buffer)
+ (shell-command (format "git add %s && git commit -m \"conspire\""
+ buffer-file-name)))
+ (revert-buffer nil t)
+ ;; revert resets local variables; heh
+ (setq conspire-mode t)))
;;; conspire.el ends here
View
No changes.

0 comments on commit 35d7950

Please sign in to comment.