|
From: | Uwe Brauer |
Subject: | change soft to hard lines and back |
Date: | Thu, 14 Dec 2017 14:44:44 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
HiFor 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?
ThanksUwe Brauer
[Prev in Thread] | Current Thread | [Next in Thread] |