Kungsgeten / yankpad

Paste snippets from an org-mode file
MIT License
216 stars 18 forks source link

Unwanted conversion of org-mode blocks and single-line properties #53

Closed ritzelpaket closed 4 years ago

ritzelpaket commented 5 years ago

Hej,

I just started using yankpad and I am really enjoying its features so far. Unfortunately, I am experiencing an issue with an unwanted conversion to lower case when using a snippet to insert org elements. The org-mode SRC blocks and single-line properties are converted to lower case when inserting them with a snippet.

It seems like elements with #+ are turned to lowercase as long as they are valid. E.g. COMMENT block properly closed with #+END_COMMENT. Also one can observe, that the multiple spaces in the SRC block between the language definition :results are stripped down to a single space. Therefore it seems as if these elements are parsed by yankpad instead of just inserting them from the raw snippet definition.

Snippet:

** Some SRC block
:PROPERTIES:
:ABC:
:END:

#+PROPERTY: xy

# UPPERCASE COMMENT

#+BEGIN_SRC sh        :results none
$0
#+END_SRC

#+BEGIN_COMMENT
#+END_COMMENT

#+BEGIN_COMMENT

Result after insertion:

::PROPERTIES:
:ABC:      
:END:

#+property: xy

# UPPERCASE COMMENT

#+begin_src sh :results none

#+end_src

#+begin_comment
#+end_comment

#+BEGIN_COMMENT

It is surely not critical, but for me it is really annoying. I hope this can be reproduced and someone can provide me some hints how fix this.

Hälsningar till Sverige

Ritzelpaket

Kungsgeten commented 5 years ago

Hi! That is unfortunate. Your snippet works fine for me and the case isn't changed. Which versions of Yankpad and Yasnippet are you using?

Kungsgeten commented 4 years ago

Closing this because of inactivity.