help-emacs-windows
[Top][All Lists]
Advanced

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

Re: [h-e-w] using emacs with mutt mail reader via gnuclientw


From: Charles Curley
Subject: Re: [h-e-w] using emacs with mutt mail reader via gnuclientw
Date: Wed, 20 Nov 2002 19:44:22 -0700
User-agent: Mutt/1.2.5.1i

On Mon, Nov 18, 2002 at 05:32:34PM -0500, Peter Davis wrote:
> I'm using the mutt mail reader under cygwin.  I've just written a
> short shell script so I can edit my messages and replies in an
> existing emacs window, using gnuclientw.  This seems to work pretty
> well.  However, there are a couple of additional features I would like
> to add.  I don't know if these are possible with gnuclientw or not.

They should be. I do exactly the same thing on Linux, except that on
Linux I use emacsclient, which is less flexible than gnuclient.

> 
> 1) I'd like a way to call emacs synchronously, so that my other
>    process pauses until ... what?  Right now, my shell script (below)
>    calls gnuclientw, passing the name of the draft file to edit, and
>    then does a 'read' to wait for user input.  I thought there was a
>    way to get emacs to wake up the calling process once the draft has
>    been edited and saved.  Anyone know?

I have this in my .muttrc:

set editor="emacsclient"        # editor to use when composing messages

Your analog should be something like:

set editor="gnuclientw"         # editor to use when composing messages

There may be a command line switch for gnuclient to cause it to block
(hence blocking mutt) until you finish with the email in the emacs
buffer. When you are done, remember to release the buffer and
gnuclientw with C-x #. Check the source for gnuclient; it's fairly
straight forward and I recall getting it to work for something else
many years ago.

> 
> 2) When the edit buffer is opened in emacs, I'd like to be in message
>    mode or mail mode or something that understands email.  Is that
>    possible, through gnuclientw?

From my .emacs. You can probably ignore the first line and its
matching close paren. This sets it up to run both mail mode and
auto-fill mode on any buffers based on files from "/tmp/mutt*".


;; Setup to use mail mode on files from mutt. From Walt Mankowski,
;; address@hidden
(if (not (string-equal what-env "Windows_95"))

    (progn
    ;; from Dave Pearson:
    (defalias 'muttrc-mode 'sh-mode)

    ;; Automatically go into mail-mode if filename starts with /tmp/mutt
    (setq auto-mode-alist (append (list (cons "^\/tmp\/mutt" 'mail-mode))
                                  auto-mode-alist))

  (defun my-mail-mode-hook ()
    (auto-fill-mode 1)
    )
  (add-hook 'mail-mode-hook 'my-mail-mode-hook)
  )
)
;; End setup to use mail mode on files from mutt.


You may have to hack a bit because of the different pathology on
Windows and Cygwin.

> 
> 3) I'd really like to get flyspell running in the draft buffer.  The
>    hand is quicker than the brain.

Sorry, can't help here.

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://w3.trib.com/~ccurley     / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB

Attachment: pgp5FdUdhdl5l.pgp
Description: PGP signature


reply via email to

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