 (defun do-lock-file (kind)
   ;; find the script name
   (let* ((script-name      (file-name-base (buffer-file-name)))
-	 (status           (lock-status script-name)))
+	 (status           (lock-status script-name))
+	 (user             (user-login-name)))
     (case kind
       (:lock
        (cond ((string-equal status "NOT-LOCKED")
-	      (fi:eval-in-lisp (format "(jvs::lock-file-by-name \"%s\")" script-name))
+	      (fi:eval-in-lisp (format "(let ((archive::*current-user* \"%s\")) (jvs::lock-file-by-name \"%s\"))" user script-name))
 	      (message "File locked"))
 	     ((string-equal status "LOCKED-BY-YOURSELF")
 	      (message "File already locked by yourself"))

	      (message "Err: Unable to lock file"))))
      (:unlock
       (cond ((string-equal status "LOCKED-BY-YOURSELF")
	      (fi:eval-in-lisp (format "(jvs::unlock-file-by-name \"%s\")" script-name))
	      (message "File unlocked"))
	     ((string-equal status "NOT-LOCKED")
	      (message "File already unlocked"))

;;;; (:require-patch "")
;;;; HISTORY :
;;;; $Log$
;;;; Revision 3.20  2015/07/20 16:41:40  mgautier
;;;; - lock file with the user using emacs
;;;;
;;;; Revision 3.19  2015/06/29 08:17:24  mgautier
;;;; - remove useless message
;;;;
