I have a problem with yasnippet and Emacs 23.4.1 on W7-64. I write a blog and having run into difficulties with the WordPress visual editor I am going to see whether it might be easier to simply compose everything in HTML and paste it directly into WordPress’ HTML editor. Accordingly using the rather impressive yasnippet I created the following:
#contributor : blogger
#name : blog picture link
# --
<a href="http://verylongwebsitename.com/wp-content/uploads/2012/${1:mm}/${2:folder}/fig${3:x}_l.png"><img class="alignnone" title="fig$3" src="http://verylongwebsitename.com/wp-content/uploads/2012/$1/$2/fig$3_m.png" alt="${5:alttext}" width="${6:700}" height="${7:500}" /></a>$0
to enter long and fiddly links like the one below, in html-mode:
The problem is that at some point during the process of entering the
snippet it goes funny, like this:

If you look you can see that yasnippet has inserted many spaces on each line, causing much ugliness and a broken link. Because of the way that the words are sort of aligned I suspect that it’s something to do with the interaction between yasnippet and tab settings, but despite a bit of scratching around I can’t resolve the problem.
Can anybody suggest what might be causing this?
After much messing around I have found that the problem was (most likely) an issue with one of Emacs’ fill modes interacting with
yasnippetin an odd way. Specifically I had it set to ‘Fill’ in HTML mode and what I apparently needed was ‘Wrap’. My crude solution was to create a keyboard macro to switch modes and assign that to a shortcut key in my.emacsfile as follows:Apologies for any confusion caused. Incidentally, after managing to reinstall
yasnippetI am loving it and find it very useful for all kinds of things.