Writing a book that markets itself
The best writing I've read around writing and marketing books lately has to be Rob Fitzpatrick's 'Write useful books'. The thesis is that book marketing is broken and the only way people buy books anymore is when a friend, or someone they respect, recommends one.
Therefore it book marketing is largely down to writing a book that's easy to recommend.
This involves offering a tangible outcome that a specific group of people care about. Seeing someone struggle with the problem you've written about then becomes a catalyst for the recommendation. This is not to say that all books should help people solve a problem, that's just what I'm talking about here.
Make sure the book works. By reading the book and following its advice, a reader is able to deal with their problem. This part is key.
Follow these two guidelines and Rob recons you can safely ignore all other traditional book marketing advice, because book like this will market itself. It won't become an instant best seller, but it will kick off a string of recommendations that compound each year, and build up to a point where the book becomes profitable.
Rob's first book, The Mom Test, earned $535 in its first month. 8 years later it passed $10k in monthly royalties and continues to grow. Earning more than $500k in total royalties so far. His second book's sales in month five were the same as The Mom Test’s at year five. Now generating several thousand per month in royalties, again without any marketing. And to bring it this point home, his third book, I am literally recommending as I write this.