Org: Tweak header arg snippets

- Re-prioritise lower-case "s": silent is more common than session
- The $0 doesn't actually seem to change the final cursor position, and
  if the snippet is cancelled it is left behind as clutter.
- Fix incorrect labelling with NoWeb snippet
This commit is contained in:
TEC 2021-06-04 22:34:34 +08:00
parent 78ea855197
commit c77ba18e71
Signed by: tec
GPG Key ID: 779591AFDB81F06C
7 changed files with 7 additions and 7 deletions

View File

@ -3,4 +3,4 @@
# key: v
# condition: (+yas/org-src-header-p)
# --
`(let ((out (+yas/org-prompt-header-arg :eval "Evaluate: " '("no" "query" "no-export" "query-export")))) (if out (concat ":eval " out " ") ""))`$0
`(let ((out (+yas/org-prompt-header-arg :eval "Evaluate: " '("no" "query" "no-export" "query-export")))) (if out (concat ":eval " out " ") ""))`

View File

@ -3,4 +3,4 @@
# key: e
# condition: (+yas/org-src-header-p)
# --
`(let ((out (+yas/org-prompt-header-arg :exports "Exports: " '("code" "results" "both" "none")))) (if out (concat ":exports " out " ") ""))`$0
`(let ((out (+yas/org-prompt-header-arg :exports "Exports: " '("code" "results" "both" "none")))) (if out (concat ":exports " out " ") ""))`

View File

@ -3,4 +3,4 @@
# key: n
# condition: (+yas/org-src-header-p)
# --
`(let ((out (+yas/org-prompt-header-arg :noweb "Evaluate: " '("no" "yes" "tangle" "no-export" "strip-export" "eval")))) (if out (concat ":noweb " out " ") ""))`$0
`(let ((out (+yas/org-prompt-header-arg :noweb "NoWeb: " '("no" "yes" "tangle" "no-export" "strip-export" "eval")))) (if out (concat ":noweb " out " ") ""))`

View File

@ -12,4 +12,4 @@
(+yas/org-prompt-header-arg :results "Result output: " '("silent " "replace " "append " "prepend "))))))
(if (string= out "") ""
(concat ":results " out " ")))
`$0
`

View File

@ -1,6 +1,6 @@
# -*- mode: snippet -*-
# name: Header arg - session
# key: s
# key: S
# condition: (+yas/org-src-header-p)
# --
:session "${1:`(file-name-base (or (buffer-file-name) "unnnamed"))`-session}" $0

View File

@ -1,6 +1,6 @@
# -*- mode: snippet -*-
# name: Header arg - silent
# key: S
# key: s
# condition: (+yas/org-src-header-p)
# --
:results silent $0

View File

@ -3,4 +3,4 @@
# key: w
# condition: (+yas/org-src-header-p)
# --
`(let ((out (+yas/org-prompt-header-arg :noweb "Wrap: " '("example" "export" "comment" "src")))) (if out (concat ":wrap " out " ") ""))`$0
`(let ((out (+yas/org-prompt-header-arg :noweb "Wrap: " '("example" "export" "comment" "src")))) (if out (concat ":wrap " out " ") ""))`