Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

conspire

  • Loading branch information...
commit 5dca64828f68961e71775df3320ae121967feeee 1 parent 07ce131
@technomancy authored
Showing with 11 additions and 12 deletions.
  1. +11 −12 lib/conspire/support/conspire.el
View
23 lib/conspire/support/conspire.el
@@ -36,24 +36,23 @@
(defvar conspire-interval 0.33
"Number of seconds to wait before syncing with conspire.")
+(defvar conspire-timer nil
+ "A timer to activate conspire synchronizing.")
+
(defun conspire-mode ()
- "Toggle conspire-mode for real-time collaborative editing."
+ "Activate conspire-mode for real-time collaborative editing."
(interactive)
- (if (and (boundp conspire-mode) conspire-mode)
- (progn
- (set (make-local-variable 'conspire-mode) t)
- (set (make-local-variable 'conspire-timer)
- (run-with-idle-timer conspire-interval
- :repeat 'conspire-sync-buffer)))
- (setq conspire-mode nil)
- (cancel-timer conspire-timer)))
+ (set (make-local-variable '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 "conspire commit")
- (shell-command "conspire rebase")
- (revert-buffer nil t)))
+ (shell-command (format "git add %s && git commit -m \"conspire\""
+ buffer-file-name)))
+ (revert-buffer nil t))b
+
;;; conspire.el ends here

1 comment on commit 5dca648

@technomancy

This commit was caused by running conspire-mode in an Emacs instance that was also editing the conspire.el source. I wonder if this is the first time a piece of software has ever committed to itself.

Please sign in to comment.
Something went wrong with that request. Please try again.