]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
Fix some yasnippet snippets.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 24 Jan 2018 10:11:14 +0000 (11:11 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 24 Jan 2018 10:11:14 +0000 (11:11 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
snippets/org-mode/logbook
snippets/org-mode/results
snippets/org-mode/tablesrcshy
snippets/puppet-mode/filecontent
snippets/puppet-mode/header
snippets/snippet-mode/header

index a01e35fb2e8ec48debe4b50539a4a4ec00bf5336..17d2b6fe707ea33b6e38b0743009c5ea6c384f39 100644 (file)
@@ -3,5 +3,5 @@
 # key: logbook_
 # --
 :LOGBOOK:
-${1:`(yank)`}
+${1:`(current-kill 0)`}
 :END:$0
\ No newline at end of file
index 1ef396444fbe34b962ce92bea23c2ef59bffd748..1afec474e67c202a81268f6b590911633e400236 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"))} $0
\ No newline at end of file
+: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
index ea6a59537036bd8467f97f991aea3e663ac27a3d..353731cd01413f0710beb05e3ef3ecab344906d3 100644 (file)
@@ -1,10 +1,11 @@
 # -*- mode: snippet -*-
 # name: tablesrcshy (yank)
 # key: <srcshtabley
+# expand-env: ((yas-triggers-in-field 't))
 # If you want to reference the output in other src blocks you need a name.
 # --
 ${2:#+NAME: ${3:`(replace-regexp-in-string "[: \"]" "_" (replace-regexp-in-string "[][]" "" (replace-regexp-in-string ".*/" "" (org-display-outline-path nil t "/"  t))))`-src}}
-#+BEGIN_SRC sh ${4::session ${5:client}} :var ${6:HOSTS$(upcase (yas-text))}=${1:`(yank)`}[,${7:0}] :cache ${8:$$(yas-choose-value '("yes" "no"))} ${9::res}
+#+BEGIN_SRC sh ${4::session ${5:client}} :var ${6:HOSTS$(upcase (yas-text))}=${1:`(current-kill 0)`}[,${7:0}] :cache ${8:$$(yas-choose-value '("yes" "no"))} ${9::res}
 $6=($$6)
 
 for INDEX in \$\{!$6[@]\}; do
index edc669ccf6511c62d6d7ac7b40a0e3e1f40d94eb..c716558b8dc52f22de02cd99c4832f2cb6e65a26 100644 (file)
@@ -1,11 +1,12 @@
 # -*- mode: snippet -*-
 # name: filecontent
 # key: filecontent
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
 # --
 file { "$1":
-  ensure => file,
-  owner => ${2:root},
-  group => ${3:$2},
-  mode => '${4:0600}',
+  ensure  => file,
+  owner   => ${2:root},
+  group   => ${3:$2},
+  mode    => '${4:0600}',
   content => template('$5')$0
 }
index dd9603d4a8eaa9e3b11bf40025cd5994e99cb3b2..8142047e5caaeea66f02b2b70d8887dad669035e 100644 (file)
@@ -1,7 +1,7 @@
 # name: header
-# key: header
+# key: header_
 # --
-# == Class: ${1:name}
+# == Class: ${1:`(file-name-nondirectory (replace-regexp-in-string "/[^/]*/$" "" (file-name-directory (buffer-file-name))))`}
 #
 # ${2:description}
 #
@@ -11,7 +11,7 @@
 #
 # == Authors
 #
-# `(insert-timestamp)`
+# `(or (and (boundp 'user-full-name) user-full-name) (user-full-name))(message " <") (getenv "EMAIL") (message">")`
 #
 # === Copyright
 #
index 8600ec2bc8113182f9a5c3dbacff828d9d88765f..b107a38180ae0658b5b88d3aae0351a0c6381816 100644 (file)
@@ -3,7 +3,8 @@
 # key: <header
 # --
 # -*- mode: snippet -*-
-# name: ${1:`(insert (buffer-name))`}
-# key: ${2:`(insert (buffer-name))`}
-# --
+# name: ${1:`(print (buffer-name))`}
+# key: ${2:`(print (buffer-name))`}
+${3:# group: $4
+}# --
 $0
\ No newline at end of file