I'm trying to make the kill ring essentially ignore whitespace only entries (tabs, newlines, just spaces, etC), I'm fairly new to elisp and I'm pretty sure the way to do is by doing defadvice but I have a few questions.
- Would it better to stop whitespace entries from ever getting into the kill ring in the first place, or to skip them on yank? I assumed the latter.
In which case, I'm completely lost on which function I should advise, its between current-kill, yank, and insert-for-yank - but am not entirely sure which I should manipulate to not yank whitespace from the kill ring.
Thanks!
EDIT: I'm pretty sure the way to do this is to manipulate `current-kill' to keep calling itself until it reaches a non whitespace entry? (or the end of the ring, whichever comes first)
M-y
when you get there to back up to the kill you want. I just don't see why whitespace-only intermediate kills should be particularly objectionable. – Haftarah