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:
parent
78ea855197
commit
c77ba18e71
|
@ -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 " ") ""))`
|
|
@ -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 " ") ""))`
|
|
@ -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 " ") ""))`
|
|
@ -12,4 +12,4 @@
|
|||
(+yas/org-prompt-header-arg :results "Result output: " '("silent " "replace " "append " "prepend "))))))
|
||||
(if (string= out "") ""
|
||||
(concat ":results " out " ")))
|
||||
`$0
|
||||
`
|
|
@ -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
|
|
@ -1,6 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Header arg - silent
|
||||
# key: S
|
||||
# key: s
|
||||
# condition: (+yas/org-src-header-p)
|
||||
# --
|
||||
:results silent $0
|
|
@ -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 " ") ""))`
|
Loading…
Reference in New Issue