]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
custom org-mode snippets
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 7 Sep 2022 16:59:31 +0000 (18:59 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 7 Sep 2022 16:59:31 +0000 (18:59 +0200)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
snippets/org-mode.org
snippets/org-mode/checkssl
snippets/org-mode/epilogue [new file with mode: 0644]
snippets/org-mode/pagerduty
snippets/org-mode/res
snippets/org-mode/results

index 8f670ddc771a89c8d07aa0826e42899ca8dfcab2..1c54d1be7c120e4932818baef9deff1d3b273731 100644 (file)
@@ -4,6 +4,7 @@
 | babel-sh     | babel-shell | skeleton to generate a sh file out of an org file    |
 | blog         | blog        | skeleton for a blog entry                            |
 | results      | :res        | add results parameter. for src block.                |
+| epilogue     | :epi        | ignore exit code and get result                      |
 | sqlmysql     | sqlmysql    | properties to connect to MySQL via org               |
 | sqlora       | sqlora      | properties to connect to Oracle via org and Perl DBI |
 | srcclient    | <sclient    | SRC snippet executable on a shell session            |
index 59f1c31040f8e52796b3838481832f7e6b11c1ae..95187638835c7495d2d8558fe36276309a59b744 100644 (file)
@@ -3,6 +3,6 @@
 # key: checkssl_
 # --
 #+begin_src sh :results output :wrap SRC fundamental :epilogue true
-  curl -vvI https://$1 2>&1 | grep -E '(start date|expire date|subject)'
+  curl -kvvI https://$1 2>&1 | grep -E '(start date|expire date|subject)'
 #+end_src
 $0
diff --git a/snippets/org-mode/epilogue b/snippets/org-mode/epilogue
new file mode 100644 (file)
index 0000000..0e98b7b
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: epilogue
+# key: :epi
+# --
+:epilogue true$0
\ No newline at end of file
index 4e3c1e75b219215446e84de47ea1e307c7f25f64..6f6b5dab4c7172071235798e420d4c9ff47ccf92 100644 (file)
@@ -2,5 +2,5 @@
 # name: pagerduty-clocktable
 # key: pagerduty_
 # --
-$0#+BEGIN: clocktable :maxlevel 2 :narrow 80 :scope agenda-with-archives :tstart "${1:`(org-read-date nil nil "-1mon")`}" :tend "${2:`(org-read-date nil nil "today")`}" :match "PAGERDUTY" :fileskip0 :formula :link %
+$0#+BEGIN: clocktable :maxlevel 2 :narrow 80 :scope agenda-with-archives :tstart "${1:`(org-read-date nil nil "-1mon")`}" :tend "${2:`(org-read-date nil nil "today")`} 12:00:00" :match "PAGERDUTY" :fileskip0 :formula :link %
 #+END:
\ No newline at end of file
index 5b1dad3eddcc94a50671614c96a909b0796300e3..9c896c8dfcb2ad31c9d4290e1bcea20d2cddc503 100644 (file)
@@ -3,6 +3,6 @@
 # key: res_
 # --
 #+RESULTS:
-:RESULTS:
+#+begin_src fundamental
 $0
-:END:
\ No newline at end of file
+#+end_src
\ No newline at end of file
index 1afec474e67c202a81268f6b590911633e400236..ea35855e3d36d5430ad8f9057baa37e617e440bb 100644 (file)
@@ -3,4 +3,4 @@
 # key: :res
 # add results parameter to src block
 # --
-:results ${1:$$(yas-choose-value '("verbatim drawer" "table" "list" "silent" "value code :wrap SRC sql" "value code :wrap SRC json" "value code :wrap SRC fundamental"))} $0
\ No newline at end of file
+:results ${1:$$(yas-choose-value '("verbatim drawer" "table" "list" "silent" "output code :wrap SRC sql" "output code :wrap SRC json" "output code :wrap SRC fundamental"))} $0
\ No newline at end of file