]> git.earman.xyz Git - emacsinit.git/commitdiff
Offload some howm templates to abbrevs, only load when on work pc
authorrearman <rearman@r717.net>
Mon, 18 Aug 2025 20:47:46 +0000 (16:47 -0400)
committerrearman <rearman@r717.net>
Mon, 18 Aug 2025 20:47:46 +0000 (16:47 -0400)
abbrev_defs
init.el
re/re-packages.el
re/re-skeletons.el

index ec5461d0485a79cb5d2bd6a281df14629fdf7222..27427d76add1cc9f3ce7d056f5e98ec2ef8d6ac6 100644 (file)
@@ -1,7 +1,12 @@
 ;;-*-coding: utf-8;-*-
-(define-abbrev-table 'org-mode-abbrev-table
-  '(("ssrc" "" skel-org-block)
-    ("selisp" "" skel-org-block-elisp)
-    ("sfac" "" skel-facility-properties)
-    ("sper" "" skel-person-properties)
-    ("swo" "" skel-workorder-properties)))
+(when (equal system-type 'windows-nt)
+  (define-abbrev-table 'global-abbrev-table
+    '(
+      ("hfac" "" howm-facility :count 0)
+      ("hper" "" howm-person :count 0)
+      ("oelisp" "" skel-org-block-elisp :count 0)
+      ("ofac" "" skel-facility-properties :count 0)
+      ("oper" "" skel-person-properties :count 0)
+      ("osrc" "" skel-org-block :count 0)
+      ("owo" "" skel-workorder-properties :count 0)
+      )))
diff --git a/init.el b/init.el
index e45e4b7cbd0ba22cfa7632cd11863aecf2eab8a4..eef74e67ee45048a1d09068ce462b1471750b09e 100644 (file)
--- a/init.el
+++ b/init.el
       save-abbrevs 'silently)
 
 (add-hook 'org-mode-hook #'abbrev-mode)
+(add-hook 'howm-mode-hook #'abbrev-mode)
 
 ;; IELM
 (setq ielm-history-file-name (expand-file-name "ielm/history" user-emacs-directory))
index 4755f04c848e7c63d144e0366c7eb60cd87aac17..7e46947510326d672043c15a53d706676164a12b 100644 (file)
 
 (when (equal system-type 'windows-nt)
   (setq howm-template-list '("= %title%cursor\n%date %file\n\n"
-                            "= %title%cursor\n%date %file\n\nSystemNotes\nBeforeStartup\nPlcProgram\nHumanMachineInterface\nDuringStartup\nAfterStartup\n"
-                            "= %title%cursor\n%date %file\n\nMeeting Attendees: \n"
-                            "= @%title%cursor\n%date %file\n\nCompany: \nPosition: \nEmail: \nOffice: \nCell: \n")
+                            "= %title%cursor Meeting\n%date %file\n\nAttendees: \n"
+                            "= @%title%cursor\n%date %file\n\n")
        howm-template howm-template-list))
 
 (use-package howm
index 48512eabb3a54ecbb69fcca9d7469eac4937fe36..131f763718d2ba9b38ac1798fbc1027f287dab40 100644 (file)
   "* TODO Workorder "
   _ - ":#:customer:city:state:topics:\n")
 
+(define-skeleton howm-facility
+  "Insert the structure for a facility note in HOWM"
+  ""
+  "SystemNotes"
+  _ - \n
+  "BeforeStartup\n"
+  "PLC\n"
+  "HMI\n"
+  "Commissioning\n"
+  "AfterStartup\n")
+
+(define-skeleton howm-person
+  "Insert the structure for a person note in HOWM"
+  ""
+  "Company: "
+  _ - \n
+  "Position: \n"
+  "Email: \n"
+  "Office: \n"
+  "Cell: \n")
+
 (provide 're-skeletons)
 ;;; re-skeletons.el ends here