この関数でyasnippetを作成しようとしています
\cite{${1:label$(unless yas/modified-p (reftex-citation nil 'dont-insert))}}$0
動作しますが、実行すると
[yas] elispエラー!
奇妙なことに、私は同等のスニペットを持っていますが、reftex-reference
その代わりにreftex-citation
うまく動作します。
スニペットにタイプミスがあると思います。の2番目ではなく、最初の引数reftex-citation
はですNO-INSERT
。だから私はそれがすべきだと思います:
\cite{${1:label$(unless yas/modified-p (reftex-citation 'dont-insert))}}$0
とにかく、どちらの方法でも私にはうまくいきます。テストしていたところ、エラーが発生しました
"No valid bibliography in this document, and no default available"
それがあなたの問題かもしれません。ドキュメント内で実行できますreftex-citation
かC-c [?