yank-lines yanks indent when in org-indent-mode
Yanking lines also pulls in special text / indents. Yanking characters doesn't. Here's how to reproduce:
- Create an org file (see below)
- Turn on org-indent-mode: M-x org-indent-mode
- Use visual line mode (V) and select 'First line' and 'Next line'
- Yank (y) the contents
- Paste (p) in a different buffer
You will notice that the indents are carried along with the paste and cannot be easily deleted.
On the other hand, if you use visual character mode (v) or switch to emacs mode to copy the text - then it copies / pastes correctly without the indents.
Org file raw contents:
* Level one ** Level two First line Next line
Org file (as seen with indent mode activated):
* Level one * Level two First line Next line