On Sat, Aug 12, 2017 at 08:37:30PM +0000, Arkadiusz Drabczyk wrote:
> On 2017-08-12, Jason <elect...@emypeople.net> wrote:
> >
> > On Thu, Aug 03, 2017 at 12:36:21PM -0500, Luis Mochan wrote:
> >> On Wed, Aug 02, 2017 at 08:49:30PM -0700, Ian Zimmerman wrote:
> >> > On 2017-08-02 21:47, Jason wrote:
> >> > 
> >> > > I am using emacs24 for my text editor with mutt (in a terminal).
> >> > > How can I set it to automatically wrap the lines at a certain number
> >> > > of characters?
> >> > 
> >> > "M-x auto-fill-mode" will do it in a new buffer, provided you set your
> >> > fill-column variable.
> >> 
> >> If you have already opened your buffer, you can wrap the lines of a 
> >> paragraph with M-q.
> >> 
> >> You can set the fill column to say, 72 with C-u 7 2 C-x f
<Snipped my previous message and config>
> Is that your *whole* Emacs config?
> 
> As said above you need at least one hook.  In order to easily use
> Emacs in programs such as mutt or slrn I recommend mutt-mode.  I
> cannot find on the net anywhere any more so I put it here
> http://drabczyk.org/mutt.el.  mutt-mode will add several nice
> keybindings such as C-c C-c to automatically save a message and exit
> the current buffer or C-c C-i to automatically jump to the signature,
> it will also color quotation and will of course enable auto-fill-mode
> automatically.  To enable mutt-mode automatically when writing a
> message in mutt or slrn put mutt.el in your load-path and add
> something like this to your Emacs startup file:
> 
> (defun mutt-mode-hook ()
>   (when
>       (and
>        (file-exists-p (buffer-file-name))
>        (stringp buffer-file-name)
>        (or (string-match (concat ".*mutt-comp-[0-9\-]+$") buffer-file-name)
>          (string-match ".followup" buffer-file-name)
>          (string-match ".article" buffer-file-name))
>        (mutt-mode)
>        )))
> 
> (add-hook 'find-file-hook 'mutt-mode-hook)
> 
> Replace `comp' with your hostname as by default mutt uses the hostname
> to create a message template in /tmp.

Thank you Ian and Arkadiusz.

I implemented the above solution with 'mutt.el' and it works great. For
some reason C-c C-c does not work to exit though. It throws the
following error:

Symbol's function definition is void: server-edit
Is there an easy answer to that?

Thanks.
-- 
Jason

Reply via email to