On Tue, Nov 16, 2010 at 6:17 PM, Samuel Wales wrote: > OK, more: > > I appreciate your considerable effort and I know that your perl > solution works for you, but debugging it so that it works for my box > also is not the approach that will work for all of us, and is not > something I can do at this time. A dependency on a specific version > of perl or another part of the external environment is not a universal > solution. > Good points. Didn't mean to be pushy! Just wanted to toss it out one more time. Consider it more that I empathize with your frustration and since I've been so happy with it I was hoping it could make your life easier as well. > A native solution is best for everybody if we can implement it. > Perhaps this is right. Maybe my fix was more hackish and non-robust and it's better to put in the effort to find a more universal solution for those in this situation. > My questions again are, is there a hook that can unfill, can HTML be > made to unfill, or is there an unfill-region that works on subtrees. > Before hitting send I decided to look around and see what I found. Check this out!! [1] ,----- | (defun unfill-region (begin end) | "Remove all linebreaks in a region but leave paragraphs, indented text | (quotes, code) and lines starting with an asterisk (lists) intact" | (interactive "r") | (replace-regexp "\\([^\n]\\)\n\\([^ *\n]\\)" "\\1 \\2" nil begin end)) `----- I tried it out and it worked great (added to .emacs, reloaded, and used M-x unfill-region RET). I tried it with two headings each with multiple lines of text under them and unfilled the whole buffer. It leaves the headers on their own lines and turns each paragraph into a long line of text that exported perfectly to a run-on html blob with C-u C-c C-e R. Would that work? [1] http://blog.bookworm.at/2007/08/emacs-unfill-region.html John