Subject: Alternate Editor

From: Dan Hatton <[email-masked]>
Date: Wed, 27 Mar 2002 21:47:48 +0000 (GMT)

I'm trying to use emacs with auto-fill-mode as my alternate editor in
Pine.  This means that I need to put "-f auto-fill-mode" on the
command line after the name of the file emacs is supposed to open.
Does the editor variable have some equivalent of the url-viewers
variable's _URL_, which I can use to specify where the filename goes.

Thanks

Dan Hatton

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Jacob Morzinski <[email-masked]>
Date: Wed, 27 Mar 2002 16:53:47 -0500 (EST)

> command line after the name of the file emacs is supposed to open.

There's another way to do it.  Pine's composition buffers are
saved with a name matching the regexp "pico.[0-9]+".  I put two
commands in my .emacs file: the first tells emacs to use
text-mode when editing pine's composition buffers, and the second
causes all text-mode buffers to enable auto-fill mode.

;;; Use text-mode for pine composition buffers.
(setq auto-mode-alist (cons '("pico.[0-9]+$" . text-mode) auto-mode-alist))

;;; Buffers in text-mode should have auto-fill-mode set.
(defun jm-text-mode-funcs ()
  "Functions useful in text-mode-hook."
  (auto-fill-mode 1))
(add-hook 'text-mode-hook 'jm-text-mode-funcs)

---

From: "Michael D. Walker" <[email-masked]>
Date: Thu, 28 Mar 2002 07:11:08 -0800 (Pacific Standard Time)

>(add-hook 'text-mode-hook 'jm-text-mode-funcs)

Any luck using this with PC Pine?

---

From: Jason Tiller <[email-masked]>
Date: Thu, 28 Mar 2002 10:00:42 -0800 (Pacific Standard Time)

Hi, Michael, :)

> >There's another way to do it.  Pine's composition buffers are saved
> >with a name matching the regexp "pico.[0-9]+".  I put two commands
> >in my .emacs file: the first tells emacs to use text-mode when
> >editing pine's composition buffers, and the second causes all
> >text-mode buffers to enable auto-fill mode.

> Any luck using this with PC Pine?

I use PC-Pine and had worked out a rather convoluted process for
enabling auto-fill in my PC-Pine editing buffers (using 'gnudoit' from
the gnuserv package).  After reading Dan's note, however, I
immediately switched over to this simpler, more obvious style!  And,
yes, I got it to work.

>From what I can tell, PC-Pine uses a temp file of this format:

"aeNNNNNN.txt"

So, you should be able to use Dan's stuff straight out of the box if
you change the filename match expression from "pico..." to
"ae[0-9]+\\.txt".

It worked for me on the first try, a major accomplishment for this
elisp newbie. :)  Thanks, Dan!

---Jason
Sonos Handbell Ensemble
http://www.sonos.org/

P.S. - I noticed that Emacs' default auto-mode-alist includes a match
expression for "\\.te?xt", so you might not even need the '(setq
auto-mode...' command.

---

From: Dan Hatton <[email-masked]>
Date: Thu, 28 Mar 2002 23:15:58 +0000 (GMT)

Thanks for all the praise, but it was Jacob's idea, not mine.

Dan