add libreplanet slides
[iankelling.org] / iank-mod.el
index 4faea5f958d70d4d42953584745fa74325db9b5b..b033cbc27f3d2efa009e7f7a0e262ad227bbf1a6 100644 (file)
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-(defun iankmod-start ()
-  (interactive)
-  (shell-command "/a/h/get-comments" "*messages*")
-  (find-file "/tmp/hcomments")
-  (iankmod 1))
+
+;; generally, use m-x iankmod-start. c-u to run on local testing
+;; instance.  Alternatively, run get-comments with whatever args,
+;; manually open /tmp/hcomments, then run (iankmod).
+
+(defun iankmod-start (arg)
+  (interactive "P")
+  (setq iankmod-last-arg (if (equal arg '(4)) " -l" ""))
+  (let ((cmd (concat "/a/h/get-comments" iankmod-last-arg)))
+    (shell-command cmd "*messages*")
+    (find-file "/tmp/hcomments")
+    (iankmod 1)))
+
 (defun iankmod-save ()
   (interactive)
-  (shell-command "/a/h/set-comments" "*messages*"))
+  (basic-save-buffer)
+  (let ((cmd (concat "/a/h/set-comments" iankmod-last-arg)))
+    (shell-command cmd "*messages*")))
 
 
 (defun iankmod-set-state (state)