X-Git-Url: https://iankelling.org/git/?p=iankelling.org;a=blobdiff_plain;f=iank-mod.el;h=b033cbc27f3d2efa009e7f7a0e262ad227bbf1a6;hp=4faea5f958d70d4d42953584745fa74325db9b5b;hb=3da8c7ce9ed611cd12d48d5470db5725fa310f24;hpb=e02cd51eb9c9ac3f84a84fefd567d7217e34bc38 diff --git a/iank-mod.el b/iank-mod.el index 4faea5f..b033cbc 100644 --- a/iank-mod.el +++ b/iank-mod.el @@ -13,14 +13,24 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . -(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)