emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change soft to hard lines and back


From: Jorge A. Alfaro-Murillo
Subject: Re: change soft to hard lines and back
Date: Thu, 14 Dec 2017 18:52:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Hi, Uwe.

Uwe Brauer writes:

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 [...] 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?

Probably this would work:

#+BEGIN_SRC emacs-lisp
 (defun soften-hardlines ()
   (interactive)
   (save-excursion
     (goto-char (point-min))
     (mail-text)
     (while (search-forward hard-newline nil t)
       (replace-match "\n"))))
#+END_SRC

Best,
--
Jorge.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]