* Emacs as an external flowed-text editor?
@ 2006-06-12 11:10 Bjoern Voigt
2006-06-12 19:21 ` roodwriter
0 siblings, 1 reply; 4+ messages in thread
From: Bjoern Voigt @ 2006-06-12 11:10 UTC (permalink / raw)
Hello!
I know that Emacs is capable of encoding and decoding of format=flowed
text within Gnus.
But I want to use Emacs as an external editor for text based mailers
like Pine or Mutt. In normal mode Emacs deletes the trailing spaces with
fill-paragraph (ESC-q) and in auto-fill-mode. But this trailing spaces
should be preserved for format=flowed text.
There is a library gnus/flow-fill.el in Emacs. But how can Emacs be
configured to use the library in text modes?
Björn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs as an external flowed-text editor?
2006-06-12 11:10 Emacs as an external flowed-text editor? Bjoern Voigt
@ 2006-06-12 19:21 ` roodwriter
2006-06-14 14:08 ` Bjoern Voigt
0 siblings, 1 reply; 4+ messages in thread
From: roodwriter @ 2006-06-12 19:21 UTC (permalink / raw)
Bjoern Voigt <bjoernvoigt@compuserve.de> writes:
> Hello!
>
> I know that Emacs is capable of encoding and decoding of format=flowed
> text within Gnus.
>
> But I want to use Emacs as an external editor for text based mailers
> like Pine or Mutt. In normal mode Emacs deletes the trailing spaces with
> fill-paragraph (ESC-q) and in auto-fill-mode. But this trailing spaces
> should be preserved for format=flowed text.
>
> There is a library gnus/flow-fill.el in Emacs. But how can Emacs be
> configured to use the library in text modes?
>
> Björn
I'm not exactly clear on what you're asking here. If you're asking for
a traditional word wrap with a carriage return (newline) just at the
end of a paragraph, like word processors do, then try longlines.el. I
just plopped it into my .emacs file, restarted and it works fine.
There are only a few instances when I have it turned off.
--Rod
______________________
Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical
Consumers" and "Boring Stories from Uncle Rod." To reply by e-mail
take the second "o" out of the e-mail address.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs as an external flowed-text editor?
2006-06-12 19:21 ` roodwriter
@ 2006-06-14 14:08 ` Bjoern Voigt
2006-06-14 15:44 ` Mathias Dahl
0 siblings, 1 reply; 4+ messages in thread
From: Bjoern Voigt @ 2006-06-14 14:08 UTC (permalink / raw)
roodwriter@core.com writes:
> I'm not exactly clear on what you're asking here. If you're asking for
> a traditional word wrap with a carriage return (newline) just at the
> end of a paragraph, like word processors do, then try longlines.el. I
> just plopped it into my .emacs file, restarted and it works fine.
Thank you for the tip with "longlines.el". I think it's possible to
compose e-mails with long-lines-mode. The mailer can do the special
format=flowed line wrapping after editing the message.
But I think, that long-lines-mode is not perfect, if I edit mails which
were already stored as a draft with format=flowed encoding or if I edit
replies with "> "-paragraphs.
The flowed format is defined in RFC 3676
(http://www.rfc-archive.org/getrfc.php?rfc=3676).
Flowed-text capable mailers wrap lines after 66 characters
(configurable) like other mailer too. But the flowed text format knows
two types of line breaks:
Hard line breaks: <LF>
Soft line breaks: <Space><LF>
I have attached the example output of emacs after calling the function
"fill-flowed-test" from gnus/flow-fill.el.
http://user.cs.tu-berlin.de/~bjoern/emacs/fill-flowed-test.png
The trailing spaces are marked red in the screenshot. A flowed-text
capable program can adjust the line wrapping according to the window
width. Also a flowed-text capable editor preserves the trailing spaces
if it formats a paragraph.
Because flow-fill.el is already in Emacs/Gnus it's clear that Emacs can
display and compose flowed text. But I don't know what I have to write
into my .emacs file to activate this mode. The "fill-flowed" function is
not interactively avaliable after loading gnus/flow-fill.el with
"load-file", "autoload" or "require".
Greetings, Björn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs as an external flowed-text editor?
2006-06-14 14:08 ` Bjoern Voigt
@ 2006-06-14 15:44 ` Mathias Dahl
0 siblings, 0 replies; 4+ messages in thread
From: Mathias Dahl @ 2006-06-14 15:44 UTC (permalink / raw)
Bjoern Voigt <bjoernvoigt@compuserve.de> writes:
> Because flow-fill.el is already in Emacs/Gnus it's clear that Emacs can
> display and compose flowed text. But I don't know what I have to write
> into my .emacs file to activate this mode.
I looked at flow-fill.el now and I don't see any mode in it.
> The "fill-flowed" function is
> not interactively avaliable after loading gnus/flow-fill.el with
> "load-file", "autoload" or "require".
What about just adding an interactive wrapper function so that you can
flow-fill the text when you want? Something like this:
(defun my-fill-flowed ()
"Call fill-flowed in flow-fill.el."
(interactive)
(require 'flow-fill)
(fill-flowed))
You can probably arrange for that (or the normal `fill-flowed' of
course) to be called when certain files or buffers open if you want,
if there is any such "rule" that you could match against.
/Mathias
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-14 15:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-12 11:10 Emacs as an external flowed-text editor? Bjoern Voigt
2006-06-12 19:21 ` roodwriter
2006-06-14 14:08 ` Bjoern Voigt
2006-06-14 15:44 ` Mathias Dahl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).