From: rearman Date: Mon, 18 Aug 2025 20:47:46 +0000 (-0400) Subject: Offload some howm templates to abbrevs, only load when on work pc X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=21345e4eb0ca9d55587a78f71ff62cf22956d098;p=emacsinit.git Offload some howm templates to abbrevs, only load when on work pc --- diff --git a/abbrev_defs b/abbrev_defs index ec5461d..27427d7 100644 --- a/abbrev_defs +++ b/abbrev_defs @@ -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 e45e4b7..eef74e6 100644 --- a/init.el +++ b/init.el @@ -167,6 +167,7 @@ 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)) diff --git a/re/re-packages.el b/re/re-packages.el index 4755f04..7e46947 100644 --- a/re/re-packages.el +++ b/re/re-packages.el @@ -134,9 +134,8 @@ (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 diff --git a/re/re-skeletons.el b/re/re-skeletons.el index 48512ea..131f763 100644 --- a/re/re-skeletons.el +++ b/re/re-skeletons.el @@ -50,5 +50,26 @@ "* 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