You can use the function set-hard-newline-properties to mark all newlines in some range as hard. For the inverse you can remove the 'hard property with (remove-text-property START END '(hard nil)).

On Thu, Dec 14, 2017 at 2:44 PM, Uwe Brauer <oub@mat.ucm.es> wrote:


Hi

For email I start to use messages-are-flowing.el (for example in this message) which insert and display hardlines. (This is useful when sending message to devices with small screens since then the line ending is better displayed).

However sometimes it is a bit too much. So I still have a function which replaces softline by hardlines, namely

(defun harden-newlines () (interactive)  (save-excursion ;    (goto-char (point-min))    (mail-text) (while (search-forward "\n" nil t)      (put-text-property (1- (point)) (point) 'hard t))))
So I thought the inverse operation could be
(defun soften-newlines () (interactive)  (save-excursion ;    (goto-char (point-min))    (mail-text) (while (search-forward "\n" nil t)      (put-text-property (1- (point)) (point) 'soft t))))
But unfortunately this did not work out. I tried to google for the put-text-property function but did not find anything useful.

Somebody has an idea how to do that, replace hardlines again by softlines?

Thanks

Uwe Brauer