I have a short snippet template which I use to document my patient’s encounter in org-mode. It consists of

 * Subjective 
* Objective 
- Examination: $2 
- Investigations seem : $3

*  Assessment 
- $4
* Plan 
- Investigations suggested 
   - $5 
- Treatment 
   1. $6 

But when I use M-RET (runs org-meta-return) within the snippet to create a new item, the snippet exits (the fields are no longer TABable, the message [yas] Snippet 0 exited. appears in the *Messages* buffer). How can I prevent this? Kindly note I am not a programmer

  • 1
    What's the question? And please specify what you mean by "the snippet breaks". Also, try C-h k in that context, followed by Ctrl + Enter, to see what key sequence Emacs is picking up and what command it is bound to. – Drew Nov 22 '19 at 18:04
  • @Drew by snippet breaks, I mean I cannot TAB further. The snippet ends – Vaibhav Nov 28 '19 at 5:18
  • @Vaibhav I made some updates to your question to clarify it, but I had to make some assumptions (mainly, that you are using org-mode). Please rollback, or edit further if I wrote something incorrect. – npostavs Nov 28 '19 at 12:37
  • Unfortunately, I think the answer to your question is "not possible at this time", but you might have better luck with other snippet packages, e.g., (autotype) Using Skeletons or (autotype) Tempo (both of these are builtin to Emacs). – npostavs Nov 28 '19 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.